Fix #526. Books are now initially stored according to their id.

This commit is contained in:
OzzieIsaacs 2018-07-08 10:41:00 +02:00
parent 4f1754c1e4
commit a298470479

View File

@ -3353,6 +3353,12 @@ def upload():
db.session.add(db_book) db.session.add(db_book)
db.session.flush() # flush content get db_book.id avalible db.session.flush() # flush content get db_book.id avalible
# ToDo: Book should be moved to foldername with id in it
if config.config_use_google_drive:
error = helper.update_dir_structure_gdrive(db_book.id)
else:
error = helper.update_dir_stucture(db_book.id, config.config_calibre_dir)
# ToDo: Handle error
# add comment # add comment
upload_comment = Markup(meta.description).unescape() upload_comment = Markup(meta.description).unescape()
if upload_comment != "": if upload_comment != "":