Good, then we will try something more complicated, before you nuke everything.
We will be performing a database repair, with some additional commands thrown in.
The procedure is based on the offical guide
https://support.plex.tv/articles/201100678-repair-a-corrupt-database/
See this article for basic knowledge about how to find the database file and where to download the required software tool.
After you have extracted the sqlite.exe into the right folder,
open a command line window (cmd.exe
),
navigate to the correct drive and folder
cd "%LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases"
(if you have customized the location of your Plex data folder, you’ll have to navigate there on your own)
copy each of the following commands into it and submit them by pressing Enter
Shut down Plex Server before doing any of the below:
First some additional commands which are required for Server versions after 1.13.1
sqlite3 com.plexapp.plugins.library.db "DROP index 'index_title_sort_naturalsort'"
sqlite3 com.plexapp.plugins.library.db "DELETE from schema_migrations where version='20180501000000'"
It is of utmost importance, that all of the commands are copied exactly as written, because they alter the database directly. Make sure to copy the complete line and not only the part that is visible on a smaller screen.
Now run an integrity check on the DB file
sqlite3 com.plexapp.plugins.library.db "PRAGMA integrity_check"
On to the actual repair procedure.
export the DB to SQL file:
sqlite3 com.plexapp.plugins.library.db .dump > dump.sql
Now rename the original, potentially corrupted DB file
rename com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original
reimport the SQL dump back into a new DB file:
sqlite3 com.plexapp.plugins.library.db < dump.sql
Run another check to establish if repair was successful
sqlite3 com.plexapp.plugins.library.db "PRAGMA integrity_check"
Now let’s throw away everything related to the DVR/live TV feature:
DELETE FROM media_provider_resources
at the end of the procedure, move these files out to a safe place (outside of Plex’s data), just in case you want to revert it:
com.plexapp.plugins.library.db-shm
com.plexapp.plugins.library.db-wal
com.plexapp.plugins.library.db.original
tv.plex.providers.epg.xxxxxxxxxxxxxxxxxxxxx.db
tv.plex.providers.epg.xxxxxxxxxxxxxxxxxxxxx.db-shm
tv.plex.providers.epg.xxxxxxxxxxxxxxxxxxxxx.db-wal
Now, you can restart Plex. Allow it to sit for several minutes, because it has to rebuild some index tables in the database which were cleared out by the previous procedure.