axcore / tartube

A GUI front-end for youtube-dl, partly based on youtube-dl-gui and written in Python 3 / Gtk 3
GNU Lesser General Public License v2.1
1.92k stars 105 forks source link

Error when downloading video using custom file name format #608

Closed EdwardChanCH closed 6 months ago

EdwardChanCH commented 6 months ago

OS: Windows 11 Home

Tartube: v2.4.386

Video: (or any YouTube video) https://www.youtube.com/watch?v=v_FmcHuUK0s

Description: This bug occurred when I edited (applied) the filename format (in Classic Mode's settings menu) from "Title + ID" to "Custom: Video + URL". This error did not occur when using either the "Title" or "Title + ID" options. I need to use the "Custom" option as I only want video titles with URLs appended (just like using the yt-dlp CLI) but without the other .info files being generated. I tried updating yt-dlp (as suggested by the error pop-up) but nothing changed.

image_1 image_2 image_3

To recreate this error, go to Classic Mode --> Edit download options... --> Files --> change "Title" to "Custom" --> in the options, change "Video ID" to "Video URL" and then click "Add". The file output template should become "%(title)s-%(url)s.%(ext)s". Click "Apply" and "Ok". Then try downloading any video/ playlist using Classic Mode.

Thanks for reading.

axcore commented 6 months ago

Please copy and paste all of the yellow text at the top of the Output tab, some of which is not visible in your screenshot.

EdwardChanCH commented 6 months ago

Please copy and paste all of the yellow text at the top of the Output tab, some of which is not visible in your screenshot.

yt-dlp --newline -i --hls-prefer-native --write-description --write-info-json --cookies C:/Users/XXX/Documents/#TarTube/cookies.txt --write-thumbnail --windows-filenames --output C:/Users/XXX/%(title)s-%(url)s.%(ext)s https://www.youtube.com/watch?v=v_FmcHuUK0s

axcore commented 6 months ago

On my Linux system, I get different results, using exactly the same download options:

/home/ra/.local/bin/yt-dlp --newline -i --hls-prefer-native --write-description --write-info-json --cookies /home/ra/tartube-data/cookies.txt --write-thumbnail --output "/home/ra/tartube-data/Unsorted Videos/%(title)s-%(url)s.%(ext)s" --windows-filenames https://www.youtube.com/watch?v=v_FmcHuUK0s

In your screenshot, yt-dlp is inserting a very long (and incorrect) URL; on my system, yt-dlp inserts NA for the URL:

[info] Writing video description to: /home/ra/tartube-data/Unsorted Videos/Huge explosion as Ukraine strikes Russian warship | BBC News-NA.description

Both results seem to be incorrect, so I suggest reporting the problem on the yt-dlp issues page. (It is apparently not a Tartube problem.)