From 9a852e67d51337c2e3fc2210b4a0ab885f5aeeec Mon Sep 17 00:00:00 2001 From: Zhou He Sheng Date: Thu, 30 May 2024 09:42:18 +0800 Subject: [PATCH 1/2] streaming with X-Emby-Token --- buildSrc/src/main/kotlin/Dependencies.kt | 2 +- .../emby/adapters/MediaContainerAdaptor.kt | 4 +- .../serenity/emby/server/api/EmbyAPIClient.kt | 51 ++++++++++++------- .../serenity/emby/server/model/usersmodel.kt | 4 +- .../emby/server/api/EmbyAPIClientTest.kt | 2 +- .../serenity/core/IConfiguration.java | 9 ++++ .../serenity/core/ServerConfig.java | 35 +++++++++++++ serenity-app/src/main/res/values/strings.xml | 2 + .../res/xml/manual_server_preferences.xml | 10 ++++ .../serenity/common/rest/SerenityUser.java | 2 +- .../common/rest/impl/SerenityUser.java | 14 ++--- 11 files changed, 101 insertions(+), 34 deletions(-) diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index 5266fe9cd..8ecd6e860 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -2,7 +2,7 @@ object Versions { const val kotlinVersion = "1.9.10" const val androidPluginVersion = "8.0.0" - const val minSdkVersion = 27 + const val minSdkVersion = 21 const val targetSdkVersion = 33 const val appversion = "2.1.0" diff --git a/emby-lib/src/main/kotlin/us/nineworlds/serenity/emby/adapters/MediaContainerAdaptor.kt b/emby-lib/src/main/kotlin/us/nineworlds/serenity/emby/adapters/MediaContainerAdaptor.kt index 3f6a0f520..1b11730c2 100644 --- a/emby-lib/src/main/kotlin/us/nineworlds/serenity/emby/adapters/MediaContainerAdaptor.kt +++ b/emby-lib/src/main/kotlin/us/nineworlds/serenity/emby/adapters/MediaContainerAdaptor.kt @@ -127,7 +127,7 @@ class MediaContainerAdaptor { return MediaContainer() } - fun createVideoList(videos: List): IMediaContainer { + fun createVideoList(videos: List, token: String): IMediaContainer { val mediaContainer = MediaContainer() val serenityVideos = ArrayList