mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-04-19 18:31:24 +02:00
Merge pull request #208 from karamori77/master
Changed write_comic_info from False to True
This commit is contained in:
commit
7c9d55e0ee
@ -65,11 +65,11 @@ def main():
|
||||
if options.is_download and doujinshis:
|
||||
doujinshi_ids = [i['id'] for i in doujinshis]
|
||||
|
||||
if options.is_save_download_history:
|
||||
with DB() as db:
|
||||
data = map(int, db.get_all())
|
||||
if options.is_save_download_history:
|
||||
with DB() as db:
|
||||
data = map(int, db.get_all())
|
||||
|
||||
doujinshi_ids = list(set(doujinshi_ids) - set(data))
|
||||
doujinshi_ids = list(set(map(int, doujinshi_ids)) - set(data))
|
||||
|
||||
if doujinshi_ids:
|
||||
for i, id_ in enumerate(doujinshi_ids):
|
||||
|
@ -36,3 +36,9 @@ CONFIG = {
|
||||
'language': '',
|
||||
'template': '',
|
||||
}
|
||||
LANGUAGEISO ={
|
||||
'english' : 'en',
|
||||
'chinese' : 'zh',
|
||||
'japanese' : 'ja',
|
||||
'translated' : 'translated'
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
import json
|
||||
import os
|
||||
from xml.sax.saxutils import escape
|
||||
|
||||
from constant import LANGUAGEISO
|
||||
|
||||
def serialize_json(doujinshi, dir):
|
||||
metadata = {'title': doujinshi.name,
|
||||
@ -65,7 +65,8 @@ def serialize_comicxml(doujinshi, dir):
|
||||
if doujinshi.info.languages:
|
||||
languages = [i.strip() for i in doujinshi.info.languages.split(',')]
|
||||
xml_write_simple_tag(f, 'Translated', 'Yes' if 'translated' in languages else 'No')
|
||||
[xml_write_simple_tag(f, 'Language', i) for i in languages if i != 'translated']
|
||||
[xml_write_simple_tag(f, 'LanguageISO', LANGUAGEISO[i]) for i in languages \
|
||||
if (i != 'translated' & i in LANGUAGEISO)]
|
||||
|
||||
f.write('</ComicInfo>')
|
||||
|
||||
|
@ -166,7 +166,7 @@ def generate_main_html(output_dir='./'):
|
||||
logger.warning('Writing Main Viewer failed ({})'.format(str(e)))
|
||||
|
||||
|
||||
def generate_cbz(output_dir='.', doujinshi_obj=None, rm_origin_dir=False, write_comic_info=False):
|
||||
def generate_cbz(output_dir='.', doujinshi_obj=None, rm_origin_dir=False, write_comic_info=True):
|
||||
if doujinshi_obj is not None:
|
||||
doujinshi_dir = os.path.join(output_dir, doujinshi_obj.filename)
|
||||
if write_comic_info:
|
||||
|
Loading…
x
Reference in New Issue
Block a user