A Python utility for repairing incorrect Date Added metadata in Plex music libraries. Plex occasionally applies future timestamps to tracks or their parent albums, which causes them to appear incorrectly in the Recently Added carousel even when they were added months or years earlier.
This tool reads the true file creation time from the filesystem and uses it to correct Plex’s internal metadata, ensuring Plex sorts music items accurately.
- Tracks with incorrect
added_atdates - Parent albums with inconsistent
added_atandcreated_atvalues - Future-dated items that show up incorrectly in “Recently Added”
- Tracks where Plex ignored the actual file timestamp during import
- Reads Plex’s
metadata_itemsandmedia_partstables - Extracts the Date Created value from each media file
- Updates both:
added_atcreated_at
- Writes changes safely using Plex’s bundled SQLite engine
- Supports:
- Fixing a single track by ID
- Bulk repair of all tracks with future
added_attimestamps
- macOS
- Plex Media Server installed locally
- Python 3
- Plex Media Server must be stopped before running
- Always back up
com.plexapp.plugins.library.dbbefore making changes
python3 update_plex_timestamp.pyChoose between:
- Fix a single track by providing a metadata item ID
- Bulk-fix all future-dated tracks and their parent albums
The script shows a full summary before applying changes and requires confirmation.