mirror of
https://github.com/jellyfin/jellyfin-android.git
synced 2026-09-03 05:10:27 +03:00
Fallback to suggested music when no search results are found in Android Auto voice search
This commit is contained in:
committed by
Niels van Velzen
parent
6d13b31397
commit
630c6fe410
@@ -383,6 +383,17 @@ class SessionBrowserCallback(
|
||||
?.getContent(route, 0, MAX_PAGE_SIZE)
|
||||
?.toMediaItems(route)
|
||||
.orEmpty()
|
||||
|
||||
// Android Auto does not support session error reporting
|
||||
// but Google Play requires feedback on all search requests
|
||||
// so fallback to random item playback if no search results are found
|
||||
if (expandedItems.isEmpty()) {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
expandedItems = (LibraryRoute.Suggested.page as LibraryPage<LibraryRoute>)
|
||||
.getContent(LibraryRoute.Suggested, 0, MAX_PAGE_SIZE)
|
||||
.toMediaItems(route)
|
||||
}
|
||||
|
||||
newStartIndex = 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user