goose-ws / bash-scripts

A collection of bash scripts I've hacked together over time
MIT License
10 stars 3 forks source link

Any chance to enhance sonarr-update-tba.bash if not running Sonarr in a container? #6

Closed rr0ss0rr closed 6 months ago

rr0ss0rr commented 6 months ago

I'm new to Sonarr and have been running into some series with "TBA" titles and saw a post from you mentioning this script. Unfortunately, I do not run Sonarr inside a container but locally on a Mac. Wandering if you would be willing to remove the Docker dependency. Perhaps if the .env file contained containers=("localhost") , you can set containerIp=127.0.0.1 , remove the Docker prefix from the find commands done < <(find "${i}" -type f -name "* TBA *" and change the Sonarr config to $HOME/.config/Sonarr/config.xml?

Thanks

goose-ws commented 6 months ago

Yes, I can add this to my roadmap. I have a similar concept in another script that is not yet published as it's still in alpha testing, but I can port the idea over to the TBA script. The next two weeks are busy for me, but if I can't get it done immediately, I should have it done probably before the end of this month. I'll update when I push the commit.

rr0ss0rr commented 6 months ago

Thanks. Much appreciated

rr0ss0rr commented 6 months ago

Noticed you are performing 2 "finds" 1 for TBA and another for TBD .. You can combine them into 1 via -name "*TBA*" -or -name "*TBD*" or -regex ".*TB[AD].*"

goose-ws commented 6 months ago

Thanks for the regex tip, I'm moderately comfortable with regex, except for whatever engine find seems to use.

Sorry for the delay, it's been a busy month. I did some preliminary testing and as far as I can tell by faking a host-based Sonarr instance, I think the commit I'm about to push should add functionality for your situation. Let me know if it doesn't and I'll troubleshoot further.

rr0ss0rr commented 6 months ago

No problem, I'd be happy to test it out.

rr0ss0rr commented 6 months ago

Looks good reading the config files. I don't have tba files to continue the test but assume at this point all necessary info has already assigned. One point was it was informing me of an update, so proceeded with ./sonarr-update-tba --update which didn't seem to work. Noticed on the case statement that it was checking for "-u"|"--Update", while the --help mentioned "-u"|"--update".

Thanks again for making the localhost change -Richard

goose-ws commented 6 months ago

Not sure how that capital letter made it in there, but thanks for letting me know, I'll fix that right now.

You're welcome. Just let me know if it doesn't work and I'll see what I can do about fixing it.