mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
fb2-meta shouldn't fail when the fb2 file has no series information
This commit is contained in:
parent
61c29df9d7
commit
c654d23ff0
@ -21,11 +21,11 @@ def get_metadata(stream):
|
|||||||
if comments and len(comments) > 1:
|
if comments and len(comments) > 1:
|
||||||
comments = comments.p.contents[0]
|
comments = comments.p.contents[0]
|
||||||
series = soup.find("sequence")
|
series = soup.find("sequence")
|
||||||
series_name = series['name']
|
|
||||||
# series_index = series.index
|
# series_index = series.index
|
||||||
mi = MetaInformation(title, author)
|
mi = MetaInformation(title, author)
|
||||||
mi.comments = comments
|
mi.comments = comments
|
||||||
mi.category = series_name
|
if series:
|
||||||
|
mi.series = series.get('name', None)
|
||||||
# mi.series_index = series_index
|
# mi.series_index = series_index
|
||||||
return mi
|
return mi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user