mateoradman / bazarr-bulk

Bazarr Bulk Actions CLI - Bulk sync your subtitles with ease
https://crates.io/crates/bazarr-bulk
MIT License
30 stars 1 forks source link

Add option to skip previously synced #35

Open oscarc23 opened 2 weeks ago

oscarc23 commented 2 weeks ago

Hi, the tool is great! It helped me a lot with syncing subtitles for 200 movies and 50 shows I had already on my server before I enabled the option to do it automatically on download. But one problem I found was that the ssh session to the server I was running the tool from disconnected and closed the process, when I ran it again it started going over subtitles that were already synced before. Could you add an option to enable checking if the subtitle has been synced before and if so skip it? Thanks!

mateoradman commented 1 week ago

Unfortunately, this feature would require a database where bazarr-bulk would store the Last Synced date and based on that we would be able to compare when the subtitle was last synced (or performed any other action on). However, there is an option to manually skip certain number of movies/tv-shows by either:

a) filtering by ids using the --ids flag and providing a comma-separeted list of ids of movies/shows you'd like to sync b) skipping X number of records by using the --offset flag and skipping any number of records you've processed.

Of course, both a) and b) require you to know where the program stopped which is sometimes difficult to track if your ssh session closed abruptly. Therefore, some kind of a bazarr-bulk log stored on disk would make sense for such scenarios, where people would look into and see exactly during which movie/show the program was interrupted on.

oscarc23 commented 1 week ago

Hi Mateo, thanks for replying.

I'm trying to figure out a script myself to do a bulk check every week to find subtitles that have not been synced after the lasted download/upgrade of the movie/episode. I would have done a fork of your project, but I'm doing this on python as I have no experience with rust.

My approach is check if a sync (action: 5) has been performed in the movie history (/api/movies/history?radarrMovieId=2) after the download date on the Radarr server, which requires connecting to both.

Maybe it would be possible that your script could accept a cli parameter to perform a sync on anything that doesn't has a history record of an action 5 after a supplied date, no matter the download date on Radarr.