mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
8e22f5c432
commit
15d8272efe
@ -201,16 +201,14 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
|
|||||||
dbprefs = DBPrefs(self)
|
dbprefs = DBPrefs(self)
|
||||||
for key in default_prefs:
|
for key in default_prefs:
|
||||||
# be sure that prefs not to be copied are listed below
|
# be sure that prefs not to be copied are listed below
|
||||||
if key in ['news_to_be_synced']:
|
if key in frozenset(['news_to_be_synced']):
|
||||||
continue
|
continue
|
||||||
try:
|
dbprefs[key] = default_prefs[key]
|
||||||
dbprefs[key] = default_prefs[key]
|
if 'field_metadata' in default_prefs:
|
||||||
except:
|
fmvals = [f for f in default_prefs['field_metadata'].values() if f['is_custom']]
|
||||||
pass # ignore options that don't exist anymore
|
for f in fmvals:
|
||||||
fmvals = [f for f in default_prefs['field_metadata'].values() if f['is_custom']]
|
self.create_custom_column(f['label'], f['name'], f['datatype'],
|
||||||
for f in fmvals:
|
f['is_multiple'] is not None, f['is_editable'], f['display'])
|
||||||
self.create_custom_column(f['label'], f['name'], f['datatype'],
|
|
||||||
f['is_multiple'] is not None, f['is_editable'], f['display'])
|
|
||||||
self.initialize_dynamic()
|
self.initialize_dynamic()
|
||||||
|
|
||||||
def get_property(self, idx, index_is_id=False, loc=-1):
|
def get_property(self, idx, index_is_id=False, loc=-1):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user