Tdarr_Plugins
Tdarr_Plugins copied to clipboard
Add a flow to notify Bazarr
I have Radarr/Sonarr downloading media currently, then notifying Tdarr for processing, which then notifies Radarr/Sonarr to update the changes.
Bazarr has 2 options for downloading subtitles:
- Automatic when Radarr/Sonarr finishes importing or upgrading (default)
- Defer searching of subtitles until scheduled task execution (6h, 12h, 24h)
In automatic mode, it usually downloads the subtitles faster than Tdarr processes the movie, which are then automatically deleted by Radarr/Sonarr when the filename changes (it thinks it's a new movie and clears out the folder). And then Bazarr downloads subtitles a second time for the new file.
I would like to request a 'Notify Bazarr' addition to the flows. Bazarr provides endpoints Tdarr could hit:
curl -d "sonarr_episodefile_id=$sonarr_episodefile_id" -H "x-api-key: ####" -X POST http://localhost:6767/api/webhooks/sonarrcurl -d "radarr_moviefile_id=$radarr_moviefile_id" -H "x-api-key: ####" -X POST http://localhost:6767/api/webhooks/radarr
I would use these right after the Notify Radarr/Sonarr step
I could add them to Radarr/Sonarr, but there's no way to differentiate between a download/upgrade and Tdarr's work, so they would be better suited as part of the flows.
Thank you!
Not your proposed option, but you could use the classic Tdarr_Plugin_scha_rename_based_on_codec_schadi plugin which also renames your subtitle files.
All in all I do think that's a better solution (renaming the subs as well as the video file), as you'd be downloading the same thing twice.
Thank you for the suggestion. Since I am only remuxing into a specific container, and not changing any of the other encoding properties, the filenames are not changing besides the extension for the movie file. The subtitles would not need renamed. And Radarr/Sonarr will still delete extras when it sees the movie file being renamed to a new extension.
I'm seeking a way to tighten the pipeline and call Bazarr directly after Radarr/Sonarr is informed of the new movie file. I cannot prevent *arr from deleting extra files, so I want to tell Bazarr to download the subtitles only after Radarr/Sonarr is informed of the new movie file, and before Bazarr's 6h/12h/24h cycle.