-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for editing Authors and adds Typeahead for Author input #5
Conversation
Great PR, thanks! Will have a look at it soon! |
Just had a quick look. Two problems came up:
|
Thank you for the feedback. Unfortunatelly i can not reproduce your first bug. Did you look up the metadatachanges in the Authors List page? Because this one uses the 'sort' column of the authors table and this column is not edited by calibre-web at all. (but it clearly should be one day) If you change 'John Doe' to 'Jane Doe' and 'Jane Doe' and Jane Doe is already an entry in the db, then this entry get appended to the book and the wrong John Doe stays in the db. I will add a check if John Doe is orphaned. Maybe its not the best solution. But i can not think of a better one. And i think it's better than the current one. |
|
||
author_id = book.authors[0].id | ||
|
||
is_author = db.session.query(db.Authors).filter(db.Authors.name.like('%' + to_save["author_name"].strip() + '%')).first() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you doing a wildcard match of the author name?
The wildcard will match to_save["author_name"]="Rolf Schmid" with an existing author "Rolf Schmidt". Thats why the book author doesn't get changed in that case as i previously commented.
It should be an equal operator here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx!. changed it to equal operator
Nice. Thanks a lot for your contribution! |
Revert "Update cover to retain correct aspect ratio"
I had a lot of Authors 'Unbekannt' in my library. When i entered a Author in the Web interface all 'Unbekannt' where edited. With this fix a new Author is added to the db and linked to the book.
It would be better to use gettext instead of
if book.authors[0].name not in ("Unknown", "Unbekannt", "", " "):
but that seemed to complex for me.Added Typeahead for Author input
thats my first github pull request. i wanted to seperate it in two parts; didn't work.