Skip to content

Adapt artist / audiobook controller for authors and narrators#3570

Open
fmunkes wants to merge 23 commits intodevfrom
audiobooks_extra_endpoints
Open

Adapt artist / audiobook controller for authors and narrators#3570
fmunkes wants to merge 23 commits intodevfrom
audiobooks_extra_endpoints

Conversation

@fmunkes
Copy link
Copy Markdown
Contributor

@fmunkes fmunkes commented Apr 4, 2026

Adds endpoints for authors/ narrators. Is that sql stuff actually safe?

Same question in reverse to #3569 can be asked here - would it make sense to make authors/ narrators media items, so things like pictures, or more metadata can be added. Also, the provider could be asked directly for their items, instead of searching the db.

I'm willing to do that, but what do you think?

update after discussion below

depends on music-assistant/models#209

@marcelveldt
Copy link
Copy Markdown
Member

Not sure how common it is that the authors/narrators have actual metadata ?
We could also say that these are mapped to the artist mediaitem (and we add a artist_type?)

I think it may make sense to quickly browse by narrator or author but not sure if we need to create a whole media type for them, I'm also wondering if we even have metadata. When I checked spotify etc. they did not provide any metadata for authors or narrators except the name

@fmunkes
Copy link
Copy Markdown
Contributor Author

fmunkes commented Apr 4, 2026

Not sure how common it is that the authors/narrators have actual metadata ? We could also say that these are mapped to > I think it may make sense to quickly browse by narrator or author but not sure if we need to create a whole media type for them, I'm also wondering if we even have metadata. When I checked spotify etc. they did not provide any metadata for authors or narrators except the name

I like the idea of an artist_type, and then enhancing the artist controller a bit. You are right, the data is usually name and maybe a picture - but since we then have a provider id, we can also ask the provider for the audiobooks belonging to the author/ narrator. Shall I go with the artist_type then?

I could also enhance the albums controller for series and introduce another album_type?

@marcelveldt
Copy link
Copy Markdown
Member

I'm not sure how it would work in practice to count authors and narrators as artists but I guess we can say the same for composers (classical music) so it's worth the investigation. would be nice if we can fix it.

As for series; can you enlighten me what those are ?
I'm not into podcasts that much so I need a bit of help here and there understanding how its structured and used in practice ?

@fmunkes
Copy link
Copy Markdown
Contributor Author

fmunkes commented Apr 4, 2026

Series would be for audiobooks, not podcast (but why not include it, although I don't know if that exists).

A book series would be something like Lord of the rings with multiple books. Attributes would be the series name, picture, and the overall progress. So it is similar to an album (or playlist?) but if I would hit play on a series, my expectation would be that it starts where you left off, (e.g. book no 2) and not with the first one.

I guess essentially you can map all of these types to existing MA types with a little bit of extra information. What I can't judge is if it is more future proof to just keep this extra branches on an artist or album in mind, or just separate them completely with their own controller. Or put a controller between base controller and implementation, where both types can inherit from. Maintenance of course being important too.

I don't know how well Spotify's integration of audiobooks is, but series is definitely something you find e.g. in audible.

Of course, we can also just add them via attributes, and search the db for them. I really don't know what's best - maybe I'm to influenced by abs...
I would add least add support for this to abs and the local filesystem.

@marcelveldt
Copy link
Copy Markdown
Member

For putting narrators, authors and composers into artists with a dedicated type I'd say yes.
But with a sidenote that we cant make this exactly foolproof as often all we got is a single string with the name, no id or anything.

For series I'm not sure. Definitely not Album. To me it's more a metadata field which we can use for extra filtering and such. I guess you can compare this to collections within movies

@fmunkes
Copy link
Copy Markdown
Contributor Author

fmunkes commented Apr 7, 2026

Ok, sounds good. I'll adapt both PRs, and mark them as draft for the time being. For series, what I really would like to have, is, that you can collapse them into a single visual item, instead of multiple Audiobooks. But that's a frontend thing I think, so I'll think about something there.

@fmunkes fmunkes marked this pull request as draft April 7, 2026 14:18
@fmunkes
Copy link
Copy Markdown
Contributor Author

fmunkes commented Apr 16, 2026

Ok, I think this is ready for a first review.

@fmunkes fmunkes marked this pull request as ready for review April 16, 2026 19:54
@fmunkes fmunkes changed the title Add endpoints for authors / narrators to audiobooks controller Adapt artist / audiobook controller for authors and narrators Apr 16, 2026
Comment thread music_assistant/models/music_provider.py Outdated
Comment thread music_assistant/models/music_provider.py Outdated
@MarvinSchenkel
Copy link
Copy Markdown
Contributor

Before doing an in-depth review, let's chat about the controller first. It feels a bit strange to have all this mixed logic in the ArtistController (eg Type = ARTIST or Type IN (Narrator , Author) ).

@marcelveldt would it be an idea to implement this as a child controller or generic?

@marcelveldt
Copy link
Copy Markdown
Member

A composer, author or writer is a form of Artist. Currently we only support singers but maybe we should broaden it. Can still belong in the Artist controller, just like we already have multiple Album types. It's just a type...

@fmunkes
Copy link
Copy Markdown
Contributor Author

fmunkes commented Apr 26, 2026

I renamed the default artist type to "singer", that should make it clearer then, that we are talking about music artists and so on.

@fmunkes fmunkes requested a review from MarvinSchenkel April 26, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants