Skip to content

Commit

Permalink
Bugfixes for renaming authors on gdrive
Browse files Browse the repository at this point in the history
  • Loading branch information
OzzieIsaacs committed Feb 1, 2022
1 parent 61bfeae commit 0bc1563
Show file tree
Hide file tree
Showing 3 changed files with 509 additions and 409 deletions.
2 changes: 1 addition & 1 deletion cps/editbooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ def upload():

book_id = db_book.id
title = db_book.title

# ToDo this currently doesn't work -> integrate in update_dir_structure_gdrive
error = helper.update_dir_structure_file(book_id,
config.config_calibre_dir,
input_authors[0],
Expand Down
5 changes: 3 additions & 2 deletions cps/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,9 @@ def update_dir_structure_gdrive(book_id, first_author, renamed_author):
gFile = gd.getFileFromEbooksFolder(None, old_author_dir)
if gFile:
gd.moveGdriveFolderRemote(gFile, new_author_rename_dir)
else:
error = _(u'File %(file)s not found on Google Drive', file=authordir) # file not found
# author is always co-author and has is never author, no folder is okay
#else:
# error = _(u'File %(file)s not found on Google Drive', file=authordir) # file not found
else:
new_authordir = get_valid_filename(book.authors[0].name, chars=96)

Expand Down
Loading

0 comments on commit 0bc1563

Please sign in to comment.