New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: "Add to download queue" defaults to adding an entire channel if a short video URL is added. Downloading an entire channel does not download shorts. #385
Comments
Just wanted to add - hell of a report, thanks for the detail! This is a known shortcoming with recent changes with Youtube/yt-dlp. and while not nearly as specific, you referenced a very related request (minus defaulting to /video) #368 |
Thanks for collecting this here. This will require quite some significant changes to accommodate the changes in the YouTube interface recently. But it's also a good opportunity, as until now, we didn't had a good way to automatically filter out shorts from the download queue. In any case, thanks for all the details, that is going to help a lot when working on that. |
Thanks for the update. Happy to help if you need a hand bug checking anything. I'm an awful programmer but I excel in finding new and exciting ways to break software. |
BTW, you still can just pass the video ID, wiki, yt-dlp handles that correctly, and TA will add it as a regular video. |
That's a much better workaround. I clearly didn't RTFM. Thanks for that. |
Sorry, forgot to tag the commits here, but that is now handled properly in v0.3.1. Please update. Thanks for reporting! |
I've read the documentation
Operating System
Fedora 36, Docker, Latest image tag.
Your Bug Report
Describe the bug
The "Add to download queue" function in the Downloads page performs a few checks to determine if the URL provided is a video, playlist, or channel. If the URL does not match any of these checks, the URL is defaulted to a channel. As a result, if a shorts URL is used (example https://www.youtube.com/shorts/6QImkSXqwao), the detect_from_url function in helper.py will not correctly set the URL as a video, because there is no if statement to handle a URL matching "/shorts/".
Since there is no check for shorts in the URL, the default option on line 195 will return download type as a channel. When the entire channel is processed, all regular videos are add to the queue, but the shorts are not added since there is no processing for shorts in get_last_youtube_videos.
Currently the only way to download a short is to convert the URL to a standard video by replaceing the /shorts/ part of the URL with /watch?v=edit: shorts can be downloaded by video ID alone per the wiki.When adding an entire channel to the download queue, short videos are not included becuase get_last_youtube_videos function in subscriptions.py is only checking for videos in https://www.youtube.com/channel/{channel_id}/videos.
Adding a shorts channel page, example https://www.youtube.com/@gensho_yasuda/shorts only loads normal videos.
As a result, it is not possible to download a short using the standard shorts URL, add an entire channel to download normal videos and short videos together, or subscribe to a channel to download new shorts. This may apply to streams as well though I did not test this.
Steps To Reproduce
Expected behavior
Two parts to this.
I believe that it might be better to not default to channel and instead throw an error if the URL does not match channel, video, playlist, shorts, streams, etc.
I think the only place that would need to be updated to add short and stream support at a really simple level is the get_last_youtube_videos function in subscriptions.py. It looks like there is only a check for the URL ending in /videos when looking up a channel ID. I think this would need to also perform a check to see if any shorts or streams exist and if so combine those together to add to the download queue.
I made an attempt that kind of worked, though I don't know python. I'm sure this is shitty code and has some unexpected problems 😭.
Relevant log output
Anything else?
Apologies if this is a known issue. I tried to search for anything about shorts and not much came up. Thanks for all your work on this project. It really is useful and much appreciated.
The text was updated successfully, but these errors were encountered: