mirror of
https://github.com/JonathanHerrewijnen/calibre-web.git
synced 2024-11-11 05:33:57 +00:00
Update tests
Fixes upload book
This commit is contained in:
parent
c4f0fc8f7b
commit
2b17bf4114
@ -636,6 +636,8 @@ class CalibreDB():
|
||||
query = query.outerjoin(join[0], join[1]).outerjoin(join[2])
|
||||
elif len(join) == 2:
|
||||
query = query.outerjoin(join[0], join[1])
|
||||
elif len(join) == 1:
|
||||
query = query.outerjoin(join[0])
|
||||
query = query.filter(db_filter)\
|
||||
.filter(self.common_filters(allow_show_archived))
|
||||
entries = list()
|
||||
|
@ -87,7 +87,7 @@ def get_epub_info(tmp_file_path, original_file_name, original_file_extension):
|
||||
lang = epub_metadata['language'].split('-', 1)[0].lower()
|
||||
epub_metadata['language'] = isoLanguages.get_lang3(lang)
|
||||
|
||||
epub_metadata = parse_epbub_series(tree, epub_metadata)
|
||||
epub_metadata = parse_epbub_series(ns, tree, epub_metadata)
|
||||
|
||||
coverfile = parse_ebpub_cover(ns, tree, epubZip, coverpath, tmp_file_path)
|
||||
|
||||
@ -139,7 +139,7 @@ def parse_ebpub_cover(ns, tree, epubZip, coverpath, tmp_file_path):
|
||||
coverfile = extractCover(epubZip, coversection[0], coverpath, tmp_file_path)
|
||||
return coverfile
|
||||
|
||||
def parse_epbub_series(tree, epub_metadata):
|
||||
def parse_epbub_series(ns, tree, epub_metadata):
|
||||
series = tree.xpath("/pkg:package/pkg:metadata/pkg:meta[@name='calibre:series']/@content", namespaces=ns)
|
||||
if len(series) > 0:
|
||||
epub_metadata['series'] = series[0]
|
||||
|
Loading…
Reference in New Issue
Block a user