mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Port only distinct new feature work
This commit is contained in:
@@ -40,6 +40,23 @@ namespace RedBookPlayer.GUI.ViewModels
|
||||
PlayerView?.ViewModel?.ExecuteLoad();
|
||||
}
|
||||
|
||||
// Save track(s)
|
||||
else if(e.Key == App.Settings.SaveTrackKey)
|
||||
{
|
||||
if(PlayerView?.ViewModel == null || !PlayerView.ViewModel.Initialized)
|
||||
return;
|
||||
|
||||
var dialog = new OpenFolderDialog();
|
||||
string path = await dialog.ShowAsync(App.MainWindow);
|
||||
if(string.IsNullOrWhiteSpace(path))
|
||||
return;
|
||||
|
||||
if(e.KeyModifiers.HasFlag(KeyModifiers.Shift))
|
||||
PlayerView.ViewModel.ExtractAllTracksToWav(path);
|
||||
else
|
||||
PlayerView.ViewModel.ExtractSingleTrackToWav((uint)PlayerView.ViewModel.CurrentTrackNumber, path);
|
||||
}
|
||||
|
||||
// Toggle playback
|
||||
else if(e.Key == App.Settings.TogglePlaybackKey || e.Key == Key.MediaPlayPause)
|
||||
{
|
||||
@@ -52,6 +69,12 @@ namespace RedBookPlayer.GUI.ViewModels
|
||||
PlayerView?.ViewModel?.ExecuteStop();
|
||||
}
|
||||
|
||||
// Eject
|
||||
else if(e.Key == App.Settings.EjectKey)
|
||||
{
|
||||
PlayerView?.ViewModel?.ExecuteEject();
|
||||
}
|
||||
|
||||
// Next Track
|
||||
else if(e.Key == App.Settings.NextTrackKey || e.Key == Key.MediaNextTrack)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user