mansuf / mangadex-downloader

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

Cover image not being replaced #33

Closed TILAD-X closed 2 years ago

TILAD-X commented 2 years ago

I was updating a manga and the code stopped executing as soon as it tried to update the cover image. Here are all the displayed messages:

[INFO] Using English language [INFO] Downloading cover manga Yofukashi no Uta file_sizes: 0%| | 0.00/138k [00:00<?, ?B/s][ERROR] Unhandled exception, FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'Ongoing - Hiatus\Yofukashi no Uta\cover.jpg.temp' -> 'Ongoing - Hiatus\Yofukashi no Uta\cover.jpg' Traceback (most recent call last): File "mangadex_downloader\cli__init__.py", line 57, in _main File "mangadex_downloader\cli\download.py", line 21, in download File "mangadex_downloader\cli\url.py", line 167, in call File "mangadex_downloader\cli\url.py", line 81, in download_manga File "mangadex_downloader\main.py", line 407, in download File "mangadex_downloader\utils.py", line 60, in download File "mangadex_downloader\downloader.py", line 138, in download FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'Ongoing - Hiatus\Yofukashi no Uta\cover.jpg.temp' -> 'Ongoing - Hiatus\Yofukashi no Uta\cover.jpg'

The command line I used was:

..\mangadex-dl\mangadex-dl "OngoingList.txt" --folder ".\Ongoing - Hiatus" --use-chapter-title --no-group-name

I have run this command line previously without issue, and this was the only manga in the list that had this occur, so I presume the cover image on Mangadex was updated. I updated from 1.6.2 to 1.7.2 and the error occurred again. I can confirm that page images are replaced when the ones I have are different from what is on the server. I was able to get the manga to update after deleting the existing cover.jpg.

mansuf commented 2 years ago

This was fixed in v2.0.0. But it's not released yet and still in development.

I see you're using bundled executable, so you might wanna wait until v2.0.0 is released. Or if you have git and python installed and you're familiar with terminal stuff. You can try install development version.

py -3 -m pip install git+https://github.com/mansuf/mangadex-downloader.git@v2.0.0

# or 

# This was latest stable commit
py -3 -m pip install git+https://github.com/mansuf/mangadex-downloader.git@9b78a25d314ff7ffe3f1fa3372cf5dcdd41b9df8

There is no ETA when v2.0.0 is released.

mansuf commented 2 years ago

Update: I have provided artifacts in CI. Which means you can use bundled executable early

https://github.com/mansuf/mangadex-downloader/actions/runs/3066770700

The update feature may not working, so if you want to install stable version go to github releases