mirror of
https://github.com/jellyfin/jellyfin-android.git
synced 2026-09-02 21:04:10 +03:00
Update dependencies, drop JCenter
This commit is contained in:
@@ -191,11 +191,16 @@ class MediaService : MediaBrowserServiceCompat() {
|
||||
}
|
||||
|
||||
currentPlayer.playWhenReady = playWhenReady
|
||||
currentPlayer.stop(true)
|
||||
with(currentPlayer) {
|
||||
stop()
|
||||
clearMediaItems()
|
||||
}
|
||||
if (currentPlayer == exoPlayer) {
|
||||
exoPlayer.setMediaItems(mediaItems)
|
||||
exoPlayer.prepare()
|
||||
exoPlayer.seekTo(initialPlaybackIndex, playbackStartPositionMs)
|
||||
with(exoPlayer) {
|
||||
setMediaItems(mediaItems)
|
||||
prepare()
|
||||
seekTo(initialPlaybackIndex, playbackStartPositionMs)
|
||||
}
|
||||
} else {
|
||||
val castPlayer = castPlayerProvider.get()
|
||||
if (currentPlayer == castPlayer) {
|
||||
@@ -218,7 +223,10 @@ class MediaService : MediaBrowserServiceCompat() {
|
||||
if (currentPlaylistItems.isEmpty()) {
|
||||
// We are joining a playback session.
|
||||
// Loading the session from the new player is not supported, so we stop playback.
|
||||
currentPlayer.stop(true)
|
||||
with(currentPlayer) {
|
||||
stop()
|
||||
clearMediaItems()
|
||||
}
|
||||
} else if (playbackState != Player.STATE_IDLE && playbackState != Player.STATE_ENDED) {
|
||||
preparePlaylist(
|
||||
metadataList = currentPlaylistItems,
|
||||
@@ -229,7 +237,10 @@ class MediaService : MediaBrowserServiceCompat() {
|
||||
}
|
||||
}
|
||||
mediaSessionConnector.setPlayer(newPlayer)
|
||||
previousPlayer?.stop(true)
|
||||
previousPlayer?.run {
|
||||
stop()
|
||||
clearMediaItems()
|
||||
}
|
||||
}
|
||||
|
||||
private fun setPlaybackError() {
|
||||
@@ -376,8 +387,6 @@ class MediaService : MediaBrowserServiceCompat() {
|
||||
ExoPlaybackException.TYPE_RENDERER -> Timber.e("TYPE_RENDERER: %s", error.rendererException.message)
|
||||
ExoPlaybackException.TYPE_UNEXPECTED -> Timber.e("TYPE_UNEXPECTED: %s", error.unexpectedException.message)
|
||||
ExoPlaybackException.TYPE_REMOTE -> Timber.e("TYPE_REMOTE: %s", error.message)
|
||||
ExoPlaybackException.TYPE_OUT_OF_MEMORY -> Timber.e("TYPE_OUT_OF_MEMORY: %s", error.outOfMemoryError.message)
|
||||
ExoPlaybackException.TYPE_TIMEOUT -> Timber.e("TYPE_TIMEOUT: %s", error.timeoutException.message)
|
||||
}
|
||||
applicationContext.toast(message, Toast.LENGTH_LONG)
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ import org.jellyfin.sdk.model.api.ImageType
|
||||
import org.jellyfin.sdk.model.serializer.toUUID
|
||||
import org.koin.core.KoinComponent
|
||||
import org.koin.core.inject
|
||||
import java.util.*
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
class PlayerNotificationHelper(private val viewModel: PlayerViewModel) : KoinComponent {
|
||||
|
||||
+4
-6
@@ -2,23 +2,21 @@
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
val kotlinVersion: String by project
|
||||
classpath("com.android.tools.build:gradle:4.1.2")
|
||||
classpath("com.android.tools.build:gradle:4.1.3")
|
||||
classpath(kotlin("gradle-plugin", kotlinVersion))
|
||||
classpath("de.mannodermaus.gradle.plugins:android-junit5:1.6.2.0")
|
||||
classpath("de.mannodermaus.gradle.plugins:android-junit5:1.7.1.1")
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
google()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,6 @@ plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
kotlinDslPluginOptions {
|
||||
experimentalWarning.set(false)
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ object Dependencies {
|
||||
const val androidxCore = "1.5.0-rc01"
|
||||
const val activity = "1.2.2"
|
||||
const val fragment = "1.3.2"
|
||||
const val exoPlayer = "2.12.3"
|
||||
const val exoPlayer = "2.13.3"
|
||||
|
||||
// Lifecycle
|
||||
const val lifecycleExtensions = "2.3.1"
|
||||
@@ -41,7 +41,7 @@ object Dependencies {
|
||||
// Health
|
||||
const val timber = "4.7.1"
|
||||
const val leakCanary = "2.7"
|
||||
const val redScreenOfDeath = "0.1.2"
|
||||
const val redScreenOfDeath = "0.1.3"
|
||||
const val junit = "5.7.1"
|
||||
const val kotest = "4.4.3"
|
||||
const val mockk = "1.11.0"
|
||||
@@ -55,13 +55,13 @@ object Dependencies {
|
||||
}
|
||||
|
||||
object Core {
|
||||
const val koin = "org.koin:koin-android:${Versions.koin}"
|
||||
const val koinViewModel = "org.koin:koin-android-viewmodel:${Versions.koin}"
|
||||
const val koin = "io.insert-koin:koin-android:${Versions.koin}"
|
||||
const val koinViewModel = "io.insert-koin:koin-android-viewmodel:${Versions.koin}"
|
||||
val appCompat = androidx("appcompat", Versions.appCompat)
|
||||
val androidx = androidxKtx("core", Versions.androidxCore)
|
||||
val activity = androidxKtx("activity", Versions.activity)
|
||||
val fragment = androidxKtx("fragment", Versions.fragment)
|
||||
const val koinFragment = "org.koin:koin-androidx-fragment:${Versions.koin}"
|
||||
const val koinFragment = "io.insert-koin:koin-androidx-fragment:${Versions.koin}"
|
||||
val exoPlayer = exoPlayer("core")
|
||||
}
|
||||
|
||||
@@ -111,8 +111,8 @@ object Dependencies {
|
||||
object Health {
|
||||
const val timber = "com.jakewharton.timber:timber:${Versions.timber}"
|
||||
const val leakCanary = "com.squareup.leakcanary:leakcanary-android:${Versions.leakCanary}"
|
||||
const val redScreenOfDeath = "com.melegy.redscreenofdeath:red-screen-of-death:${Versions.redScreenOfDeath}"
|
||||
const val redScreenOfDeathNoOp = "com.melegy.redscreenofdeath:red-screen-of-death-no-op:${Versions.redScreenOfDeath}"
|
||||
const val redScreenOfDeath = "com.mlegy.redscreenofdeath:red-screen-of-death:${Versions.redScreenOfDeath}"
|
||||
const val redScreenOfDeathNoOp = "com.mlegy.redscreenofdeath:red-screen-of-death-no-op:${Versions.redScreenOfDeath}"
|
||||
const val junit = "org.junit.jupiter:junit-jupiter-api:${Versions.junit}"
|
||||
const val junitEngine = "org.junit.jupiter:junit-jupiter-engine:${Versions.junit}"
|
||||
const val kotestAssertions = "io.kotest:kotest-assertions-core-jvm:${Versions.kotest}"
|
||||
|
||||
Reference in New Issue
Block a user