alexta69 / metube

Self-hosted YouTube downloader (web UI for youtube-dl / yt-dlp)
GNU Affero General Public License v3.0
4k stars 263 forks source link

recursion detected, skipping #272

Closed 1RandomDev closed 2 months ago

1RandomDev commented 1 year ago

When I try downloading a video from thisvid.com it loads a little bit and then nothing happens. In the logs it looks like the URL is added twice which causes Metube to think it already has downloaded the video. This are the logs:

INFO:ytdl:adding https://thisvid.com/videos/...: quality='best' format='mp4' already=None folder=None custom_name_prefix=''
INFO:ytdl:adding https://thisvid.com/videos/...: quality='best' format='mp4' already={'https://thisvid.com/videos/...'} folder=None custom_name_prefix=''
INFO:ytdl:recursion detected, skipping
INFO:aiohttp.access:172.17.0.1 [31/May/2023:00:46:35 +0000] "POST /add HTTP/1.1" 200 260 "https://metube.box/" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
PikuZheng commented 1 year ago

Try to assign a name when adding the url? image

1RandomDev commented 1 year ago

Exactly same problem, except that now the value custom_name_prefix is set in the logs too both times it tries to add the video.

1RandomDev commented 10 months ago

Since there's no activity on this for a long time I tried debugging it myself and probably found the problem. Apparently yt-dlp is not extracting the video information from ThisVID if the option extract_flat is enabled. So a quick and easy fix would be just adding YTDL_OPTIONS={"extract_flat": false} to the options. (But I'm not sure what consequences this will have when downloading large playlists since the option apparently tells yt-dl to not extract every single video on a playlist.)