Tweak code
This commit is contained in:
parent
f5716937d1
commit
f4edfaefd2
2 changed files with 3 additions and 11 deletions
|
@ -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
|
Loading…
Add table
Reference in a new issue