Add replaced file name to Custom post processing script on upgrade

Hi,

I use a custom post processing script to upload my video files to Cloud storage(3 different providers) using rclone. I use unionFS and a Rclone mount(Read only) so that Sonarr is unaware of this and keeps everything in sync. When sonarr downloads an upgraded episode the file is correctly uploaded to the cloud however the original lower quality file remains there orphaned forever. I was originally getting around this by using the knowledge that the new file would have the same filename as the old one(just with a possible different extension) to delete all files with that filename.* from my cloud storage. But now in order to download better quality subtitles(and upgraded subtitles in the future) i am disabling episode renaming leaving the original scene filename in place which doesn’t let me use this deletion method anymore.

Is it possible to add a $EpisodeFile_OriginalFileName to the outputs on upgrade? It could just be blank if it was just a download and not an upgrade.

I hope i’ve explained that properly,

Thanks,

Yeah, that makes sense, there could be multiple files, so there will be DeletedRelativePaths and DeletedPaths, separated by | when it’s an upgrade, otherwise they won’t be set. This will be in develop soon.

Thanks Markus!

Fantastic to hear :slight_smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.