Stop the player first

develop
LEdoian 3 years ago
parent 73a93a7462
commit cb2ab51910

@ -27,6 +27,7 @@ namespace QuickPlay
} } } }
public async Task Play(IPlayable song) public async Task Play(IPlayable song)
{ {
await mpd.SendAsync(new MpcCore.Commands.Player.Stop());
await SetReasonableOptions(); await SetReasonableOptions();
await mpd.SendAsync(new MpcCore.Commands.Queue.ClearQueue()); await mpd.SendAsync(new MpcCore.Commands.Queue.ClearQueue());
await mpd.SendAsync(new MpcCore.Commands.Queue.AddToQueue(song.Metadata.filePath)); await mpd.SendAsync(new MpcCore.Commands.Queue.AddToQueue(song.Metadata.filePath));

Loading…
Cancel
Save