bookwyrm-social / bookwyrm

Social reading and reviewing, decentralized with ActivityPub
http://joinbookwyrm.com/
Other
2.27k stars 266 forks source link

Series are tied to the first-named author in each edition #2991

Open hughrun opened 1 year ago

hughrun commented 1 year ago

Describe the bug As best I can tell, when a series title is added to a book, the matching mechanism to find the rest of the books in the series (i.e. from the book home page) assumes the first-listed author is the author of all books in the series.

Looks like this comes from /templates/book/book.html:

{% if book.series %}
    <meta itemprop="isPartOf" content="{{ book.series | escape }}">
    <meta itemprop="volumeNumber" content="{{ book.series_number }}">

    {% if book.authors.exists %} <!-- BELOW WE SIMPLY USE THE FIRST LISTED AUTHOR -->
        <a href="{% url 'book-series-by' book.authors.first.id %}?series_name={{ book.series }}">
    {% endif %}
    {{ book.series }}{% if book.series_number %} #{{ book.series_number }}{% endif %}
    {% if book.authors.exists %}
        </a>
    {% endif %}
{% endif %}

And then BookSeriesBy.

Unfortunately it's not always this simple. e.g. the First Knowledges series is edited by Margo Neale but she is only an author on the first book in the series. So we need some way of identifying the series author in order to bundle them all up.

To Reproduce Steps to reproduce the behavior:

  1. Go to the page of a book with a series where each book in the series has different authors,
  2. Click on the series name.
  3. Notice that the series page only lists the book you were just looking at, and claims the first listed author is the author of the entire series.

Expected behavior Clicking on the series name should list all known editions within the series.

Instance bookwyrm.social

Additional context Add any other context about the problem here.


Desktop (please complete the following information):

hughrun commented 1 year ago

Thinking about this more, we really should create a whole separate model for Series, and link it to authors and books as a foreign key. This is a particular problem for non-fiction series, where there may not be even a common Editor for all books.

joric3 commented 5 months ago

I also just stumbled across this, and I wouldn't have guessed that the problem is linked to the first author name. Series shouldn't be tied to an author.

My example case (from a German instance): I just noticed that different items from a series actually link to different series IDs.

No 1-4 links to https://buecher.pnpde.social/series/by/2296?series_name=Queer%2AWelten (showing only No 1-4) No 7 links to https://buecher.pnpde.social/series/by/2196?series_name=Queer*Welten (showing only No 7)

but

No 9 links to https://buecher.pnpde.social/series/by/3510?series_name=Queer%2AWelten which shows all of the above series issues. As far as I can tell, the linked items are the same as above, not duplicates.

matthiashohner commented 1 month ago

Just stumbled upon a similar example of a three-part series that left me puzzled for a moment:

Number 1 + 3: https://bookwyrm.social/series/by/32883?series_name=Star%20Trek%3A%20Seekers Number 2: https://bookwyrm.social/series/by/33733?series_name=Star%20Trek%3A%20Seekers

I second the proposal of @hughrun to model a series as an independent entity in the data model thus allowing to map more generic constructions of publication collections in the future.