mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-04-10 21:43:27 +02:00
fix #396
This commit is contained in:
parent
86060ae0a6
commit
a3c70a0c30
@ -87,6 +87,7 @@ def main():
|
||||
|
||||
if options.zip:
|
||||
options.is_nohtml = True
|
||||
|
||||
if not options.is_show:
|
||||
downloader = (CompressedDownloader if options.zip else Downloader)(path=options.output_dir, threads=options.threads,
|
||||
timeout=options.timeout, delay=options.delay,
|
||||
|
@ -1,5 +1,5 @@
|
||||
# coding: utf-8
|
||||
|
||||
import json
|
||||
import sys
|
||||
import re
|
||||
import os
|
||||
@ -147,7 +147,13 @@ def generate_html(output_dir='.', doujinshi_obj=None, template='default'):
|
||||
# serialize_json(doujinshi_obj, doujinshi_dir)
|
||||
name = doujinshi_obj.name
|
||||
else:
|
||||
name = 'nHentai HTML Viewer'
|
||||
metadata_path = os.path.join(doujinshi_dir, "metadata.json")
|
||||
if os.path.exists(metadata_path):
|
||||
with open(metadata_path, 'r') as file:
|
||||
doujinshi_info = json.loads(file.read())
|
||||
name = doujinshi_info.get("title")
|
||||
else:
|
||||
name = 'nHentai HTML Viewer'
|
||||
|
||||
data = html.format(TITLE=name, IMAGES=image_html, SCRIPTS=js, STYLES=css)
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user