@@ -225,7 +225,10 @@ class PlayerService : InvincibleService(), Player.Listener, PlaybackStatsListene
override fun onMediaItemTransition(mediaItem: MediaItem?, reason: Int) {
maybeNormalizeVolume()
+ maybeProcessRadio()
+ }
+ private fun maybeProcessRadio() {
radio?.let { radio ->
if (player.mediaItemCount - player.currentMediaItemIndex <= 3) {
coroutineScope.launch(Dispatchers.Main) {
@@ -1,11 +0,0 @@
-package it.vfsfitvnm.vimusic.utils
-
-import android.os.Bundle
-fun Bundle.getFloatOrNull(key: String): Float? =
- if (containsKey(key)) getFloat(key) else null
-fun Bundle.getLongOrNull(key: String): Long? =
- if (containsKey(key)) getLong(key) else null