* refactor: upgrade to jellyfin 10.9 * chore: upgrade to jellyfin sdk 1.5.0-beta.2 * fix: don't show resumable items in next up * chore: upgrade to jellyfin sdk 1.5.0-beta.3 * fix: sync offline playback progress * refactor: initialize BrandingApi in JellyfinApi * refactor: speed up quick connect auth * perf: load home data on Default dispatcher
47 lines
1.2 KiB
Kotlin
47 lines
1.2 KiB
Kotlin
package dev.jdtech.jellyfin.models
|
|
|
|
import androidx.room.Entity
|
|
import androidx.room.PrimaryKey
|
|
import org.jellyfin.sdk.model.api.MediaStreamType
|
|
import java.util.UUID
|
|
|
|
@Entity(
|
|
tableName = "mediastreams",
|
|
)
|
|
data class FindroidMediaStreamDto(
|
|
@PrimaryKey
|
|
val id: UUID,
|
|
val sourceId: String,
|
|
val title: String,
|
|
val displayTitle: String?,
|
|
val language: String,
|
|
val type: MediaStreamType,
|
|
val codec: String,
|
|
val isExternal: Boolean,
|
|
val path: String,
|
|
val channelLayout: String?,
|
|
val videoRangeType: String?,
|
|
val height: Int?,
|
|
val width: Int?,
|
|
val videoDoViTitle: String?,
|
|
val downloadId: Long? = null,
|
|
)
|
|
|
|
fun FindroidMediaStream.toFindroidMediaStreamDto(id: UUID, sourceId: String, path: String): FindroidMediaStreamDto {
|
|
return FindroidMediaStreamDto(
|
|
id = id,
|
|
sourceId = sourceId,
|
|
title = title,
|
|
displayTitle = displayTitle,
|
|
language = language,
|
|
type = type,
|
|
codec = codec,
|
|
isExternal = isExternal,
|
|
path = path,
|
|
channelLayout = channelLayout,
|
|
videoRangeType = videoRangeType?.name,
|
|
height = height,
|
|
width = width,
|
|
videoDoViTitle = videoDoViTitle,
|
|
)
|
|
}
|