2025-05-30, 08:22 PM
(This post was last modified: 2025-05-31, 12:05 AM by koenlol. Edited 1 time in total.)
This was bothering me too. I found a solution that has been working well for me, and I figured I'd post it in case someone comes across this thread looking for an answer like I did.
I configured Jellyfin to use file creation date in the 'Date added behavior for new content' setting. Then, I set up a custom script that:
You'll need to change the variables at the top of the script. After that, set it to run on 'Grab' and 'Upgrade' events in Radarr/Sonarr (Settings > Connect > Custom Script).
It's been working well on my server (ubuntu), but I don't know how it will work in other environments. I think the way your folder structure and naming schemes are set up is important. A log file should be created next to the script that might help with trouble-shooting.
I configured Jellyfin to use file creation date in the 'Date added behavior for new content' setting. Then, I set up a custom script that:
- On 'Grab' looks for existing versions of the media in the library folders. If found, it extracts the file's creation date and saves it to a temporary file.
- On 'Import'/'Upgrade' changes the newly imported file's creation date to match the original, and deletes the temporary file.
- Triggers a Jellyfin library rescan after importing if an API key is provided.
You'll need to change the variables at the top of the script. After that, set it to run on 'Grab' and 'Upgrade' events in Radarr/Sonarr (Settings > Connect > Custom Script).
It's been working well on my server (ubuntu), but I don't know how it will work in other environments. I think the way your folder structure and naming schemes are set up is important. A log file should be created next to the script that might help with trouble-shooting.