mirror of
https://github.com/jellyfin/jellyfin-android.git
synced 2026-10-26 16:45:26 +00:00
Fallback to suggested music when no search results are found in Android Auto voice search
This commit is contained in:
1 parent
6d13b31397
commit
630c6fe410
1 file changed
+11
@@ -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