mansuf / mangadex-downloader

A command-line tool to download manga from MangaDex, written in Python.
https://mangadex-dl.mansuf.link/
MIT License
450 stars 36 forks source link

Add an option to prioritise download chapters based on some criteria #106

Open qx6ghqkz opened 2 months ago

qx6ghqkz commented 2 months ago

The idea

When downloading a volume, if there are multiple uploads of the same chapter by different groups, there is currently no way to decide which chapter takes priority unless you blacklist specific groups. The --group option only allows you to choose one group to download from.

If there are many chapters uploaded by different groups in the same language, it would be nice to have options for the following:

  1. Prioritise one group over all others but still download from other groups if no chapter is available from the priority group.
  2. Prioritise the most recently uploaded chapter - which may contain fixes or improvements over the older upload(s).
  3. Prioritise the largest chapter (in terms of file size) for the highest scan quality available or prioritise the smallest chapter, for saving storage space.

Example usage: --priority {GROUP_ID,newest,oldest,largest,smallest}

Why this feature should be added to the app ?

It will give us greater control over what we download. At the moment, I have to download all of the chapters using --group "all" and then manually delete the chapters I do not want. Without specifying --group "all, mangadex-dl seems to randomly decide which upload to download if there are multiple uploads of the same chapter in the same language. Giving the user control over which chapter mangadex-dl prioritises would be a great improvement to the user experience.

mansuf commented 2 months ago

For your information, --group option does support multiple groups or users and this behaviour is exists since version 2.6.0. I just forgot to update the documentation so it only show usage for single group (Writing documentation is pain).

mangadex-dl "mangadex_url_here" --save-as cbz-volume --group "group_id_1" --group "group_id_2" --group "group_id_3"

v2.6.0 changelog The implementation

However, i don't deny your ideas to prioritise chapters and it might be useful for people who want total control for their downloads. I will add this on v3.0.0 to-do list

But uhhhhhh, i may don't have time to do code (especially doing documentation) because college times is crazy these days. So don't expect this feature is implemented earlier.