1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-28 13:57:42 +00:00

Renaming of co-authors which are authors in another book

This commit is contained in:
Ozzie Isaacs
2022-01-30 15:16:42 +01:00
parent 3ae1b97d72
commit 1e04b51148
2 changed files with 32 additions and 31 deletions

View File

@@ -964,8 +964,8 @@ def create_book_on_upload(modif_date, meta):
authr = meta.author
sort_authors, input_authors, db_author, renamed_authors = prepare_authors_on_upload(title, authr)
title_dir = helper.get_valid_filename(title)
author_dir = helper.get_valid_filename(db_author.name)
title_dir = helper.get_valid_filename(title, chars=96)
author_dir = helper.get_valid_filename(db_author.name, chars=96)
# combine path and normalize path from windows systems
path = os.path.join(author_dir, title_dir).replace('\\', '/')
@@ -1283,8 +1283,8 @@ def merge_list_book():
if to_book:
for file in to_book.data:
to_file.append(file.format)
to_name = helper.get_valid_filename(to_book.title) + ' - ' + \
helper.get_valid_filename(to_book.authors[0].name)
to_name = helper.get_valid_filename(to_book.title, chars=96) + ' - ' + \
helper.get_valid_filename(to_book.authors[0].name, chars=96)
for book_id in vals:
from_book = calibre_db.get_book(book_id)
if from_book: