jellyfin / jellyfin-android

Android Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
1.37k stars 227 forks source link

Audio books playback in Android Auto support #247

Open jcdick1 opened 3 years ago

jcdick1 commented 3 years ago

Describe the feature you'd like Add the Books library type to the Android Auto support, to allow playback of audio books

nielsvanvelzen commented 3 years ago

We need to add the "Books" type here: https://github.com/jellyfin/jellyfin-android/blob/master/app/src/main/java/org/jellyfin/mobile/media/car/LibraryBrowser.kt#L187

I'm not sure if that's enough to get this functionality working so some testing needs to be done for that. There's also a change that the old apiclient doesn't have the Books member in the CollectionType enum.

jcdick1 commented 3 years ago

No real hurry, I just wanted to get it on a list somewhere for when there's time or interest.

My next question to go with this would be to know if automatically playing the next track is "pushed" as a server-side function or "pulled" as a client side, since all of my audio content is episodic, or file-per-chapter type, rather than one file per title. So I know where to put in a feature request for that support.

nielsvanvelzen commented 3 years ago

Playlists are partially clientside and partially serverside. There is a feature request for proper audiobook here: https://features.jellyfin.org/posts/243/audiobook-support

jcdick1 commented 3 years ago

Oh, I didn't realize that when the client plays the next episode of a TV series, it was basically building a playlist in the background. I though either the server was telling the client "Hey, there's another episode in this series" or the client was asking "Is there another episode? Cool, I'll queue it up."

That's basically all I'm after for my audio, since it is basically episodic. Show->season->episode just like TV, but without moving pictures.

Kitof commented 3 years ago

I'm very interested in this enhancement too. Any news ?

teacupx commented 3 years ago

I tried to do the simple change of this line: https://github.com/jellyfin/jellyfin-android/blob/43a734f281b398eeb02680b92d3e225fffddb80c/app/src/main/java/org/jellyfin/mobile/media/car/LibraryBrowser.kt#L206 Changing it for: .filter { item -> (item.collectionType == CollectionType.Music) || (item.collectionType == CollectionType.Books) }

That was enough to make the libraries marked as "Books" to show up in Android Auto. But browsing them was a mess, since the app expected them to be browsable by tags, instead of folders like "Books" collections are organized. As a result, some folders appeared under "Artists", but with no files inside of them.

So this change would probably need a specific browsing menu for "Books" collection.

fireXtract commented 9 months ago

Is there interest in this feature still? I can pick it up if nobody else is looking at it.

teacupx commented 9 months ago

Is there interest in this feature still? I can pick it up if nobody else is looking at it.

Definitely, I am very interested in this feature. Right now, I am using screen mirroring apps in order to be able to listen to my audiobooks in my car (which require rooted phone and are more difficult to use than the Android Auto player)

resi23 commented 9 months ago

I think Android TV has the same problem. I don't see the books in this category at all. I would like to play audio books.

fireXtract commented 9 months ago

Ok I have done digging, and I can get audiobooks to render and play on android auto, but its a very hostile user experience. The web experience isn't much better -- the existing flow every time you want to listen is Audiobooks > Author > Book > scroll until you see a chapter marked as not played, unless you're fortunate enough that "Continue Listening" populates reliably.

I think I need to design a new API for this, and will prioritize utilizing it in the android app first.

I don't want to give the impression I'm begging the maintainers to do this, I'm simply organizing my thoughts and requesting feedback.

Gaps compared to alternate software phrased as features that I plan to work on:

fireXtract commented 8 months ago

Haven't been satsified with my results yet, so no PR. But I do have a workaround for "Continue Listening" not working for audiobooks.

I think the issues arise because we expect the whole book to be one file by default, so chapter split audiobooks don't behave nicely. Another nifty workaround is to just merge the files into one per book.

Another log in my above list for later reference: