advplyr / audiobookshelf

Self-hosted audiobook and podcast server
https://audiobookshelf.org
GNU General Public License v3.0
6.54k stars 466 forks source link

[Enhancement]: Better metadata handling for anthologies #785

Open cassieesposito opened 2 years ago

cassieesposito commented 2 years ago

Describe the feature/enhancement

I'm not sure what this should look like from an interface standpoint or a metadata standpoint, but being able to tie authors and narrators to individual stories from anthologies would be super cool.

Things to think about:

advplyr commented 2 years ago

I'm not sure what you mean. Can you be more specific?

cassieesposito commented 2 years ago

Sure, let me give an example. Take the book Rogues.

There are 21 stories, each one with a different author. There are 16 different narrators.

The way the metadata is set up currently, I know the authors are Daniel Abraham, Walter Jon Williams, Steven Saylor, Bradley Denton, Joe Abercrombie, Scott Lynch, Lisa Tuttle, George R. R. Martin, Carrie Vaughn, Gillian Flynn, Connie Willis, Joe R. Lansdale, Michael Swanwick, Garth Nix, Matt Hughes, Paul Cornell, Neil Gaiman, Patrick Rothfuss, Cherie Priest, David W. Ball, and Phyllis Eisenstein.

I know the narrators are Conleth Hill, David Greenlee, Gethin Anthony, Gil Bellows, Gwendoline Christie, Harriet Walter, Iain Glen, Janis Ian, Julia Whelan, Molly Quinn, Phil Gigante, Ron Donachie, Roy Dotrice, Rupert Degas, Scott Brick, and W. Morgan Sheppard

But what I don't know is: "Tough Times All Over" by Joe Abercrombie is read by Gwendoline Christie and is Tracks 1 through 3 "The Meaning of Love" by Daniel Abraham is Read by Conleth Hill and is Tracks 11 through 13 Etc.

I can put all that in the Description, but having that metadata correctly associated with tracks would allow us to then do things like have particular stories included on author pages, and jumping directly to the chapter/track associated with it.

And then there's the question of editors, which ought to be a separate metadata field from authors. Currently, in my collection, I have the editors listed as "George R. R. Martin - editor" and "Gardner Dozois - editor" filed under authors because that's how audible handles it. When you go to George R. R. Martin's page, it shows up because he's also an author, but if you go to Gardner Dozois' page, it's not listed, because he doesn't have a story in the collection, even though he apparently worked on it enough to get his name in big letters on the second line of the cover.

cassieesposito commented 2 years ago

I think this might tie in to the "should we switch metadata to JSON" discussion. Thinking about how to manage this with the current format makes my head hurt, but in JSON it's super easy.

Off the cuff, I came up with this as a format that would accommodate all the current data and that would also accommodate anthologies as I've described here. I'm not convinced there isn't a better approach. I spent 3 minutes tops pondering this and another 5 typing up the example, so there could totally be room for improvement.

{
  "title": "Rogues",
  "author": ["Joe Abercrombie", "Gillian Flynn", "Matt Hughes"],
  "narrator": ["Gwendoline Christie","Julia Whelan", "Roy Dotrice"],
  "editor": ["George R. R. Martin","Gardner Dozois"],
  "description": "A thrilling collection of 21 original stories by an all-star list of... blah blah blah",
  "isAnthology,": true,
  "stories": {
    "Tough Times All Over": {
      "author": ["Joe Abercrombie"],
      "narrator": ["Gwendoline Christie"],
      "sequence":1,
      "firstTrack":1,
      "lastTrack": 3
    },
    "What Do You Do?": {
      "author": ["Gillian Flynn"],
      "narrator": ["Julia Whelan"],
      "sequence":2,
      "firstTrack":4,
      "lastTrack": 4
    },
    "The Inn of the Seven Blessings": {
      "author": ["Matt Hughes"],
      "narrator": ["Roy Dotrice"],
      "sequence": 3,
      "firstTrack": 5,
      "lastTrack":7
    },
    "etc": {"etc": "etc"}
  }
}
calebj commented 1 year ago

