Conversation
| # chapters is a list of available chapters, sorted by position | ||
| # most commonly used for audiobooks and podcast episodes | ||
| chapters: list[MediaItemChapter] | None = None | ||
| series: UniqueList[MediaItemSeries] | None = None |
There was a problem hiding this comment.
Can a book be part of multiple series?
There was a problem hiding this comment.
Stumbled across this myself, as I had only a single series previously. I compared that to abs, and it supports multiple series. I googled a bit around, and apparently, there are some occasions where a book can be part of different aspects of e.g. a fantasy story, or you create two series e.g. for published order and chronological order.
It's probably rare, but I think it is easy to support, too.
A naming alternative could be to not name this series, but collection. In the end a series is just a collection of books, which has a defined order, so a sub-type of a collection. Would just be the wording, logic remains the same - what do you think?
There was a problem hiding this comment.
Collection makes sense because that is also how other media library tools reference this. For example for boxsets etc. in movies.
|
|
||
|
|
||
| @dataclass | ||
| class AudiobookSeries(DataClassDictMixin): |
There was a problem hiding this comment.
Not too sure about this one. It kinda feels like it belongs in media_item.py, but that also makes it its own MediaItem. @marcelveldt what are your thoughts here?
There was a problem hiding this comment.
Not following why we need this separate AudiobookSeries while there is also MediaItemSeries
what do you mean with "This is used as API response, and not to be used by a provider" ?
There was a problem hiding this comment.
MediaItemSeries is what a provider optionally adds to an audiobook. It has the title of the series, and the position of the book. The AudiobookSeries is what I use here https://github.com/music-assistant/server/pull/3569/changes#diff-58ca56e58a7f3ba8e137137eca36d0c66870c0f9c643a5a4f661b45b0ce6d1fcR380 as a helper when asking the api for series. And MA then searches the DB for books belonging to a series based on the MediaItemSeries.
There was a problem hiding this comment.
OK, can you then expand the docstring and.or comments a bit to help future readers what is what ?
I really didn't know where to put the AudiobookSeries helper, as that is for the API.