Skip to content

Commit

Permalink
fix #370
Browse files Browse the repository at this point in the history
  • Loading branch information
RicterZ committed Jan 10, 2025
1 parent 54af682 commit b585225
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nhentai/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ def parse_doujinshi_obj(
) -> Tuple[str, str]:

filename = f'./doujinshi.{file_type}'
doujinshi_dir = os.path.join(output_dir, doujinshi_obj.filename)
if doujinshi_obj is not None:
doujinshi_dir = os.path.join(output_dir, doujinshi_obj.filename)
_filename = f'{doujinshi_obj.filename}.{file_type}'

if file_type == 'cbz':
Expand All @@ -112,6 +112,8 @@ def parse_doujinshi_obj(
_filename = _filename.replace('/', '-')

filename = os.path.join(output_dir, _filename)
else:
doujinshi_dir = './'

return doujinshi_dir, filename

Expand Down

0 comments on commit b585225

Please sign in to comment.