mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 16:11:20 +02:00
Update device profile for Jellyfin 10.11 (#293)
## Details This PR updates the device profile used by ExoPlayer. It should more accurately report support for HDR formats. ## Acknowledgements This PR contains a commit (cd6351912af72d274b0baf50af4d777b986f0f46) that has code copied and slightly modified from https://github.com/jellyfin/jellyfin-androidtv `v0.19.4`. Major acknowledgement & credit to the Jellyfin Android TV developers for this code! ## Issues Related to #15
This commit is contained in:
parent
ec852906b1
commit
20ab146c97
10 changed files with 472 additions and 150 deletions
|
|
@ -19,12 +19,13 @@ import java.util.UUID
|
|||
|
||||
@Database(
|
||||
entities = [JellyfinServer::class, JellyfinUser::class, ItemPlayback::class, NavDrawerPinnedItem::class, LibraryDisplayInfo::class],
|
||||
version = 6,
|
||||
version = 7,
|
||||
exportSchema = true,
|
||||
autoMigrations = [
|
||||
AutoMigration(3, 4),
|
||||
AutoMigration(4, 5),
|
||||
AutoMigration(5, 6),
|
||||
AutoMigration(6, 7),
|
||||
],
|
||||
)
|
||||
@TypeConverters(Converters::class)
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class ServerRepository
|
|||
val updatedServer =
|
||||
try {
|
||||
val sysInfo by apiClient.systemApi.getPublicSystemInfo()
|
||||
server.copy(name = sysInfo.serverName)
|
||||
server.copy(name = sysInfo.serverName, version = sysInfo.version)
|
||||
} catch (ex: Exception) {
|
||||
Timber.w(ex, "Exception fetching public system info")
|
||||
server
|
||||
|
|
@ -148,6 +148,7 @@ class ServerRepository
|
|||
id = it,
|
||||
name = authedUser?.serverName,
|
||||
url = serverUrl,
|
||||
null,
|
||||
)
|
||||
}
|
||||
if (server != null) {
|
||||
|
|
|
|||
|
|
@ -6,12 +6,14 @@ import androidx.room.ColumnInfo
|
|||
import androidx.room.Embedded
|
||||
import androidx.room.Entity
|
||||
import androidx.room.ForeignKey
|
||||
import androidx.room.Ignore
|
||||
import androidx.room.Index
|
||||
import androidx.room.PrimaryKey
|
||||
import androidx.room.Relation
|
||||
import com.github.damontecres.wholphin.ui.isNotNullOrBlank
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.UseSerializers
|
||||
import org.jellyfin.sdk.model.ServerVersion
|
||||
import org.jellyfin.sdk.model.serializer.UUIDSerializer
|
||||
import java.util.UUID
|
||||
|
||||
|
|
@ -21,7 +23,11 @@ data class JellyfinServer(
|
|||
@PrimaryKey val id: UUID,
|
||||
val name: String?,
|
||||
val url: String,
|
||||
)
|
||||
val version: String?,
|
||||
) {
|
||||
@get:Ignore
|
||||
val serverVersion: ServerVersion? by lazy { version?.let(ServerVersion::fromString) }
|
||||
}
|
||||
|
||||
@Entity(
|
||||
tableName = "users",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue