Yoshi662 / Media_Downloader

A GUI for Youtube-dl
MIT License
2 stars 1 forks source link

Add support for multiple Media Downloader instances/sessions #10

Open Telepon opened 3 years ago

Telepon commented 3 years ago

Right now, Media Downloader can only process one download at a time, freezing while doing so. I understand that adding support for concurrent downloads is a complex matter, but I think there could be a compromise.

You could, instead, open Media Downloader as many times as videos you want to download at the same time.

However, this does not work; if I open two sessions of MD, and start downloading with both, one of them will freeze/crash when starting the reencode process.

WHAT I THINK IS HAPPENING:

For what I know about the way MD works, this seems to be due to the usage of the "Filenames.tmp" file, that stores the names of the files to be converted. In the use case described above, the tmp file is first written by the first download, and then overwritten by the second. At this point, the first download to end will be recoded with the name stored in the tmp file, and the second download to end will have no tmp file to read, and probably throw an internal error that freezes the program.

If we want to add multi-session support, this behaviour must be changed, either by creating an unique "Filenames.tmp" file for each MD session, or doing without this file altogether.

Telepon commented 3 years ago

This feature has been experimentally implemented in my fork of the project. https://github.com/Telepon/Media_Downloader Release with code c7cb8d5.

Pending review by @Yoshi662