1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-15 22:34:56 +00:00

Fixed updating new book format to be all caps in database

This keeps us inline with calibre's behavior.
This commit is contained in:
bodybybuddha 2018-10-01 15:34:16 -04:00
parent 5d34fd7fec
commit 1144d97bc1

View File

@ -320,7 +320,7 @@ class WorkerThread(threading.Thread):
cur_book = web.db.session.query(web.db.Books).filter(web.db.Books.id == bookid).first() cur_book = web.db.session.query(web.db.Books).filter(web.db.Books.id == bookid).first()
if os.path.isfile(file_path + format_new_ext): if os.path.isfile(file_path + format_new_ext):
new_format = web.db.Data(name=cur_book.data[0].name, new_format = web.db.Data(name=cur_book.data[0].name,
book_format=self.queue[self.current]['settings']['new_book_format'], book_format=self.queue[self.current]['settings']['new_book_format'].upper(),
book=bookid, uncompressed_size=os.path.getsize(file_path + format_new_ext)) book=bookid, uncompressed_size=os.path.getsize(file_path + format_new_ext))
cur_book.data.append(new_format) cur_book.data.append(new_format)
web.db.session.commit() web.db.session.commit()