Fixed Audio Fade, Crossfade & Android Auto search
This commit is contained in:
parent
7f683eb0ee
commit
ee7545f64e
15 changed files with 269 additions and 79 deletions
|
@ -25,6 +25,7 @@ import android.os.IBinder
|
|||
import android.provider.DocumentsContract
|
||||
import android.widget.Toast
|
||||
import androidx.core.content.ContextCompat
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.model.Song
|
||||
import code.name.monkey.retromusic.repository.SongRepository
|
||||
import code.name.monkey.retromusic.service.MusicService
|
||||
|
@ -300,7 +301,7 @@ object MusicPlayerRemote : KoinComponent {
|
|||
return false
|
||||
}
|
||||
|
||||
fun setShuffleMode(shuffleMode: Int): Boolean {
|
||||
private fun setShuffleMode(shuffleMode: Int): Boolean {
|
||||
if (musicService != null) {
|
||||
musicService!!.shuffleMode = shuffleMode
|
||||
return true
|
||||
|
@ -319,7 +320,7 @@ object MusicPlayerRemote : KoinComponent {
|
|||
}
|
||||
Toast.makeText(
|
||||
musicService,
|
||||
musicService!!.resources.getString(code.name.monkey.retromusic.R.string.added_title_to_playing_queue),
|
||||
musicService!!.resources.getString(R.string.added_title_to_playing_queue),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
return true
|
||||
|
@ -335,8 +336,8 @@ object MusicPlayerRemote : KoinComponent {
|
|||
openQueue(songs, 0, false)
|
||||
}
|
||||
val toast =
|
||||
if (songs.size == 1) musicService!!.resources.getString(code.name.monkey.retromusic.R.string.added_title_to_playing_queue) else musicService!!.resources.getString(
|
||||
code.name.monkey.retromusic.R.string.added_x_titles_to_playing_queue,
|
||||
if (songs.size == 1) musicService!!.resources.getString(R.string.added_title_to_playing_queue) else musicService!!.resources.getString(
|
||||
R.string.added_x_titles_to_playing_queue,
|
||||
songs.size
|
||||
)
|
||||
Toast.makeText(musicService, toast, Toast.LENGTH_SHORT).show()
|
||||
|
@ -356,7 +357,7 @@ object MusicPlayerRemote : KoinComponent {
|
|||
}
|
||||
Toast.makeText(
|
||||
musicService,
|
||||
musicService!!.resources.getString(code.name.monkey.retromusic.R.string.added_title_to_playing_queue),
|
||||
musicService!!.resources.getString(R.string.added_title_to_playing_queue),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
return true
|
||||
|
@ -372,8 +373,8 @@ object MusicPlayerRemote : KoinComponent {
|
|||
openQueue(songs, 0, false)
|
||||
}
|
||||
val toast =
|
||||
if (songs.size == 1) musicService!!.resources.getString(code.name.monkey.retromusic.R.string.added_title_to_playing_queue) else musicService!!.resources.getString(
|
||||
code.name.monkey.retromusic.R.string.added_x_titles_to_playing_queue,
|
||||
if (songs.size == 1) musicService!!.resources.getString(R.string.added_title_to_playing_queue) else musicService!!.resources.getString(
|
||||
R.string.added_x_titles_to_playing_queue,
|
||||
songs.size
|
||||
)
|
||||
Toast.makeText(musicService, toast, Toast.LENGTH_SHORT).show()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue