mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
commit
9c7d56018b
@ -7,6 +7,7 @@ import copy
|
|||||||
|
|
||||||
from calibre.utils.ordered_dict import OrderedDict
|
from calibre.utils.ordered_dict import OrderedDict
|
||||||
from calibre.utils.config import tweaks
|
from calibre.utils.config import tweaks
|
||||||
|
from calibre.utils.icu import lower
|
||||||
|
|
||||||
class TagsIcons(dict):
|
class TagsIcons(dict):
|
||||||
'''
|
'''
|
||||||
@ -477,8 +478,8 @@ class FieldMetadata(dict):
|
|||||||
del self._tb_cats[key]
|
del self._tb_cats[key]
|
||||||
if key in self._search_term_map:
|
if key in self._search_term_map:
|
||||||
del self._search_term_map[key]
|
del self._search_term_map[key]
|
||||||
if key.lower() in self._search_term_map:
|
if key in self._search_term_map:
|
||||||
del self._search_term_map[key.lower()]
|
del self._search_term_map[key]
|
||||||
|
|
||||||
def cc_series_index_column_for(self, key):
|
def cc_series_index_column_for(self, key):
|
||||||
return self._tb_cats[key]['rec_index'] + 1
|
return self._tb_cats[key]['rec_index'] + 1
|
||||||
@ -523,7 +524,6 @@ class FieldMetadata(dict):
|
|||||||
def _add_search_terms_to_map(self, key, terms):
|
def _add_search_terms_to_map(self, key, terms):
|
||||||
if terms is not None:
|
if terms is not None:
|
||||||
for t in terms:
|
for t in terms:
|
||||||
t = t.lower()
|
|
||||||
if t in self._search_term_map:
|
if t in self._search_term_map:
|
||||||
raise ValueError('Attempt to add duplicate search term "%s"'%t)
|
raise ValueError('Attempt to add duplicate search term "%s"'%t)
|
||||||
self._search_term_map[t] = key
|
self._search_term_map[t] = key
|
||||||
|
Loading…
x
Reference in New Issue
Block a user