mhogomchungu / media-downloader

Media Downloader is a Qt/C++ front end to yt-dlp, youtube-dl, gallery-dl, lux, you-get, svtplay-dl, aria2c, wget and safari books..
GNU General Public License v2.0
1.34k stars 103 forks source link

please add support for a checkbox option that when enabled automatically removes completed downloads from the batch downloader list as soon as they are completed #313

Closed deee167 closed 10 months ago

deee167 commented 10 months ago

please add support for a checkbox option that when enabled automatically removes completed downloads from the batch downloader list as soon as they are completed.

Please also add a button to the batch downloader tab that when clicked even with downloads in progress, will remove all completed downloads from the list.

mhogomchungu commented 10 months ago

It is not possible to remove entries while downloads are still going on because removed entries will cause table indexes to change causing still downloading progress report to go to a wrong entry.

The best that can happen is to hide entries.

deee167 commented 10 months ago

That was an implementation decision. This should be possible depending on how you implement the list and related architecture. Don't you have a background object listening to the process and getting status updates? Just unbind that from the list? Isn't the list made up of GUI components? Can't you just remove the GUI component from the list? Why is the index in the list tied to the progress update? The location in the list and the object(GUI or otherwise) that the update goes to should be independent. Not sure where the issue lies but it would be really useful to have this feature.

Please implement this feature.

mhogomchungu commented 10 months ago

Don't you have a background object listening to the process and getting status updates?

Nope.

By design, there is no object that is doing the tracking or listening and things are done as follows:-

  1. User populates the UI with media they want to download.
  2. User clicks download.
  3. A list of entries to be downloaded is generated based on their position in the UI(based on their index).
  4. "Controlled chaos" ensues when downloading starts with N concurrent downloads and each download takes an index number that tells it where to put its output in the UI.
  5. When a process finish, its finish event goes to the list in step 3 above and starts another download with and index that is waiting to be downloaded.
  6. When cancelling a download, a broadcast message with an index value is sent to all running processes and the process with that index terminates itself.

Entry number 4 and 6 above are what makes it impossible to delete entries in the UI while downloading is still happening because the UI will end up having wrong index values for running processes.

Anyway, feature is already implemented but its off by default. You are not the first person to ask about this feature and congrats for asking before the slot in the configuration tab is taken by another option.

With hiding of rows, what you will notice is gaps in the UI of index values and it is possible to unhide them.

Screenshot_20230826_172049 Screenshot_20230826_171913

deee167 commented 10 months ago

Thanks for the explanation, but you could implement it so that removing downloads works while others are already downloading. This is still an implementation decision that was made that you could change.

I don't see the auto hide options. Is this a new feature?

Thanks

deee167 commented 10 months ago

I don't see this option and there is no new version to download of the app.

mhogomchungu commented 10 months ago

It is a new feature added three days ago. New version will be released on September 1st, 2023.

Message ID: @.***>

deee167 commented 10 months ago

can you please also include issue 312 https://github.com/mhogomchungu/media-downloader/issues/312

seems like it should be easy to add as the functionality is already there but the trigger to start downloads is different. i would really love that feature too.