seblucas / cops

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)
http://blog.slucas.fr/en/oss/calibre-opds-php-server
GNU General Public License v2.0
1.43k stars 229 forks source link

Cops includes "et al." suffix common in scientific literature as a part of author's name in its sorting logic. #404

Open ghost opened 6 years ago

ghost commented 6 years ago

My Calibre library contains a substantial amount of textbooks and scientific articles that I need for my studies. I haven't foreseen a need to document every individual that's worked on a paper or a textbook in Calibre, hence I've only included the first one and replaced the rest with an "'et al."

This led to a problem with Calibre treating the "et al." suffix as a part of the person's name with its "author_sort" values. After reading the documentation I adjusted the "Author sort name algorithm" tweak accordingly by adding "et al." to the "author_name_suffixes", and then regenerated "author_sort" for my books. This solved the sorting issue within Calibre.

Unfortunately this doesn't carry over to how Cops renders its "Authors starting with A" page. For example I have a biology textbook by "Jane B. Reece et al." that is rendered to "al., Jane B. Reece et" instead of "Reece, Jane B. et al." or just simply "Reece, Jane B."

Steps to reproduce:

  1. Rename a book to "First Name Surname et al."
  2. Regenerate author_sort value.
  3. View the library via Cops interface (Authors starting with A).
  4. Add "et al." to Calibre's "author_name_suffixes" tweaks.
  5. Regenerate author_sort value.
  6. View the library via Cops interface (Authors starting with A).