mirror of
https://github.com/Dummi26/musicdb.git
synced 2025-03-10 14:13: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) {
|
fn next(&mut self, play: bool, _load_duration: bool) {
|
||||||
self.pause();
|
self.pause();
|
||||||
|
self.player.stop();
|
||||||
self.player.skip();
|
self.player.skip();
|
||||||
self.current = self.next.take();
|
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((id, song, _)) = &self.current {
|
||||||
if let Some(song) = song {
|
if let Some(song) = song {
|
||||||
if let Err(e) = self.player.play_song_now(song, None) {
|
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) {
|
fn clear(&mut self) {
|
||||||
// remove next song
|
// remove next song
|
||||||
let _ = self.player.force_remove_next_song();
|
let _ = self.player.force_remove_next_song();
|
||||||
|
Loading…
Reference in New Issue
Block a user