frozenpandaman / mangadex-dl

Download manga from MangaDex.org
GNU General Public License v3.0
238 stars 38 forks source link

Skip existing downloads + fixed a small bug #39

Closed ArjixWasTaken closed 3 years ago

ArjixWasTaken commented 3 years ago

It now doesn't download a page that already exists, or even a whole chapter if it already exists (in cbz). And also I fixed the manga_id extraction from the url, since mangadex now includes the title of the manga in the uri.

ArjixWasTaken commented 3 years ago

I believe that this is safe to merge. Why do I believe that? Because an incomplete download has the .temp extension, which is later removed when it's complete. So there is no way that it will have any accidents like skipping the download of a page when the existing page is corrupted.

Of course this doesn't apply to the cbz archives since well...I don't think there will ever be an error in their creation.

ArjixWasTaken commented 3 years ago

Previews: image image

Chapter 1 was not downloaded whilst chapter 2 was. So running the script only downloaded chapter 1.

ArjixWasTaken commented 3 years ago

PS: If I sound cocky in any way, it's just how I talk online, don't let it affect you.

orbea commented 3 years ago

I tested this and it works for me, thanks. However I can't comment on the quality of the python code, you will have to wait for @frozenpandaman there.

I don't mean to nitpick, but it would be nice if this could be rebased into coherent commits that make one complete change at a time.

orbea commented 3 years ago

Actually I see one new issue, I am not sure if this is something mangadex changed or from this PR?

In Azumi (https://mangadex.org/title/51e1b2f2-8e20-4ece-a271-81959e37e22d/azumi) for the latest three chapters it will download:

c298 [ & HappyScans!]
c299 [ & HappyScans!]
c300 [ & HappyScans!]

When the chapters list two groups so it should presumably be:

c298 [Guren no Heya Kara & HappyScans!]
c299 [Guren no Heya Kara & HappyScans!]
c300 [Guren no Heya Kara & HappyScans!]
ArjixWasTaken commented 3 years ago

Actually I see one new issue, I am not sure if this is something mangadex changed or from this PR?

In Azumi (https://mangadex.org/title/51e1b2f2-8e20-4ece-a271-81959e37e22d/azumi) for the latest three chapters it will download:

c298 [ & HappyScans!]
c299 [ & HappyScans!]
c300 [ & HappyScans!]

When the chapters list two groups so it should presumably be:

c298 [Guren no Heya Kara & HappyScans!]
c299 [Guren no Heya Kara & HappyScans!]
c300 [Guren no Heya Kara & HappyScans!]

Nice catch! Yes, it was indeed from my PR, I accidentally had indented some code.

frozenpandaman commented 3 years ago

Hi, I'm sorry but there is way too much going on here. @orbea put it well by saying "it would be nice if this could be rebased into coherent commits that make one complete change at a time." It's really hard for me to figure out what code has even changed from the beginning to the end of this.

I fixed #37 (and only that issue) in 222789e and bumped the script to v0.5.1.

If you want to add the functionality to skip existing files, both images and zips (the .temp issue seems to be a fine solution to prevent corrupted images not getting redownloaded/fixed) please do so by making a separate PR, preferably with the changes all one coherent commit. And please try to test to make sure it hasn't introduced other bugs too. :D

ArjixWasTaken commented 3 years ago

Hi, I'm sorry but there is way too much going on here. @orbea put it well by saying "it would be nice if this could be rebased into coherent commits that make one complete change at a time." It's really hard for me to figure out what code has even changed from the beginning to the end of this.

I fixed #37 (and only that issue) in 222789e and bumped the script to v0.5.1.

If you want to add the functionality to skip existing files, both images and zips (the .temp issue seems to be a fine solution to prevent corrupted images not getting redownloaded/fixed) please do so by making a separate PR, preferably with the changes all one coherent commit. And please try to test to make sure it hasn't introduced other bugs too. :D

Bruh You can just view all of the changes this PR has against the master repo ...

Blatzar commented 2 years ago

Hi, I'm sorry but there is way too much going on here. @orbea put it well by saying "it would be nice if this could be rebased into coherent commits that make one complete change at a time." It's really hard for me to figure out what code has even changed from the beginning to the end of this.

If only there was a way to view the total diff :pensive: image

frozenpandaman commented 2 years ago

I'm aware. I viewed it.

Let me reiterate: "If you want to add the functionality to skip existing files […] please do so by making a separate PR." Of course, other changes, if separated out into separate, coherent PRs, are welcome too.

This is all pretty irrelevant now since the code has been changed a lot since the time of this PR.

@Blatzar You've never commented or contributed to this repository before. But you did leave this out-of-the-blue comment coincidentally minutes after @ArjixWasTaken spammed up another unrelated issue. Curious.

EDIT: Oh, and you both have cheese-themed stuff on your profile. An alt? Or getting friends to do your bidding? lol oh boy, how fun