Skip to content

Commit

Permalink
Fix MediaController crash
Browse files Browse the repository at this point in the history
  • Loading branch information
StaehliJ committed Aug 11, 2023
1 parent 20b4482 commit 89cea56
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class DemoMediaLibraryService : PillarboxMediaLibraryService() {
* For MediaItem with only id, like urn, it is fine. But one with uri not, as the localConfiguration is null here.
* We have to get the orignal mediaItem with uri set.
*/
return Futures.immediateFuture(mediaItems.map { demoBrowser.getMediaItemFromId(it.mediaId)!! }.toMutableList())
return Futures.immediateFuture(mediaItems.map { demoBrowser.getMediaItemFromId(it.mediaId) ?: it }.toMutableList())
}

override fun onSearch(
Expand Down

0 comments on commit 89cea56

Please sign in to comment.