ArdaxHz / mdownloader

MangaDex downloader using python. Forked from the repo linked
https://gitlab.com/hitoribocchi/mdownloader
GNU General Public License v3.0
9 stars 1 forks source link

New version issues #14

Closed NLZ closed 3 years ago

NLZ commented 3 years ago

I tried to download title id 1 (Tower of God) which I already had downloaded with older versions. Now it threw this error:

Traceback (most recent call last):
  File "C:\Users\nlz\Code\mdownloader\mdownloader.py", line 128, in <module>
    beforeMain(args)
  File "C:\Users\nlz\Code\mdownloader\mdownloader.py", line 109, in beforeMain
    main(args)
  File "C:\Users\nlz\Code\mdownloader\components\main.py", line 143, in main
    fileDownloader(id, language, route, download_type, save_format, make_folder, covers, add_data)
  File "C:\Users\nlz\Code\mdownloader\components\main.py", line 100, in fileDownloader
    typeChecker(id, language, route, download_type, save_format, make_folder, covers, add_data)
  File "C:\Users\nlz\Code\mdownloader\components\main.py", line 31, in typeChecker
    bulkDownloader(id, language, route, download_type, save_format, make_folder, covers, add_data)
  File "C:\Users\nlz\Code\mdownloader\components\downloader.py", line 315, in bulkDownloader
    json_file = TitleJson(data, series_route, covers)
  File "C:\Users\nlz\Code\mdownloader\components\jsonmaker.py", line 157, in __init__
    super().__init__(data, route, 'manga')
  File "C:\Users\nlz\Code\mdownloader\components\jsonmaker.py", line 31, in __init__
    self.data_json = self.checkExist()
  File "C:\Users\nlz\Code\mdownloader\components\jsonmaker.py", line 69, in checkExist
    "mangaId": chapter_data["manga_id"],
KeyError: 'manga_id'

After deleting the old 1_data.json file the download worked, so I assume the issue is that there is no logic to handle the old json (discard/migrate).

But then another issue popped up that it started to redownload everything under a new name, for example Tower of God - d110 (v02) [The Company].cbz, emphasis on d110, instead of c110.

Downloading chapter 52309 (v02c110) directly only checks that the file (c110) already exists, so only if I do the title download that it decides to save it under a different name.

So I guess something funky is going on here, but I'm too tired to debug tonight: https://github.com/Rudoal/mdownloader/blob/017091e3b820148540fd6d46cd5e34e05f8252ae/components/exporter.py#L57

ArdaxHz commented 3 years ago

The second issue is working as intended, as this series has overlapping chapter numbers which will mess up the order of the downloaded chapters. I'll look at the other issue in the morning.