mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Separate out disc handling
This commit is contained in:
@@ -656,6 +656,7 @@ namespace RedBookPlayer.GUI.ViewModels
|
||||
PlayerOptions playerOptions = new PlayerOptions
|
||||
{
|
||||
DataPlayback = App.Settings.DataPlayback,
|
||||
DiscHandling = App.Settings.DiscHandling,
|
||||
LoadHiddenTracks = App.Settings.PlayHiddenTracks,
|
||||
RepeatMode = App.Settings.RepeatMode,
|
||||
SessionHandling = App.Settings.SessionHandling,
|
||||
@@ -684,6 +685,7 @@ namespace RedBookPlayer.GUI.ViewModels
|
||||
public void RefreshFromSettings()
|
||||
{
|
||||
SetDataPlayback(App.Settings.DataPlayback);
|
||||
SetDiscHandling(App.Settings.DiscHandling);
|
||||
SetLoadHiddenTracks(App.Settings.PlayHiddenTracks);
|
||||
SetRepeatMode(App.Settings.RepeatMode);
|
||||
SetSessionHandling(App.Settings.SessionHandling);
|
||||
@@ -727,6 +729,12 @@ namespace RedBookPlayer.GUI.ViewModels
|
||||
/// <param name="dataPlayback">New playback value</param>
|
||||
public void SetDataPlayback(DataPlayback dataPlayback) => _player?.SetDataPlayback(dataPlayback);
|
||||
|
||||
/// <summary>
|
||||
/// Set disc handling method
|
||||
/// </summary>
|
||||
/// <param name="discHandling">New playback value</param>
|
||||
public void SetDiscHandling(DiscHandling discHandling) => _player?.SetDiscHandling(discHandling);
|
||||
|
||||
/// <summary>
|
||||
/// Set the value for loading hidden tracks [CompactDisc only]
|
||||
/// </summary>
|
||||
|
||||
@@ -21,6 +21,12 @@ namespace RedBookPlayer.GUI.ViewModels
|
||||
[JsonIgnore]
|
||||
public List<DataPlayback> DataPlaybackValues => GenerateDataPlaybackList();
|
||||
|
||||
/// <summary>
|
||||
/// List of all disc handling values
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public List<DiscHandling> DiscHandlingValues => GenerateDiscHandlingList();
|
||||
|
||||
/// <summary>
|
||||
/// List of all repeat mode values
|
||||
/// </summary>
|
||||
@@ -49,6 +55,11 @@ namespace RedBookPlayer.GUI.ViewModels
|
||||
/// </summary>
|
||||
public int NumberOfDiscs { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates how to deal with multiple discs
|
||||
/// </summary>
|
||||
public DiscHandling DiscHandling { get; set; } = DiscHandling.SingleDisc;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if an index change can trigger a track change
|
||||
/// </summary>
|
||||
@@ -77,7 +88,7 @@ namespace RedBookPlayer.GUI.ViewModels
|
||||
/// <summary>
|
||||
/// Indicates how to repeat tracks
|
||||
/// </summary>
|
||||
public RepeatMode RepeatMode { get; set; } = RepeatMode.AllSingleDisc;
|
||||
public RepeatMode RepeatMode { get; set; } = RepeatMode.All;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates how to handle tracks on different sessions
|
||||
@@ -290,6 +301,11 @@ namespace RedBookPlayer.GUI.ViewModels
|
||||
/// </summary>
|
||||
private List<DataPlayback> GenerateDataPlaybackList() => Enum.GetValues(typeof(DataPlayback)).Cast<DataPlayback>().ToList();
|
||||
|
||||
/// <summary>
|
||||
/// Generate the list of DiscHandling values
|
||||
/// </summary>
|
||||
private List<DiscHandling> GenerateDiscHandlingList() => Enum.GetValues(typeof(DiscHandling)).Cast<DiscHandling>().ToList();
|
||||
|
||||
/// <summary>
|
||||
/// Generate the list of Key values
|
||||
/// </summary>
|
||||
|
||||
@@ -45,6 +45,11 @@
|
||||
<NumericUpDown Name="NumberOfDiscs" Margin="8,0,0,0" Width="120"
|
||||
Value="{Binding NumberOfDiscs, Mode=TwoWay}" Minimum="1" Maximum="100" />
|
||||
</WrapPanel>
|
||||
<WrapPanel Margin="0,0,0,16">
|
||||
<TextBlock Width="120">Disc Handling</TextBlock>
|
||||
<ComboBox Name="DiscHandling" Margin="8,0,0,0" Width="120"
|
||||
Items="{Binding DiscHandlingValues}" SelectedItem="{Binding DiscHandling, Mode=TwoWay}" />
|
||||
</WrapPanel>
|
||||
<WrapPanel Margin="0,0,0,16">
|
||||
<CheckBox IsChecked="{Binding GenerateMissingTOC}" Margin="0,0,8,0"/>
|
||||
<TextBlock VerticalAlignment="Center">Generate a TOC if the disc is missing one</TextBlock>
|
||||
|
||||
Reference in New Issue
Block a user