mirror of
https://github.com/jellyfin/jellyfin-androidtv.git
synced 2026-10-27 00:56:02 +00:00
Fix crash when item doesn't have a default audio/subtitle stream
(cherry picked from commit 9577e11e41)
This commit is contained in:
1 parent
7d84011d81
commit
389c48a1fd
1 file changed
+2
-2
+2
-2
@@ -139,8 +139,8 @@ fun InfoRowSeasonEpisode(item: BaseItemDto) {
|
||||
|
||||
private fun List<MediaStream>.getDefault(type: MediaStreamType, defaultIndex: Int? = null): MediaStream? {
|
||||
if (defaultIndex != null) {
|
||||
val byIndex = get(defaultIndex)
|
||||
if (byIndex.type == type) return byIndex
|
||||
val byIndex = getOrNull(defaultIndex)
|
||||
if (byIndex?.type == type) return byIndex
|
||||
}
|
||||
|
||||
return firstOrNull { it.type == type }
|
||||
|
||||
Reference in new issue
Block a user