mirror of
https://github.com/Dummi26/musicdb.git
synced 2025-03-10 05:43:53 +01:00
fix playback bug
This commit is contained in:
parent
14660b6dae
commit
c03c35f1c9
@ -88,11 +88,9 @@ impl<T> PlayerBackend<T> for PlayerBackendPlaybackRs<T> {
|
||||
}
|
||||
fn next(&mut self, play: bool, _load_duration: bool) {
|
||||
self.pause();
|
||||
self.player.stop();
|
||||
self.player.skip();
|
||||
self.current = self.next.take();
|
||||
if self.player.has_current_song() {
|
||||
self.player.set_playing(play);
|
||||
} else {
|
||||
if let Some((id, song, _)) = &self.current {
|
||||
if let Some(song) = song {
|
||||
if let Err(e) = self.player.play_song_now(song, None) {
|
||||
@ -112,7 +110,6 @@ impl<T> PlayerBackend<T> for PlayerBackendPlaybackRs<T> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fn clear(&mut self) {
|
||||
// remove next song
|
||||
let _ = self.player.force_remove_next_song();
|
||||
|
Loading…
Reference in New Issue
Block a user