-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug fixes & improve duplicate checks #342
Conversation
Nothing is wrong with the folder already existing -- silently ignore and move on. Might still have other files inside that haven't been downloaded yet.
If you wanted to generate both .cbz and .pdf, the .pdf will be skipped if .cbz was generated first.
nhentai/downloader.py
Outdated
@@ -138,7 +139,8 @@ def start_download(self, queue, folder='', regenerate_cbz=False): | |||
logger.warning(f'Path "{folder}" already exist.') | |||
|
|||
if os.getenv('DEBUG', None) == 'NODOWNLOAD': | |||
return | |||
# Assuming we want to continue with rest of process? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some cases we don't need to download files, use export DEBUG=NODOWNLOAD
to skip rest process. In other cases we can use export DEBUG=1
to enable debug mode and continue download process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fine then. Returning True
will proceed with everything else in main, as it did previously.
Some problems still exists:
|
--meta --cbz
with a duplicatedcbz
file will result in this error..cbz
file is already generated, duplicate downloads will be ignored even when the flags are different (i.e.--pdf
instead of--cbz
)..cbz
file extension check.os.path.join(doujinshi_dir, '..')
was essentially equivalent tooutput_dir
Not sure what the expected behavior should be here. I assumed this should continue with the rest of the process.