remove small code smells
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
bbe468029f
commit
9f6bbbb9a5
2 changed files with 5 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -26,11 +26,10 @@ 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:
|
||||
# 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)
|
||||
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)
|
||||
|
||||
# get uuid and manga name of url
|
||||
manga_uuid = MdApi.get_manga_uuid(md_url)
|
||||
|
|
Loading…
Reference in a new issue