Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement]: Allow browsing books by author / series (and a full list) on Android Auto #1204

Open
kuldan5853 opened this issue May 15, 2024 · 8 comments · May be fixed by #1322
Open

[Enhancement]: Allow browsing books by author / series (and a full list) on Android Auto #1204

kuldan5853 opened this issue May 15, 2024 · 8 comments · May be fixed by #1322
Labels
android auto Issue specific to android auto enhancement New feature or request

Comments

@kuldan5853
Copy link

kuldan5853 commented May 15, 2024

Describe the Feature/Enhancement

right now, only a very small (random?) selection of your books is listed in Android Auto.

I would like to be able to have the same options to browse for a book available on Android Auto that I have on the Phone app (Browse by Series, sort by latest date, and so on), with a way to basically navigate my library by selecting an author, a series, and then the specific book I'm interested in.

Also - it would be useful if there would be a "List" view in Android Auto instead of Cover only.

Why would this be helpful?

Right now, to switch between books that have not yet been started / are listed on the results in the app, I would have to pull out my phone to interact with ABS, which is a serious safety issue.

Future Implementation (Screenshot)

Make Android Auto work similarly to the stock app interface

A good way to see how I would envision the implementation is the app "listen audiobook player" which has a fully browsable library on Android Auto.

If useful, I can take a few photos when I'm in my car the next time as I would like a similar implementation to how they did it.

Audiobookshelf App Version

Android App - 0.9.63

Current Implementation (Screenshot)

No response

@kuldan5853 kuldan5853 added the enhancement New feature or request label May 15, 2024
@advplyr advplyr added the android auto Issue specific to android auto label May 15, 2024
@ISO-B
Copy link
Contributor

ISO-B commented Aug 4, 2024

I have started implementing this. Way how I am planning to do this is making following structure under libraries option:

  1. Library
    • List of authors
      • Series
        • Books
      • Non series books
  2. Series
    • List of series
      • Books
  3. Collections
    • List of collections
      • Books

So first you select which library you want to use and then navigate with that hierarchy. I am not sure does android auto support sorting by anything else than name, but we will see.

@kuldan5853
Copy link
Author

So first you select which library you want to use and then navigate with that hierarchy. I am not sure does android auto support sorting by anything else than name, but we will see.

If you want to see a possible implementation, look at Listen Audiobook player - I worked with the dev to have a fully browsable library (that simply follows the file system structure in that case) implemented into the app a while ago. So at least there is no technical limit that prohibits you from showing large lists or anything like that that I could see..

As for how you propose, that sounds great to me as it would give you full flexibility browsing your library.

While you're at it, could you also look into the adjacent topic of the download function losing all folder structure? It would be great if the app would support sort of an "offline" mode where we only see the content we have downloaded locally (but with the same structure as in online, so library/series/collections) - not every country has good internet throughout, especially when driving.

That had been my main use case before I switched to Audiobookshelf - I used a booksonic server to manage my books and download them to the phone, but since the app was near useless in android auto (didn't work offline at all), I only used it to download the books (which neatly kept the folder structure of author\series\book intact) and then pointed Listen Audiobook player to the same folder for actual playback on the phone/in the car.

@ISO-B
Copy link
Contributor

ISO-B commented Aug 8, 2024

Just small progress update. Progress has been bit slow as I don't have previous experience from android and android auto development. I managed to get android auto browsing hierarchy for library and series to work. It works, but needs caching and sorting by title/name for every view. When I get those things done it is quick to add collections.

About those large lists. It seems that there is no technical limit on android side, but for people who have very large libraries load times might be bit long, but we will see. If that is case then we just add some kind of paging system.

@kuldan5853
Copy link
Author

kuldan5853 commented Aug 24, 2024

About those large lists. It seems that there is no technical limit on android side, but for people who have very large libraries load times might be bit long, but we will see. If that is case then we just add some kind of paging system.

I think also as you said before, maybe the answer here would be local caching of the directory structure (not the metadata itself), so that browsing the trees happens "offline" (with a sync of course while online). Metadata loading for selected books from the online source (or a downloaded copy) would then be quite fast in comparison.

Also, a suggestion from my side would be to also have a toggle for an offline mode in which only the locally downloaded library items are taken into consideration - this could make browsing in the car a lot easier too if you are the type to keep local copies of books due to bad connectivity (like I am).

At any rate, I really appreciate you working on this and look forward to being able to try it out :)

@ISO-B
Copy link
Contributor

ISO-B commented Aug 26, 2024

It seems that there is limit on android auto side for how many things your list can contain. Over 1000 items will prevent list loading. So I need to implement paging system for authors and series. I am thinking to add page changing entries to top of list and next page entry at bottom. Does that sound like good idea or does somebody have better idea?

Entries could be like:
Page 1 | A -H
Page 2 | H - O
Page 3 | O -Z

@kuldan5853
Copy link
Author

It seems that there is limit on android auto side for how many things your list can contain. Over 1000 items will prevent list loading. So I need to implement paging system for authors and series. I am thinking to add page changing entries to top of list and next page entry at bottom. Does that sound like good idea or does somebody have better idea?

Entries could be like: Page 1 | A -H Page 2 | H - O Page 3 | O -Z

I wouldn't use it as strict as this but just use a fixed paging size of maybe 50 to 100 entries per page - maybe even adding an #, A - Z before as a downselect (especially for Authors and Series) and then page the results by 50..

@ISO-B
Copy link
Contributor

ISO-B commented Sep 3, 2024

Current implementation is following. If there is under 1k items the show items as normal. You can jump to specific letter by using android auto filter/jump to button. If there is over 1k items show first letters only. Next level shows items if there is less than 100 items otherwise show selected letter + 1. This loops until there is under 100 items.

I will try to find time to make pull request tomorrow with all changes so you can get to testing.

@ISO-B ISO-B linked a pull request Sep 13, 2024 that will close this issue
@ISO-B
Copy link
Contributor

ISO-B commented Sep 13, 2024

Took bit longer, but managed to find and fix couple bugs, Now there is PR for this feature for testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android auto Issue specific to android auto enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants