Skip to content

Commit

Permalink
fix #333
Browse files Browse the repository at this point in the history
  • Loading branch information
RicterZ committed Sep 20, 2024
1 parent 35c5550 commit 2bd8627
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nhentai/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,10 @@ def generate_pdf(output_dir='.', doujinshi_obj=None, rm_origin_dir=False, move_t
"""Write images to a PDF file using img2pdf."""
if doujinshi_obj is not None:
doujinshi_dir = os.path.join(output_dir, doujinshi_obj.filename)
filename = doujinshi_obj.filename.replace('/', '-')
pdf_filename = os.path.join(
os.path.join(doujinshi_dir, '..'),
f'{doujinshi_obj.filename}.pdf'
f'{filename}.pdf'
)
else:
pdf_filename = './doujinshi.pdf'
Expand Down

0 comments on commit 2bd8627

Please sign in to comment.