Per chapter info would be fantastic. That said, I'm here to suggest a system contributor "roles" like editor, foreword, translator, etc., which are causing some duplicates in my author list. Contributor info could have additional fields to reference a specific chapter.

Another thing to think about is where the info comes from. As far as I know, there's no structured source for audio chapter<->story/author/narrator information on Audible or anywhere else.

I haven't done enough research to know whether M4A supports per chapter artists as well as titles, but if it does, that might be a good place to encode it. I'll also have to check my anthologies for any extra info.

cassieesposito commented 1 year ago

As far as I know, there's no structured source for audio chapter

I don't think there are any automated metadata sources that provide this kind of information on a per-chapter basis -- and indeed, I've seen the same audio broken up in to different chapterizations depending on the source (CD, audible, libro.fm, etc), so I wouldn't trust imported metadata on that anyway.

I also don't think that's all that important. Even if it means manually entering a lot of metadata for each anthology, this would still be huge.

iconoclasthero commented 1 year ago

I would like to see a way to differentiate between authors and editors. I just ran across Rethinking American Grand Strategy and it has three editors. What I have done with this is to put it in my normal folder format and throw an editor tag on it: Borgwardt, Elizabeth, et al. (Eds.) -- Rethinking American Grand Strategy (2021) so that I could distiburgh edited collections vs works written by the people on the covers. Perhaps a checkbox next to the authors field in the edit screen to indicate editors would be sufficient.

manalive commented 8 months ago

I switched from using Plex because I was anticipating this feature would exist, only to find out that this is perhaps the only thing Plex actually does ok (allows individual tracks to show up under the "artist").

I have LOTS of anthologies, and I have even more audio dramas that have this plus further complications.

All of my anthologies have the "stories" in their own file, so the Artist tags can be used. For files that aren't split conveniently, I would still be willing to input the data so that they show up correctly.

manalive commented 8 months ago

Other use cases:

For alternating/guest authors, we can put the author in the title, but then the tracks won't show up under an author view, and if we put them as the album artist, it will show up under their author page along with books they actually wrote which is sub-optimal.

My test case for any audio metadata system is Powers of Darkness: https://www.audible.com/pd/Powers-of-Darkness-Audiobook/B07C2FXQV6

An Icelandic publisher tried to translate Bram Stoker's Dracula and made so many changes that it ended up being a completely different book. Stoker actually wrote a preface for it. The researcher who found it and had it translated back into English wrote an Introduction for it. A literary scholar wrote an Afterword. Stoker's great-grand-nephew wrote a Forward. Then there is the translator. The audiobook has 6 narrators to give voice to these different pieces of the book.

It's not really a problem for all these names to show at the top (in fact, having a Title Author(s) and a Chapter Authors section would be great), but seeing the information at the chapter (or failing that, track level) would be optimal, and having the author page split into sections or tabs for Author, Narrator, Contributor (with the 'role' like "translator", "editor", "chapter author", etc. under the album art) would be fantastic.

SenorSmartyPants commented 4 months ago

Coming from a multifile mp3/ID3 perspective, lots of this metadata can be tagged in the individual track files. Following Seanap's guide and looking to music compilation tagging:

Album: Book Title Album Artist: Book/Anthology Author (perhaps editor) Title: Chapter Title Artist: Track level Author/Narrator (I only put Author in Artist tag) Composer: Track Narrator

One book I have like this has narrator info tagged into track comments. But I'm not sure about that.

I can't really speak to how to handle this as a single file MP3 or M4B. And I would guess that ABS database does not currently support these attributes at the chapter level.

Antimarkovnikov commented 1 week ago

I would like to add my interest in having per chapter progress for anthologies and collections of short stories. My ADHD brain wants to be able to jump between stories and listen to them out of order and still remember which of them I've listened to.