Girbons / comics-downloader

tool to download comics and manga in pdf/epub/cbr/cbz from a website
MIT License
457 stars 49 forks source link

MangaDex: Add "download all" option #42

Closed bake closed 4 years ago

bake commented 4 years ago

Hi, I've added the option to download all chapters of a manga from MangaDex. But before considering merging this, there are a few questions:

It currently switches between "download one chapter" and "download all chapters" based on the given URL. For example, if you pass mangadex.org/title/123, it'll download all and if you pass mangadex.org/chapter/123 it'll just download one chapter. How should it, for example, behave, if one doesn't set the -all flag but passes a manga URL?

Another problem are different languages: It uses the same flag as MangaRock ( -country), but expects "language codes" like gb or sa instead of names. Should this be translated internally or would it be enought to note it in the readme?

Hope this helps #41.

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 219


Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/sites/loader.go 0 1 0.0%
pkg/sites/mangadex.go 7 23 30.43%
<!-- Total: 7 24 29.17% -->
Totals Coverage Status
Change from base Build 216: -1.5%
Covered Lines: 636
Relevant Lines: 804

💛 - Coveralls
Church- commented 4 years ago

@bake Great to see this, wanting to move off mangarock given they're planning to go to a fully legit platform in the near future.

Girbons commented 4 years ago

Hi @bake thanks for this PR!

if you pass mangadex.org/title/123, it'll download all and if you pass mangadex.org/chapter/123 it'll just download one chapter. How should it, for example, behave, if one doesn't set the -all flag but passes a manga URL?

By default if you pass a manga URL (mangadex.org/title/123) -all flag should be implicit because the user didn't specify a chapter.

Another problem are different languages: It uses the same flag as MangaRock ( -country), but expects "language codes" like gb or sa instead of names. Should this be translated internally or would it be enought to note it in the readme?

I think that we can note it in the readme for now.