mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix catalog tags not being preserved
This commit is contained in:
parent
f9c7572b88
commit
4c68fafd41
@ -268,8 +268,10 @@ def add_catalog(cache, path, title, dbapi=None):
|
|||||||
db_id = cache._create_book_entry(mi, apply_import_tags=False)
|
db_id = cache._create_book_entry(mi, apply_import_tags=False)
|
||||||
new_book_added = True
|
new_book_added = True
|
||||||
else:
|
else:
|
||||||
if not mi.tags or _('Catalog') not in mi.tags:
|
tags = list(cache._field_for('tags', db_id) or ())
|
||||||
mi.tags.append(_('Catalog'))
|
if _('Catalog') not in tags:
|
||||||
|
tags.append(_('Catalog'))
|
||||||
|
mi.tags = tags
|
||||||
cache._set_metadata(db_id, mi)
|
cache._set_metadata(db_id, mi)
|
||||||
cache.add_format(db_id, fmt, stream, dbapi=dbapi) # Can't keep write lock since post-import hooks might run
|
cache.add_format(db_id, fmt, stream, dbapi=dbapi) # Can't keep write lock since post-import hooks might run
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user