mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[GUI] Update MediaDumpViewModel to use property accessors for sidecar metadata
This commit is contained in:
@@ -132,6 +132,7 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
|
|||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
EncodingModel _selectedEncoding;
|
EncodingModel _selectedEncoding;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
|
[CanBeNull]
|
||||||
Metadata _sidecar;
|
Metadata _sidecar;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
double _skipped;
|
double _skipped;
|
||||||
@@ -437,7 +438,7 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
|
|||||||
|
|
||||||
if(!value)
|
if(!value)
|
||||||
{
|
{
|
||||||
_sidecar = null;
|
Sidecar = null;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -461,7 +462,7 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
|
|||||||
{
|
{
|
||||||
var fs = new FileStream(result[0].Path.AbsolutePath, FileMode.Open);
|
var fs = new FileStream(result[0].Path.AbsolutePath, FileMode.Open);
|
||||||
|
|
||||||
_sidecar =
|
Sidecar =
|
||||||
(JsonSerializer.Deserialize(fs, typeof(MetadataJson), MetadataJsonContext.Default) as MetadataJson)
|
(JsonSerializer.Deserialize(fs, typeof(MetadataJson), MetadataJsonContext.Default) as MetadataJson)
|
||||||
?.AaruMetadata;
|
?.AaruMetadata;
|
||||||
|
|
||||||
@@ -471,11 +472,8 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
|
|||||||
{
|
{
|
||||||
SentrySdk.CaptureException(ex);
|
SentrySdk.CaptureException(ex);
|
||||||
|
|
||||||
// ReSharper disable AssignmentIsFullyDiscarded
|
_ = MessageBoxManager
|
||||||
_ = MessageBoxManager.
|
.GetMessageBoxStandard(UI.Title_Error, UI.Incorrect_metadata_sidecar_file, ButtonEnum.Ok, Icon.Error)
|
||||||
|
|
||||||
// ReSharper restore AssignmentIsFullyDiscarded
|
|
||||||
GetMessageBoxStandard(UI.Title_Error, UI.Incorrect_metadata_sidecar_file, ButtonEnum.Ok, Icon.Error)
|
|
||||||
.ShowWindowDialogAsync(_view);
|
.ShowWindowDialogAsync(_view);
|
||||||
|
|
||||||
ExistingMetadata = false;
|
ExistingMetadata = false;
|
||||||
@@ -679,7 +677,7 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
|
|||||||
_outputPrefix,
|
_outputPrefix,
|
||||||
Destination,
|
Destination,
|
||||||
parsedOptions,
|
parsedOptions,
|
||||||
_sidecar,
|
Sidecar,
|
||||||
(uint)Skipped,
|
(uint)Skipped,
|
||||||
!ExistingMetadata,
|
!ExistingMetadata,
|
||||||
!Trim,
|
!Trim,
|
||||||
|
|||||||
Reference in New Issue
Block a user