Girbons / comics-downloader

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

All formats broken, unless images-only is used first #99

Closed wooosh closed 2 years ago

wooosh commented 2 years ago

Describe the bug Any option/format on every host I've tried will produce an empty folder, unless I call comics-downloader once with image-only, then call it again with the desired format.

To Reproduce

comics-downloader -url=https://mangakakalot.com/manga/oj918337 -range 1-1 -output=manga -format=cbz
# at this point, manga/comics/mangakakalot.com/Chapter 1 is created, but contains no files

comics-downloader -url=https://mangakakalot.com/manga/oj918337 -range 1-1 -output=manga -images-only
comics-downloader -url=https://mangakakalot.com/manga/oj918337 -range 1-1 -output=manga -format=cbz
# now cbz file is present

Expected behavior The cbz should be able to be created without running a command separately to download the images first, which worked in the last stable release.

Desktop (please complete the following information):

Girbons commented 2 years ago

Hey @wooosh thanks for the report!

I tried with v0.31.0 and master and comics-downloader -url=https://mangakakalot.com/manga/oj918337 -range 1-1 -output=manga -format=cbz works.

wooosh commented 2 years ago

I have managed to narrow down the issue. I believe it is related to relative paths in some way, since this works:

./comics-downloader -url=https://mangakakalot.com/manga/oj918337 -range 1-1 -output=manga -format=cbz

but this does not:

./build/comics-downloader -url=https://mangakakalot.com/manga/oj918337 -range 1-1 -output=manga -format=cbz

At this point I am not sure if this is consider user error or a bug, so feel free to close it if relative paths are not supported in this manner.

Girbons commented 2 years ago

Let's leave this issue open, maybe we can change the title as it could be misleading.

./build/comics-downloader -url=https://mangakakalot.com/manga/oj918337 -range 1-1 -output=manga -format=cbz

When executed like that I see 2 folders being created/used, the first one within the build folder (where the cbz file is going to be saved), the other one is the relative path passed to the output flag where the folder structure is going to be created anyway. Something is clearly wrong here.

Workaround

For now the workaround is to provide a full path to the output flag when the downloader is executed like

./build/comics-downloader