mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-28 12:30:00 +00:00
Remove global session object, this is now wrapped in the CalibreDB class
This commit is contained in:
parent
032cb59388
commit
76c724c783
@ -51,8 +51,6 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
use_unidecode = False
|
use_unidecode = False
|
||||||
|
|
||||||
Session = None
|
|
||||||
|
|
||||||
cc_exceptions = ['datetime', 'comments', 'composite', 'series']
|
cc_exceptions = ['datetime', 'comments', 'composite', 'series']
|
||||||
cc_classes = {}
|
cc_classes = {}
|
||||||
|
|
||||||
@ -439,9 +437,6 @@ class CalibreDB():
|
|||||||
cls.config = config
|
cls.config = config
|
||||||
cls.dispose()
|
cls.dispose()
|
||||||
|
|
||||||
# todo: remove...?
|
|
||||||
global Session
|
|
||||||
|
|
||||||
if not config.config_calibre_dir:
|
if not config.config_calibre_dir:
|
||||||
config.invalidate()
|
config.invalidate()
|
||||||
return False
|
return False
|
||||||
|
@ -53,7 +53,7 @@ class TaskConvert(CalibreTask):
|
|||||||
|
|
||||||
def _convert_ebook_format(self):
|
def _convert_ebook_format(self):
|
||||||
error_message = None
|
error_message = None
|
||||||
local_session = db.Session()
|
local_session = db.CalibreDB()
|
||||||
file_path = self.file_path
|
file_path = self.file_path
|
||||||
book_id = self.bookid
|
book_id = self.bookid
|
||||||
format_old_ext = u'.' + self.settings['old_book_format'].lower()
|
format_old_ext = u'.' + self.settings['old_book_format'].lower()
|
||||||
|
Loading…
Reference in New Issue
Block a user