remove small code smells
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Ivan Schaller 2021-12-19 17:47:41 +01:00
parent bbe468029f
commit 9f6bbbb9a5
2 changed files with 5 additions and 6 deletions

View file

@ -83,7 +83,7 @@ def get_manga_chapters(uuid, lang):
# chapter name, change illegal file names
chap_name = chapter['attributes']['title']
if not chap_name == None:
chap_name = re.sub('[/<>:"/\\|?*!.]', '', chap_name)
chap_name = re.sub('[/<>:"\\|?*!.]', '', chap_name)
# check if the chapter is external (cant download them)
chap_external = chapter['attributes']['externalUrl']
# name chapter "oneshot" if there is no chapter number

View file

@ -26,8 +26,7 @@ def mangadex_dlp(md_url='',md_chapters=None,md_dest='downloads',md_lang='en',md_
nothing\n
'''
# check if md_list_chapters is true, if not check if chapters to download were specified
if not md_list_chapters:
if md_chapters == None:
if not md_list_chapters and md_chapters == None:
# no chapters to download were given
print(f'You need to specify one or more chapters to download. To see all chapters use "--list"')
exit(1)