TheCaptain989/radarr-striptracks

Filename format renaming

Closed this issue · 10 comments

Having Renaming of the files enabled often there is changing something and a new rename needs to be done after striptracks. It would be cool, if at the end of processing the rename function of sonarr or radarr could be called.

Could you give an example of the issue?
I'm not sure I understand.

This is my standard movie format from media management of radarr
{Movie CleanTitle} {(Release Year)} [imdbid-{ImdbId}] - {Edition Tags }{[Custom Formats]}{[Quality Full]}{[MediaInfo 3D]}{[MediaInfo VideoDynamicRangeType]}{[Mediainfo AudioCodec}{ Mediainfo AudioChannels}]{MediaInfo AudioLanguages}[{Mediainfo VideoCodec}]{-Release Group}

If I now remove unwanted Audio languages the information will often change. At the moment it will remain with the information before running striptracks, but it would be better it would be updated.

Okay, I see. Let me think on that and do some experimenting.

Not sure if it is the right one, but the radarr API has a rename call
[https://radarr.video/docs/api/#/RenameMovie/get_api_v3_rename]rename

I figured out how to do this and testing has gone well. I'll probably push a development build with this feature in the next few days.

I've run into a roadblock. I was trying to be fancy and get rid of the Rescan that my script calls at the end of the remux and use the native ManualImport API to load the new movie file directly into Radarr. This has a lot of benefits because it is both faster and allowed me to clean up a lot of complex if/then trees and confusing logic in my code design. This would necessarily have to happen before the rename API call (e.g. Radarr has to know about the movie first).

An issue arises with this method, though, because Radarr is apparently locked at one import job at a time. Because my script is already running as part of an import job, if it creates another job, that just goes into a queue and doesn't start executing until my script ends. My script can't end before it calls the rename API, and that can't be called until the import finishes. Grrrrrr.

I think I may be stuck with my original Rescan call. Oh, well. Back to to the drawing board.

Wow, hadn‘t thought this is that complex.

Wow, hadn‘t thought this is that complex.

No worries.

I just created a new branch and uploaded the new script.

I'm still testing myself, but if you are brave, you can pull this new version by setting your DOCKER_MODS variable to thecaptain989/radarr-striptracks:latest. Testing feedback would be welcomed.

The new version addressed this issue and has a lot of changes under the hood.

Seem to work fine. A little bit irritating was, that now after „Movie Downloaded“ the last message via pushover for a film is „Movie File Deleted“. But in the history other order is shown with the rename icon last.
So really fully automated now. Thank you very much.

Seem to work fine. A little bit irritating was, that now after „Movie Downloaded“ the last message via pushover for a film is „Movie File Deleted“. But in the history other order is shown with the rename icon last.

Yeah, my hope was that I could call the ManualImport API and that would show up in the history, but as I said it seems like Radarr/Sonarr only allow one import task to run at a time.

Please let me know how it goes. I'd love to see some log files from the striptracks.txt log file if you're willing to share.