MrS0m30n3 / youtube-dl-gui

A cross platform front-end GUI of the popular youtube-dl written in wxPython.
The Unlicense
9.3k stars 1.59k forks source link

Autonumber option is not working #325

Open rodnvs opened 6 years ago

rodnvs commented 6 years ago

Please follow the guide below

WARNING

All invalid issues will be rejected!!


Before going further


What is the purpose of your issue?

What operating system do you use ?

Windows 10

List of actions to perform to reproduce the problem:

  1. .. Insert some youtube URL
  2. .. Select autonumber string to filenames
  3. .. run

What is the expected behaviour ?

Each downloaded file must have a sequencial number in its filename

What happens instead ?

Each downloaded file have 00001 number in its filename

I tried to download lots of videos adding them to the proper field and also selecting the "autonumber" string in config. But all download files have 00001 in its filename instead having 00001, 00002, 00003, and so...

cdsxza commented 6 years ago

I have experienced the same issue. I used youdube-dlg v0.4 with default youtube-dl and then updated youtube-dl to the latest 2018.6.19.0 version and still the same - each file is numbered with "00001". My machine is running Windows XP on Pentium4 CPU: http://www.cpu-world.com/sspec/SL/SL7EY.html I used special Zeranoe's ffmpeg build in order to make it work on Windows XP: https://ffmpeg.zeranoe.com/forum/viewtopic.php?f=13&t=3572

nodiscc commented 6 years ago

@rodnvs I don't have a windows machine to reproduce on right now, do you have the same problem with regular command-line youtube-dl ? For example

My machine is running Windows XP on Pentium4 CPU I used special Zeranoe's ffmpeg build in order to make it work on Windows XP

@cdsxza spare that good old machine and install Debian on it! It would run great with up-to-date software. It will also be difficult to get support for a deprecated/unknown/custom OS/environment.

rodnvs commented 6 years ago

Hi @nodiscc, I've tested this function in youtube-dl with a batch list file and it's working fine, this seems to be an issue in the youtube-dl-gui. Apparently, if you insert multiple links in the youtube-dl-gui panel, it does not recognize this as a youtube-dl batch list

nodiscc commented 6 years ago

I can confirm that (autonumber) format string is not working and all downloads appear with a sequence number of 00001. This is because youtube-dl-gui creates a different youtube-dl process for each download (https://github.com/MrS0m30n3/youtube-dl-gui/blob/72cef81e1a1728962cb7eaa4ed9b526bf2aa9cff/youtube_dl_gui/downloaders.py#L163). Therefore each process only "sees" one URL. Analogy with command-line:

# expected
$ youtube-dl --format mp4 -o '%(autonumber)s.%(ext)s' 'https://www.youtube.com/watch?v=9Z4Mx9nlcPo' 'https://www.youtube.com/watch?v=3Yuqxl284cg'
[youtube] 9Z4Mx9nlcPo: Downloading webpage
[download] Destination: 00001.mp4
[youtube] 3Yuqxl284cg: Downloading webpage
[download] Destination: 00002.mp4

# actual
$ youtube-dl --format mp4 -o '%(autonumber)s.%(ext)s' 'https://www.youtube.com/watch?v=9Z4Mx9nlcPo' 
[youtube] 9Z4Mx9nlcPo: Downloading webpage
[download] Destination: 00001.mp4
$ youtube-dl --format mp4 -o '%(autonumber)s.%(ext)s' 'https://www.youtube.com/watch?v=3Yuqxl284cg'
[youtube] 3Yuqxl284cg: Downloading webpage
[download] Destination: 00001.mp4       <---------- same number

I don't think this is easily fixable without reworking how youtube-dlg calls youtube-dl (and losing parallel jobs) The logical way would be to implement an autonumber logic separate from youtube-dl's command line.

heit0r commented 5 years ago

Same thing here. The videos come with 00001, 00001, 00001 instead of 00001, 00002, 00003.

bigcjat commented 5 years ago

I can confirm the same issue when running in a script on Linux/DietPi. It downloaded 5 video files and they were all labeled 0001