mirror of
https://github.com/jellyfin/jellyfin-android.git
synced 2026-09-02 21:04:10 +03:00
Send session error when onSetMediaItems has no results
This commit is contained in:
committed by
Niels van Velzen
parent
d8c906435f
commit
6d13b31397
@@ -417,6 +417,14 @@ class SessionBrowserCallback(
|
||||
}
|
||||
|
||||
expandedItems = onAddMediaItems(mediaSession, controller, expandedItems).await()
|
||||
|
||||
Timber.d("onSetMediaItems resulted in ${expandedItems.size} items")
|
||||
if (expandedItems.isEmpty()) {
|
||||
mediaSession.sendError(
|
||||
controller,
|
||||
SessionError(SessionError.ERROR_BAD_VALUE, context.getString(R.string.media_service_no_items))
|
||||
)
|
||||
}
|
||||
MediaSession.MediaItemsWithStartPosition(expandedItems, newStartIndex, newStartPositionMs)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user