fix displac of total chapters
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Ivan Schaller 2021-12-20 15:00:12 +01:00
parent 98bd1afd0c
commit 9dfb36fe25
2 changed files with 8 additions and 6 deletions

View file

@ -60,7 +60,7 @@ def get_manga_chapters(uuid, lang):
req = requests.get(f'{api_url}/manga/{uuid}/feed?limit=0&translatedLanguage[]={lang}&{content_ratings}')
try:
total = req.json()['total']
print(f'Total chapters: {total}')
#print(f'Total chapters: {total}')
except:
print('Error retrieving the chapters list. Did you specify a valid language code?')
exit(1)

View file

@ -37,11 +37,7 @@ def mangadex_dlp(md_url='',
manga_uuid = MdApi.get_manga_uuid(md_url)
manga_title = MdApi.get_manga_title(manga_uuid, md_lang)
print('\n=========================================')
print(f'Manga Name: {manga_title}')
print(f'UUID: {manga_uuid}')
# get chapters
# get chapters
manga_chapter_data = MdApi.get_manga_chapters(manga_uuid, md_lang)
# [0][0] = Volume Number
# [0][1] = Chapter number/oneshot
@ -64,6 +60,12 @@ def mangadex_dlp(md_url='',
if md_forcevol:
manga_chapter_list.sort(key=lambda x: x.split(':')[0])
# print infos
print('\n=========================================')
print(f'Manga Name: {manga_title}')
print(f'UUID: {manga_uuid}')
print(f'Total chapters: {len(manga_chapter_list)}')
# list chapters if md_list_chapters is true
if md_list_chapters:
print(f'Available Chapters:\n{", ".join(manga_chapter_list)}')