mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-24 18:47:23 +00:00
Fixes for sqlalachemy2
This commit is contained in:
parent
33c19b20f4
commit
dba83a2900
@ -147,7 +147,7 @@ engine = create_engine('sqlite:///{0}'.format(cli_param.gd_path), echo=False)
|
|||||||
Base = declarative_base()
|
Base = declarative_base()
|
||||||
|
|
||||||
# Open session for database connection
|
# Open session for database connection
|
||||||
Session = sessionmaker()
|
Session = sessionmaker(autoflush=False)
|
||||||
Session.configure(bind=engine)
|
Session.configure(bind=engine)
|
||||||
session = scoped_session(Session)
|
session = scoped_session(Session)
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ class TaskGenerateCoverThumbnails(CalibreTask):
|
|||||||
|
|
||||||
# Replace outdated or missing thumbnails
|
# Replace outdated or missing thumbnails
|
||||||
for thumbnail in book_cover_thumbnails:
|
for thumbnail in book_cover_thumbnails:
|
||||||
if book.last_modified > thumbnail.generated_at:
|
if book.last_modified.replace(tzinfo=None) > thumbnail.generated_at:
|
||||||
generated += 1
|
generated += 1
|
||||||
self.update_book_cover_thumbnail(book, thumbnail)
|
self.update_book_cover_thumbnail(book, thumbnail)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user