-
Notifications
You must be signed in to change notification settings - Fork 173
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
Added better library browsing for Android Auto #1322
base: master
Are you sure you want to change the base?
Conversation
Each library has 3 options: Library, Series and Collection. Library is grouped by authors
Could you maybe make the thresholds customizable in the future? 1000 / 500 are quite a bit to browse through on a car display, one might prefer to always force it to the Alphabetical drawdown and / or change those numbers. Not needed for a first step (looking forward to testing this!) but just as an idea for future refinement. |
That was good idea. I added settings for those. |
@ISO-B I have tried setting up my own build environment after talking with nicholas a while back, but I just have not enough clue what I'm doing to get a successful build going - would you be willing to build me an APK of your repo (including your three pull requests) so I can test this for a bit on my car? |
Sure. If you are on ABS discord server send message to me and I will provide apk for testing |
Hey, thanks to the awesome @ISO-B I was able to give this a test on real hardware, and what I have been seeing has been very promising. First, the great stuff (Library 1 has ~1.000 Books, Library 2 has ~5.000 Books):
And here's my findings for improvement:
I had a quick chat with ISO-B about this, and it seems all three of these issues should be pretty easy to fix. Oh, and something I just thought of - I'd be very thankful for a "recently added books" view per library as well. Overall, very happy with what I've seen and I really hope after a few tweaks this will make it into main. |
Found a bug (I think) - when you open the app / connect to Android Auto while the phone has limited connectivity / the app can't reach the server, you get stuck on a "Downloads" page without any way to get anywhere else. While in this state, the app is still responsive (on the phone), so I could for example start playback via the phone and also got the "now playing" to display on AA - but there was no way to get back to the navigation bar. |
I accidentally removed podcast browsing. Probably managed to get it back, but can't say before I find time to test.
Made fix to this using data from library stats endpoint. I will first test these and after that I will commit to git and provide new test build for Kuldan |
- Hide libraries without audiobooks - Sort books in series by sequence value - Added option for selecting ASC or DESC sorting for series - Order authors alphabetically
We have been doing quite lot of testing with @kuldan5853. Libraries without audiobooks are now hidden from Android Auto. Series are sorted using sequence values. There is also setting which allows using ascending or descending order for books in series. Authors weren't always on alphabetical order, but are now sorted. Podcasts are now working again. All bugs should be now fixed. @kuldan5853 confirmed that getting stuck on downloads tab also happens on production version of app. I can take a look for that problem, but it is not related to this PR so it should be fixed with different PR. |
I think we should remove the settings for alphabetical drawdown and force a reasonable standard. Requesting 10,000 series is too much. Have you tested with a library that large? I think this would be a very large payload that could cause memory issues. Even 1,000 is too much I think. We need some form of pagination for the queries or just show the first 100 and try to get the search working. We could also set up an endpoint on the server to send back data we need to build the directory structure including the alphabetized directories. Building that client side means we have to load the entire library. When I was first trying to build with android auto a few years ago I could never get the search working. I just tested now and it sort of worked for the first time but showed a bunch of empty directories that I had to look into to see if a playable item was in there. |
I don't understand why there are 2 different number inputs for the alphabetical drawdown settings. Why would we want 2 different settings there? |
My collection is ~1.000 Books and ~5.000 Books in 2 different libraries, and I turned off the drawdown by setting the limit to 10.000 myself (to let the Android Auto A...Z do it's magic). I only have 200 series on each library though, Performance for that was very fast and usable, I think with up to 1.000 series it should sitll be ok (this is all tested on 5G and on my phone). However, I do agree that I didn't really understand the two values in the setup and personally didn't use the alphabetical drawdown besides to test it. Browsing by Author / Series utilizing the built-in A...Z menus was performant eough for my use case (it honestly felt faster than using the app on the phone), so I didn't miss a search, but yeah having one might be useful. FWIW, I can also say that I have not noticed any discernable differences between testing this in the emulator and on my actual phone in my real car, the emulator is pretty good by now. The main case where the physical phone was useful for testing was changing/bad connectivity etc. |
Now that I think about it one would be enough.
My test library has ~4,000 books with 800 series from 2,500 authors. With that amount it seemed fast enough. Didn't notice any memory issues on server nor app.
Even though search is not useful for me, it will need to be working. I can take a look for that too at some point. Reason for doing fetching data as it is now made was just to see if I can make browsing work for android auto. Didn't want to commit making API changes and then notice that I can't get android auto side to work. Having endpoint that does tree structure would make things easier, but it would still make same amount of data as for now code fetches all/most browsable content when started. Couple things that I would like to add at some point; newest episodes for podcasts and recently added books and discovery for book libraries. |
Ah, right...I forgot about the 1000 items limit, as none of my libraries gets over that one. In that case, I think the functionality as is is pretty decent and advantageous vs. a 1/2/3 style paginated list.. |
Also for long run having library fully cached to app(Offline library) would be helpful for Android Auto too. If you have lot of downloaded books you can't easily browse those on AA when you don't have internet connection. |
@ISO-B one more thing you might want to integrate before the code gets merged is the "recently added" section as you mentioned a while ago - that would make ist mostly feature complete I think. |
Search now queries data from server. Results are grouped by books, series and authors.
General: - New top menu item Recent is added - Library caches are cleared when switching server Search: - Is done using server API - Latest search is cache to prevent need to make new request when returning from browsable item. - Results are grouped by book, series, author and split by library - Only searches libraries with audio content Library personalized shelves: - Recent books, series, authors, podcasts and episodes shelves are listed under Recent top menu - Discovery shelves can be found under library many from corresponding library
Icons: - Static browsable list items everywhere have hardcoded icons - Libraries use icons that are defined on server Start up / Initial loading: - Initial loading first loads libraries from server. After that personalized shelves and items in progress are fetched simultaneously. Top menu items are update after every stage. - If network connection is not available when android auto starts app tries to do initial loading again when network connection becomes available again
Status update: General:
Search:
Library personalized shelves:
Icons:
Start up / Initial loading:
I will add fix for #1083 before changing PR from draft. |
This should resolve issue. Fixes #1204
Each library now has three browsing options: Library, Series, Collections. Library browsing tree is following:
Fetched data is cached using variables.