Used to fix invalid future added data in a linuxserver.io plex docker container. The find and touch commands are needed to fix the file date, then Plex SQLite is used to fix the date in the database. Remember to back up your database before doing any changes. The dates of 2023-01-01 and 1700000000 are example future dates and should be updated accordingly.
sudo su - find /MEDIALOCATION/ -type -f -newermt '2023-01-01 01:01:01' touch "FILELOCATION" exit docker container ls docker exec -it plex bash cd /var/run/s6-rc/servicedirs s6-svc -d svc-plex cd /usr/lib/plexmediaserver ./Plex\ SQLite /config/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db select title,added_at,originally_available_at from metadata_items where added_at > 1700000000; update metadata_items set added_at = originally_available_at where added_at > 1700000000; select title,added_at,originally_available_at from metadata_items where added_at > 1700000000; .exit cd /var/run/s6-rc/servicedirs s6-svc -u svc-plex exit