playback: cleanup
This commit is contained in:
parent
0ca928a477
commit
24097af28c
2 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue