From e7bbd3f14f85a627f27394b423530b370d42c201 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 8 Aug 2009 14:16:39 -0600 Subject: [PATCH] Fix #3110 (Book genre) --- src/calibre/ebooks/metadata/fb2.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/ebooks/metadata/fb2.py b/src/calibre/ebooks/metadata/fb2.py index e81f8fe108..eded2dc056 100644 --- a/src/calibre/ebooks/metadata/fb2.py +++ b/src/calibre/ebooks/metadata/fb2.py @@ -19,6 +19,8 @@ def get_metadata(stream): author= [firstname+" "+lastname] title = soup.find("book-title").string comments = soup.find("annotation") + tags = soup.findAll('genre') + tags = [t.contents[0] for t in tags] cp = soup.find('coverpage') cdata = None if cp: @@ -39,6 +41,8 @@ def get_metadata(stream): mi = MetaInformation(title, author) mi.comments = comments mi.author_sort = lastname+'; '+firstname + if tags: + mi.tags = tags if series: mi.series = series.get('name', None) try: