mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-04-19 18:31:24 +02:00
Update serializer.py
changed Language to LanguageISO for ComicInfo.xml Language will be displayed by the LanguageISO code, it also forgoes rare language tags like rewrite and speechless
This commit is contained in:
parent
3a83f99771
commit
373086b459
@ -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>')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user