Last active
December 3, 2025 11:44
-
-
Save pearsonc/73a040a0ea188bb8b35db03079fecb70 to your computer and use it in GitHub Desktop.
Fix Plex Recently Added
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/bin/bash | |
| sudo systemctl stop plexmediaserver | |
| sudo /usr/lib/plexmediaserver/Plex\ SQLite "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db" "UPDATE metadata_items SET added_at = strftime('%s', 'now', '-1 year') WHERE added_at > strftime('%s', 'now');" | |
| sudo systemctl start plexmediaserver |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Previously added movies or shows keep appearing as "Recently Added" even after a library scan.
A glitch can occur when adding media to your library, in which the system sets a ridiculous future date in the item's metadata.
This script will update the added date for all shows, films, etc. that have a value greater than the system time (e.g., a future time) to exactly 1 year ago, effectively removing them from the recently added sections of Plex.