mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[GUI] Add options to fix/generate subchannels on media dumping.
This commit is contained in:
@@ -154,6 +154,18 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
|
||||
bool _useSidecar;
|
||||
[ObservableProperty]
|
||||
bool _createSidecar;
|
||||
[ObservableProperty]
|
||||
bool _hasSubchannel;
|
||||
[ObservableProperty]
|
||||
bool _fixSubchannelPosition;
|
||||
[ObservableProperty]
|
||||
bool _retrySubchannel;
|
||||
[ObservableProperty]
|
||||
bool _fixSubchannel;
|
||||
[ObservableProperty]
|
||||
bool _fixSubchannelCrc;
|
||||
[ObservableProperty]
|
||||
bool _generateSubchannels;
|
||||
|
||||
public MediaDumpViewModel(Device device, string devicePath, DeviceInfo deviceInfo, Window view,
|
||||
[CanBeNull] ScsiInfo scsiInfo = null)
|
||||
@@ -182,6 +194,11 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
|
||||
Retries = 5;
|
||||
Skipped = 512;
|
||||
CreateSidecar = true;
|
||||
FixSubchannelPosition = true;
|
||||
RetrySubchannel = true;
|
||||
FixSubchannel = false;
|
||||
FixSubchannelCrc = false;
|
||||
GenerateSubchannels = false;
|
||||
|
||||
MediaType mediaType;
|
||||
|
||||
@@ -290,6 +307,8 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
|
||||
_ => false
|
||||
};
|
||||
|
||||
HasSubchannel = Track1PregapVisible;
|
||||
|
||||
_dev = device;
|
||||
_devicePath = devicePath;
|
||||
}
|
||||
@@ -690,13 +709,13 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
|
||||
DumpSubchannel.Any,
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
FixSubchannelPosition,
|
||||
RetrySubchannel,
|
||||
FixSubchannel,
|
||||
FixSubchannelCrc,
|
||||
true,
|
||||
errorLog,
|
||||
false,
|
||||
GenerateSubchannels,
|
||||
64,
|
||||
true,
|
||||
true,
|
||||
@@ -778,7 +797,9 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
|
||||
await WorkFinishedAsync();
|
||||
});
|
||||
|
||||
async void ErrorMessage(string text) => await Dispatcher.UIThread.InvokeAsync(() => Log += text + Environment.NewLine);
|
||||
async void ErrorMessage(string text) =>
|
||||
await Dispatcher.UIThread.InvokeAsync(() => Log += text + Environment.NewLine);
|
||||
|
||||
async void UpdateStatus(string text) => await Dispatcher.UIThread.InvokeAsync(() => Log += text + Environment.NewLine);
|
||||
async void UpdateStatus(string text) =>
|
||||
await Dispatcher.UIThread.InvokeAsync(() => Log += text + Environment.NewLine);
|
||||
}
|
||||
@@ -53,9 +53,9 @@
|
||||
<Grid Margin="12"
|
||||
RowSpacing="8"
|
||||
RowDefinitions="Auto, *, Auto">
|
||||
<StackPanel Grid.Row="0"
|
||||
Orientation="Vertical"
|
||||
IsVisible="{Binding OptionsVisible, Mode=OneWay}"
|
||||
<ScrollViewer Grid.Row="0"
|
||||
IsVisible="{Binding OptionsVisible, Mode=OneWay}">
|
||||
<StackPanel Orientation="Vertical"
|
||||
Spacing="8">
|
||||
<Grid ColumnDefinitions="Auto, *"
|
||||
ColumnSpacing="8">
|
||||
@@ -148,8 +148,32 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
<StackPanel Orientation="Vertical"
|
||||
IsVisible="{Binding HasSubchannel, Mode=OneWay}">
|
||||
<CheckBox IsChecked="{Binding FixSubchannelPosition, Mode=TwoWay}">
|
||||
<TextBlock Text="{x:Static localization:UI.Fix_subchannel_position_help}"
|
||||
TextWrapping="Wrap" />
|
||||
</CheckBox>
|
||||
<CheckBox IsChecked="{Binding RetrySubchannel, Mode=TwoWay}">
|
||||
<TextBlock Text="{x:Static localization:UI.Retry_subchannel_help}"
|
||||
TextWrapping="Wrap" />
|
||||
</CheckBox>
|
||||
<CheckBox IsChecked="{Binding FixSubchannel, Mode=TwoWay}">
|
||||
<TextBlock Text="{x:Static localization:UI.Fix_subchannel_help}"
|
||||
TextWrapping="Wrap" />
|
||||
</CheckBox>
|
||||
<CheckBox IsChecked="{Binding FixSubchannelCrc, Mode=TwoWay}">
|
||||
<TextBlock Text="{x:Static localization:UI.Fix_subchannel_crc_help}"
|
||||
TextWrapping="Wrap" />
|
||||
</CheckBox>
|
||||
<CheckBox IsChecked="{Binding GenerateSubchannels, Mode=TwoWay}">
|
||||
<TextBlock Text="{x:Static localization:UI.Generate_subchannels_dump_help}"
|
||||
TextWrapping="Wrap" />
|
||||
</CheckBox>
|
||||
</StackPanel>
|
||||
<!-- TODO: Image options -->
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
<Grid Grid.Row="1"
|
||||
RowDefinitions="Auto,Auto,*,Auto,Auto"
|
||||
VerticalAlignment="Stretch"
|
||||
|
||||
Reference in New Issue
Block a user