mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Catalog generation: Ignore tags with commas in them when generating genres
This commit is contained in:
parent
56adb9c679
commit
93157d253d
@ -2698,7 +2698,10 @@ class CatalogBuilder(object):
|
|||||||
for (i, tag) in enumerate(sorted(book.get('genres', []))):
|
for (i, tag) in enumerate(sorted(book.get('genres', []))):
|
||||||
aTag = Tag(_soup, 'a')
|
aTag = Tag(_soup, 'a')
|
||||||
if self.opts.generate_genres:
|
if self.opts.generate_genres:
|
||||||
|
try:
|
||||||
aTag['href'] = "Genre_%s.html" % self.genre_tags_dict[tag]
|
aTag['href'] = "Genre_%s.html" % self.genre_tags_dict[tag]
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
aTag.insert(0, escape(NavigableString(tag)))
|
aTag.insert(0, escape(NavigableString(tag)))
|
||||||
genresTag.insert(gtc, aTag)
|
genresTag.insert(gtc, aTag)
|
||||||
gtc += 1
|
gtc += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user