[GUI] Add encryption options to media dump window.

This commit is contained in:
2025-11-23 15:55:54 +00:00
parent 4ee2034475
commit 3628fcf9c2
5 changed files with 54 additions and 2 deletions

View File

@@ -170,6 +170,12 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
bool _paranoia; bool _paranoia;
[ObservableProperty] [ObservableProperty]
bool _cureParanoia; bool _cureParanoia;
[ObservableProperty]
bool _storeEncryptedAsIs;
[ObservableProperty]
bool _readTitleKeys;
[ObservableProperty]
bool _isDvd;
public MediaDumpViewModel(Device device, string devicePath, DeviceInfo deviceInfo, Window view, public MediaDumpViewModel(Device device, string devicePath, DeviceInfo deviceInfo, Window view,
[CanBeNull] ScsiInfo scsiInfo = null) [CanBeNull] ScsiInfo scsiInfo = null)
@@ -205,6 +211,8 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
GenerateSubchannels = false; GenerateSubchannels = false;
Paranoia = false; Paranoia = false;
CureParanoia = false; CureParanoia = false;
StoreEncryptedAsIs = true;
ReadTitleKeys = false;
MediaType mediaType; MediaType mediaType;
@@ -315,6 +323,21 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
HasSubchannel = Track1PregapVisible; HasSubchannel = Track1PregapVisible;
IsDvd = mediaType switch
{
MediaType.DVDDownload
or MediaType.DVDPR
or MediaType.DVDPRDL
or MediaType.DVDPRW
or MediaType.DVDPRWDL
or MediaType.DVDR
or MediaType.DVDRAM
or MediaType.DVDROM
or MediaType.DVDRW
or MediaType.DVDRWDL => true,
_ => false
};
_dev = device; _dev = device;
_devicePath = devicePath; _devicePath = devicePath;
} }
@@ -724,8 +747,8 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
GenerateSubchannels, GenerateSubchannels,
64, 64,
true, true,
true, StoreEncryptedAsIs,
false, ReadTitleKeys,
10, 10,
true, true,
1080, 1080,

View File

@@ -196,6 +196,23 @@
</CheckBox> </CheckBox>
</StackPanel> </StackPanel>
</TabItem> </TabItem>
<TabItem>
<TabItem.Header>
<controls:SpectreTextBlock Text="{x:Static localization:UI.Encryption}" />
</TabItem.Header>
<StackPanel Orientation="Vertical"
Spacing="8">
<CheckBox IsChecked="{Binding StoreEncryptedAsIs, Mode=TwoWay}">
<TextBlock Text="{x:Static localization:UI.Store_encrypted_data_as_is}"
TextWrapping="Wrap" />
</CheckBox>
<CheckBox IsChecked="{Binding ReadTitleKeys, Mode=TwoWay}"
IsVisible="{Binding IsDvd, Mode=OneWay}">
<TextBlock Text="{x:Static localization:UI.Try_to_read_the_title_keys_from_CSS_DVDs}"
TextWrapping="Wrap" />
</CheckBox>
</StackPanel>
</TabItem>
<!-- TODO: Image options --> <!-- TODO: Image options -->
</TabControl> </TabControl>
<Grid Grid.Row="1" <Grid Grid.Row="1"

View File

@@ -6669,5 +6669,11 @@ namespace Aaru.Localization {
return ResourceManager.GetString("Errors", resourceCulture); return ResourceManager.GetString("Errors", resourceCulture);
} }
} }
public static string Encryption {
get {
return ResourceManager.GetString("Encryption", resourceCulture);
}
}
} }
} }

View File

@@ -3335,4 +3335,7 @@ Probadores:
<data name="Errors" xml:space="preserve"> <data name="Errors" xml:space="preserve">
<value>Errores</value> <value>Errores</value>
</data> </data>
<data name="Encryption" xml:space="preserve">
<value>Encriptación</value>
</data>
</root> </root>

View File

@@ -3410,4 +3410,7 @@ Do you want to continue?</value>
<data name="Errors" xml:space="preserve"> <data name="Errors" xml:space="preserve">
<value>Errors</value> <value>Errors</value>
</data> </data>
<data name="Encryption" xml:space="preserve">
<value>Encryption</value>
</data>
</root> </root>