mangadex-downloader
mangadex-downloader copied to clipboard
Add an option to prioritise download chapters based on some criteria
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:
- Prioritise one group over all others but still download from other groups if no chapter is available from the priority group.
- Prioritise the most recently uploaded chapter - which may contain fixes or improvements over the older upload(s).
- 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.
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.
Automation is great, but even the program asking for feedback would be workable when doing volumes, like printing the options and asking the user to select: ex.
"Volume. 5 Chapter 19 has (2) groups:
1. Group 1 name
2. Group 2 name
Please enter the number you wish to download into the volume:
Automation is great, but even the program asking for feedback would be workable when doing volumes, like printing the options and asking the user to select:
I may agree on program asking for feedback on user. But here's the problem, you don't wanna program asking for a question in a middle of download, the user will be mad if program acted like that. Most of the time, they just leave the program and do anything else.
Based on your example it's possible to ask feedback like that when users downloading a individual chapter, the question will be asked before download begin. However when user downloading a manga or a MangaDex list, the program can't just ask question like that, the program will constantly asking each chapter to user and they get annoyed.
So yeah, i agree to this idea when it's implemented for downloading a chapter. But it's not on my priority list since the program already has --group
option. You might want to create new feature request about this, so other people can help adding this feature including me.
Hello, this feature has been added in commit https://github.com/mansuf/mangadex-downloader/commit/bd25b3ceaa74a98f43f8131c5646fa9e8a120b43 https://github.com/mansuf/mangadex-downloader/commit/32203fa171fb5620c855d6df9cb84f7c6a947a4e. You can test it by installing development version.
Installation with Git & Pip:
pip uninstall mangadex-downloader
pip install -U git+https://github.com/mansuf/mangadex-downloader.git@e7e58653649c803f8961ce4a9a7e1541a62e7837
Installation from Github Artifact CI (bundled executable):
You can download it from here in "artifacts" section
I didn't add --priority
option, but rather adding 2 options --order
and --group-nomatch-behaviour
--order
option is used to change chapter ordering based on when the chapter released and can be read (newest or oldest).
--group-nomatch-behaviour
is for change behaviour chapters group filtering (--group
). The supported values are fallback
and ignore
. Default behaviour is ignore
which is ignoring the chapter group that doesn't match with --group
option. If you set it to fallback
the app will try to find another chapters if none of any group matching from --group
option.
Usage
# Change order chapters to the newest released chapters
mangadex-dl "insert mangadex url" --order newest
# Find another chapters if any of group filtering didn't match
mangadex-dl "insert mangadex url" --group "group_1" --group "group_2" --group-nomatch-behaviour fallback
If you have problem or bugs, let me know 👍.