Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save spiritualized/42f10b85d2d281957cb40733adeb0a07 to your computer and use it in GitHub Desktop.
Save spiritualized/42f10b85d2d281957cb40733adeb0a07 to your computer and use it in GitHub Desktop.
Plex: Fix library items stuck at the top of 'Recently Added' section (Windows)
Plex Media Server often stores incorrect 'added' timestamps when adding new items, causing some items to stick perpetually at the top
of the list. Run the following command in a command prompt to fix the database:
"%PROGRAMFILES%\Plex\Plex Media Server\Plex Media Server.exe" -sqlite "%LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db" "UPDATE metadata_items SET added_at = created_at where added_at >= unixepoch();"
If that didn't work, you may have installed the 32bit build of Plex Media Server on 64bit Windows. Try the following:
"%PROGRAMFILES(X86)%\Plex\Plex Media Server\Plex Media Server.exe" -sqlite "%LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db" "UPDATE metadata_items SET added_at = created_at where added_at >= unixepoch();"
The command can also be saved into a textfile, and renamed as 'fix-plex-recent-items.bat' for ease of use.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment