advplyr / audiobookshelf-app

Mobile application for Audiobookshelf
https://audiobookshelf.org
GNU General Public License v3.0
1.08k stars 148 forks source link

Import chapter markers from audible via app #1063

Open iconoclasthero opened 5 months ago

iconoclasthero commented 5 months ago

Is your feature request related to a problem? Please describe.

Use case: The books in my collection do not always have chapters associated with them when I go to play them on my phone with the ABS app (i.e., they were entered into the library without proper chapter info). Often I would like to be able to get the chapters because I want to track around the book I'm listening to right then and there so going back to a computer tor even doing it via the web client on the phone would tend to be prohibitive with many of my additional activities while I'm listening to a book. NB: This problem is exacerbated by the fact that there is no way to move more than 10 seconds in either direction! There is a feature enhancement to have a second level of seeking which is also needed!

Describe the solution you'd like

Click on the display chapters button regardless of whether the book has more than one chapter. Have an option for "lookup chapters from internet" and then give similar options to what happens in the web client when this is done. Since the ABS server has this already built in, I think it might be easier to have the server query audible and report the values back to the client to store locally and use while listening to the book. Obviously, out of the gate, if the book in question doesn't have an ASIN associated, "Sorry, your book does not have an ASIN number saved so no chapters can be downloaded." Beyond that, storing it locally would require permissions, but that's already something available in the app with downloading books...in fact, it isn't unreasonable to make downloading the book a requirement for getting chapter info (unreasonable no; annoying, probably). Storing it locally also eliminates the need to have the app push data back to the server and the permissions/access issues that would entail.

Describe alternatives you've considered

Well, obviously the alternatives are making sure every single book has chapters which is time consuming, using the web client via phone which is cumbersome, or using a PC which isn't necessarily readily available. Otherwise

Additional context

Add any other context or screenshots about the feature request here.

advplyr commented 5 months ago

This wouldn't be implemented in the way you are requesting. If this gets added to the mobile app it will be a chapter editor similar to the server. At this time chapter editing in the mobile app is unlikely to be added

iconoclasthero commented 2 months ago

I poked around the API and in case anyone stumbles upon this... you can get the chapter info if you have the ASIN, e.g., from the metadata.json sidecar. https://api.audiobookshelf.org/#search-for-a-book-39-s-chapters So my reindexing script can pull the asin, get chapters and then I can just use my reindexing script to update my $title -- Audiobook.opus file... Ostensibly that's easier than going through the sqlite db as I'm doing now to get the itemid to pop the url for the chapter edit dialog. Anyway, from there, once my audiobook file has the index in it that I need, there's an API to update the DB's chapters from the file, right? If not, then there is one that will allow for the updating from the chapters.json retrieved above... My intention is to script this to the point that I can ssh to the book directory, launch script, have updated chapters, listen.