Tzahi12345 / YoutubeDL-Material

Self-hosted YouTube downloader built on Material Design
MIT License
2.64k stars 275 forks source link

Error with spaces in the subscription folder path #285

Open scavone opened 3 years ago

scavone commented 3 years ago

I'm running the nightly build and noticed an issue on start that caused it to not perform a subscription check. My subscription feed name has spaces in it which broke the -o flag and likely the --download-archive flag. I logged into the Docker container and enclosed the path with single quotes and it ran successfully.

Error observed in the logs after booting up

ytdl_material_1  | 2020-12-13T17:51:49.429Z ERROR: Command failed with ETXTBSY: /app/node_modules/youtube-dl/bin/youtube-dl -i -o subscriptions/channels/Nathan Mueller Overlanding & Offroad/%(title)s.%(ext)s -ciw --write-info-json --print-json -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4 --download-archive /app/subscriptions/archives/Nathan Mueller Overlanding & Offroad/archive.txt --write-thumbnail https://www.youtube.com/c/NathanMueller/videos
ytdl_material_1  | spawn ETXTBSY

I logged into the container and tried to manually execute the same task and received this error

/app # /app/node_modules/youtube-dl/bin/youtube-dl -i -o subscriptions/channels/Nathan Mueller Overlanding & Offroad/%(title)s.%(ext)s -ciw --write-info-json --print-json -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4 --download-archive /app/subscriptions/archives/Nathan Mueller Overlanding & Offroad/archive.txt --write-thumbnail https://www.youtube.com/c/NathanMueller/videos
sh: syntax error: unexpected word (expecting ")")
sh: syntax error: unexpected ")"

I then enclosed the path with a single quotes and it appears to be successful

/app # /app/node_modules/youtube-dl/bin/youtube-dl -i -o 'subscriptions/channels/Nathan Mueller Overlanding & Offroad/%(title)s.%(ext)s' -ciw --write-info-json --print-json -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4 --download-archive '/app/subscriptions/archives/Nathan Mueller Overlanding & Offroad/archive.txt' --write-thumbnail https://www.youtube.com/c/NathanMueller/videos
Tzahi12345 commented 3 years ago

I then enclosed the path with a single quotes and it appears to be successful

This may be an easy fix then! When you enclose it in quotes, does the resulting file have quotes in it or it ends up in the correct place (i.e. the expected behavior)?

scavone commented 3 years ago

Not sure just yet if the folder path would be as expected since the channel hasn't posted a new video yet. I'll reply back as soon as I can test this.