Negative unwatched episode count (and Release Date ordering is random)

Server Version#: v1.14.1.5488-cc260c476 - annapurnatrans PC arm7 - build: linux-annapurnatrans-arm7 readynas6 - GMT 00:00

Linux version#: Raspbian Stretch Lite 4.14.98-v7+ (#1200 SMP Tue Feb 12 20:27:48 GMT 2019), language: en-GB

SQLite Version#: 3.13.0

Example of random Release Date ordering

Yesterday I noticed that all of my TV shows were showing a negative unwatched count that didn’t match the episode count (between -200 and -500 when only 10 episodes in the show), and despite sorting films by Release Date, they too were arranged randomly (2018, 2015, 2019, etc). I assumed my DB was corrupt, so I followed the instructions on the Support Articles page to check/repair my DB, and was greeted with numerous lines stating non-unique entry in index unique_schema_migrations during the PRAGMA integrity_check part

I restored the entire /var/lib/plexmediaserver folder from a backup (January 2019) that I know was fine (as I had no problems during Feb), and I still had the same problem with negative unwatched count and random sorting. I ran the “Check for Corruption” and “Run a Repair” commands against the Jan '19 DB and was shown the same non-unique entry in index unique_schema_migrations error as before.

I’ve now swapped the SD card for a new one, with a clean install of Plex on the latest Raspbian Lite (the only thing I’ve done is run the setup process to associate the sever with my Plex account), If I run PRAGMA integrity_check against the new/clean DB I’m still seeing the same non-unique entry in index unique_schema_migrations error.

I’m starting to think it’s not a DB issue but something else (a broken sqlite package?). Does anyone have any suggestions what could be wrong?

I’m happy to post my Plex Media Server.log if there’s no sensitive information in it!

This problem started for me last night on my Raspberry Pi installation. I am also experiencing problems with the movies library.

I am on the same server and Linux version.

This is a raspberry pi problem, one of the upgrade packages broke many systems. You can look for some solutions in this thread: Ras3 crashes after update - Raspberry Pi Forums

EDIT:

for me

LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libarmmem-v6l.so sudo rm /etc/ld.so.preload

and a reboot worked.

3 Likes

Wow, that seems to have worked… the UI is back to normal. Thank you ever so much for the help :slight_smile:

1 Like

@deathkid’s suggestion worked for me.

Thanks!

Thank you so so so much for finding this and posting this here.
You deserve the best things in life.

I was almost nuking my databases and letting Plex rebuild them from scratch, but this solved my problem.

So one wrinkle…after applying this fix, I can no longer find my Plex folder in /var/lib.

Thoughts?

I found it in /home/pi/Library/Application Support/Plex Media Server/

Not sure why there’s no longer a plexmediaserver folder in /var/lib.

Where does that go? (I can’t work it out from the pi forums)

Just paste that command into the terminal, then press enter.

1 Like

Oh, I tried that don’t think it worked. Will check again.

(edit: I left a trailing quotation mark in…)

Ok, all working now!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.