fix: crash viewing live video in playlist

This commit is contained in:
Bnyro 2024-10-31 18:29:53 +01:00
parent f0f3264bd7
commit 7e046c02fa

View File

@ -83,7 +83,7 @@ class PlaylistAdapter(
videoInfo.text = streamItem.uploaderName videoInfo.text = streamItem.uploaderName
channelImage.isGone = true channelImage.isGone = true
thumbnailDuration.setFormattedDuration(streamItem.duration!!, streamItem.isShort) thumbnailDuration.setFormattedDuration(streamItem.duration ?: -1, streamItem.isShort)
ImageHelper.loadImage(streamItem.thumbnail, thumbnail) ImageHelper.loadImage(streamItem.thumbnail, thumbnail)
@ -115,7 +115,7 @@ class PlaylistAdapter(
videoInfo.updatePadding(top = extraPadding, bottom = extraPadding) videoInfo.updatePadding(top = extraPadding, bottom = extraPadding)
} }
watchProgress.setWatchProgressLength(videoId, streamItem.duration) streamItem.duration?.let { watchProgress.setWatchProgressLength(videoId, it) }
} }
} }