Bugfixes after testrun
This commit is contained in:
@@ -53,7 +53,7 @@ from weakref import WeakSet
|
||||
|
||||
log = logger.create()
|
||||
|
||||
cc_exceptions = ['composite']
|
||||
cc_exceptions = ['composite', 'series']
|
||||
cc_classes = {}
|
||||
|
||||
Base = declarative_base()
|
||||
@@ -472,7 +472,6 @@ class CalibreDB:
|
||||
# This is a WeakSet so that references here don't keep other CalibreDB
|
||||
# instances alive once they reach the end of their respective scopes
|
||||
instances = WeakSet()
|
||||
series = False
|
||||
|
||||
def __init__(self, expire_on_commit=True, init=False):
|
||||
""" Initialize a new CalibreDB session
|
||||
@@ -500,7 +499,6 @@ class CalibreDB:
|
||||
for row in cc:
|
||||
if row.datatype not in cc_exceptions:
|
||||
if row.datatype == 'series':
|
||||
cls.series = True
|
||||
dicttable = {'__tablename__': 'books_custom_column_' + str(row.id) + '_link',
|
||||
'id': Column(Integer, primary_key=True),
|
||||
'book': Column(Integer, ForeignKey('books.id'),
|
||||
@@ -1029,14 +1027,10 @@ class CalibreDB:
|
||||
Base.metadata.remove(table)
|
||||
|
||||
def reconnect_db(self, config, app_db_path):
|
||||
if self.series:
|
||||
from . import isoLanguages, web_server
|
||||
web_server.stop(True)
|
||||
else:
|
||||
self.dispose()
|
||||
self.engine.dispose()
|
||||
self.setup_db(config.config_calibre_dir, app_db_path)
|
||||
self.update_config(config)
|
||||
self.dispose()
|
||||
self.engine.dispose()
|
||||
self.setup_db(config.config_calibre_dir, app_db_path)
|
||||
self.update_config(config)
|
||||
|
||||
|
||||
def lcase(s):
|
||||
|
||||
+5
-5
@@ -102,11 +102,11 @@ def get_epub_info(tmp_file_path, original_file_name, original_file_extension):
|
||||
|
||||
identifiers = []
|
||||
for node in p.xpath('dc:identifier', namespaces=ns):
|
||||
identifier_name=node.attrib.values()[-1];
|
||||
identifier_value=node.text;
|
||||
if identifier_name in ('uuid','calibre'):
|
||||
continue;
|
||||
identifiers.append( [identifier_name, identifier_value] )
|
||||
identifier_name = node.attrib.values()[-1]
|
||||
identifier_value = node.text
|
||||
if identifier_name in ('uuid', 'calibre') or identifier_value is None:
|
||||
continue
|
||||
identifiers.append([identifier_name, identifier_value])
|
||||
|
||||
if not epub_metadata['title']:
|
||||
title = original_file_name
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ def get_scheduled_tasks(reconnect=True):
|
||||
tasks.append([lambda: TaskReconnectDatabase(), 'reconnect', False])
|
||||
|
||||
# ToDo make configurable. Generate metadata.opf file for each changed book
|
||||
if True:
|
||||
if False:
|
||||
tasks.append([lambda: TaskBackupMetadata("en"), 'backup metadata', False])
|
||||
|
||||
# Generate all missing book cover thumbnails
|
||||
|
||||
Reference in New Issue
Block a user