Merge branch 'fixJukebox2' into 'develop'

Fix crashes with Jukebox

See merge request ultrasonic/ultrasonic!922
This commit is contained in:
birdbird 2023-03-09 12:58:41 +00:00
commit df9aff309a
4 changed files with 8 additions and 10 deletions

View File

@ -25,7 +25,7 @@ swipeRefresh = "1.1.0"
retrofit = "2.9.0"
jackson = "2.14.2"
okhttp = "4.10.0"
koin = "3.3.3"
koin = "3.3.2"
picasso = "2.8"
junit4 = "4.13.2"

View File

@ -299,7 +299,9 @@ class PlayerFragment :
}
playButton.setOnClickListener {
networkAndStorageChecker.warnIfNetworkOrStorageUnavailable()
if (!mediaPlayerController.isJukeboxEnabled)
networkAndStorageChecker.warnIfNetworkOrStorageUnavailable()
launch(CommunicationError.getHandler(context)) {
mediaPlayerController.play()
onCurrentChanged()

View File

@ -273,6 +273,10 @@ class JukeboxMediaPlayer : JukeboxUnimplementedFunctions(), Player {
seekTo((jukeboxStatus?.positionSeconds ?: 0) + SEEK_INCREMENT_SECONDS)
}
override fun isCurrentMediaItemSeekable() = true
override fun isCurrentMediaItemLive() = false
override fun prepare() {}
override fun isPlaying(): Boolean {

View File

@ -189,18 +189,10 @@ abstract class JukeboxUnimplementedFunctions : Service(), Player {
TODO("Not yet implemented")
}
override fun isCurrentMediaItemLive(): Boolean {
TODO("Not yet implemented")
}
override fun isCurrentWindowSeekable(): Boolean {
TODO("Not yet implemented")
}
override fun isCurrentMediaItemSeekable(): Boolean {
TODO("Not yet implemented")
}
override fun clearVideoSurface() {
TODO("Not yet implemented")
}