playback: cleanup
This commit is contained in:
@@ -55,11 +55,13 @@ constructor(
|
||||
}
|
||||
|
||||
fun release() {
|
||||
browserJob.cancel()
|
||||
musicRepository.removeUpdateListener(this)
|
||||
}
|
||||
|
||||
override fun onMusicChanges(changes: MusicRepository.Changes) {
|
||||
if (changes.deviceLibrary) {
|
||||
val deviceLibrary = musicRepository.deviceLibrary
|
||||
if (changes.deviceLibrary && deviceLibrary != null) {
|
||||
for (entry in searchResults.entries) {
|
||||
entry.value.cancel()
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import androidx.media3.common.MediaMetadata
|
||||
import androidx.media3.common.PlaybackParameters
|
||||
import androidx.media3.common.Player
|
||||
import androidx.media3.common.TrackSelectionParameters
|
||||
import java.lang.Exception
|
||||
import org.oxycblt.auxio.music.Album
|
||||
import org.oxycblt.auxio.music.Artist
|
||||
import org.oxycblt.auxio.music.Genre
|
||||
|
||||
Reference in New Issue
Block a user