Use media item name as title when available (#461)

Fallback to filename if missing
This commit is contained in:
Carlos Olivo
2021-07-06 09:49:40 +02:00
committed by GitHub
parent cbd6dc8027
commit 8d79f663d7
@@ -18,7 +18,7 @@ class JellyfinMediaSource(
subtitleStreamIndex: Int? = null,
) {
val id: String = requireNotNull(sourceInfo.id) { "Media source has no id" }
val name: String = sourceInfo.name.orEmpty()
val name: String = item?.name ?: sourceInfo.name.orEmpty()
val playMethod: PlayMethod = when {
sourceInfo.supportsDirectPlay -> PlayMethod.DIRECT_PLAY