RandomNinjaAtk / docker-sonarr-extended

Sonarr (develop) with bash scripts to automate and extend functionality.
GNU General Public License v3.0
67 stars 15 forks source link

How to specify video resolution for Youtube-Series-Downloader.bash script? #40

Closed csjoh closed 1 year ago

csjoh commented 1 year ago

Hi,

I'm looking for a way to specify which resolution I want Youtube-Series-Downloader.bash to download, but I can't seem to find any way to do it except to change the script itself. This is at best a temporary measure as all the files in the "extended" folder are recreated when the container is restarted.

In any case, I changed the start of lines 124 and 126 from

yt-dlp -f "$videoFormat" (...)

to

yt-dlp -f "bestvideo[height<=1080][ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" (...)

As the original lines included -f "$videoFormat", I went looking for where that variable was set, but was unable to find it. Is there any way to specify the format?

I'm running sonarr-extended on unRAID 6.11.5, if that matters.

RandomNinjaAtk commented 1 year ago

Setting videoFormat as a ENV setting for the container to what you want should do the job.

Edit: It will override the default setting found in this file:

https://github.com/RandomNinjaAtk/docker-sonarr-extended/blob/main/amd64.dockerfile

RandomNinjaAtk commented 1 year ago

Added to documentation, give it a test and see if its resolved...

csjoh commented 1 year ago

Yes, it's working! Thank you! :)