Remove subtitle profile toggle from UI
This commit is contained in:
parent
2e6c26178f
commit
7f3c2ca999
@ -973,19 +973,6 @@
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellEditingTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="Субтитры" Width="95">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Subtitles}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
<DataGridTemplateColumn.CellEditingTemplate>
|
||||
<DataTemplate>
|
||||
<ComboBox ItemsSource="{Binding DataContext.ConversionYesNoOptions, ElementName=RootWindow}"
|
||||
SelectedItem="{Binding Subtitles, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellEditingTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="Внешние дорожки" Width="125">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
@ -24,7 +24,6 @@ public sealed class AddFilesSettingsViewModel : INotifyPropertyChanged
|
||||
private string _videoBitrateCustomMbps = string.Empty;
|
||||
private string _audio = string.Empty;
|
||||
private string _audioBitrate = string.Empty;
|
||||
private bool _subtitles;
|
||||
private bool _externalTracks;
|
||||
private bool _externalSubtitles;
|
||||
private bool _fonts;
|
||||
@ -137,7 +136,6 @@ public sealed class AddFilesSettingsViewModel : INotifyPropertyChanged
|
||||
public string VideoBitrateCustomMbps { get => _videoBitrateCustomMbps; set => SetField(ref _videoBitrateCustomMbps, value); }
|
||||
public string Audio { get => _audio; set => SetField(ref _audio, value); }
|
||||
public string AudioBitrate { get => _audioBitrate; set => SetField(ref _audioBitrate, value); }
|
||||
public bool Subtitles { get => _subtitles; set => SetField(ref _subtitles, value); }
|
||||
public bool ExternalTracks { get => _externalTracks; set => SetField(ref _externalTracks, value); }
|
||||
public bool ExternalSubtitles { get => _externalSubtitles; set => SetField(ref _externalSubtitles, value); }
|
||||
public bool Fonts { get => _fonts; set => SetField(ref _fonts, value); }
|
||||
@ -176,7 +174,6 @@ public sealed class AddFilesSettingsViewModel : INotifyPropertyChanged
|
||||
VideoBitrateCustomMbps = VideoBitrateCustomMbps,
|
||||
Audio = Audio,
|
||||
AudioBitrate = AudioBitrate,
|
||||
Subtitles = Subtitles,
|
||||
ExternalTracks = ExternalTracks,
|
||||
ExternalSubtitles = ExternalSubtitles,
|
||||
Fonts = Fonts,
|
||||
@ -201,7 +198,6 @@ public sealed class AddFilesSettingsViewModel : INotifyPropertyChanged
|
||||
VideoBitrateCustomMbps = profile.VideoBitrateMbps?.ToString("0.###", CultureInfo.InvariantCulture) ?? string.Empty;
|
||||
Audio = profile.Audio;
|
||||
AudioBitrate = profile.Bitrate;
|
||||
Subtitles = IsYes(profile.Subtitles);
|
||||
ExternalTracks = IsYes(profile.ExternalTracks);
|
||||
ExternalSubtitles = IsYes(profile.ExternalSubtitles);
|
||||
Fonts = IsYes(profile.Fonts);
|
||||
@ -219,7 +215,6 @@ public sealed class AddFilesSettingsViewModel : INotifyPropertyChanged
|
||||
if (changed.Contains("VideoBitrateMbps")) VideoBitrateCustomMbps = state.VideoBitrateCustomMbps;
|
||||
if (changed.Contains("Audio")) Audio = state.Audio;
|
||||
if (changed.Contains("Bitrate")) AudioBitrate = state.AudioBitrate;
|
||||
if (changed.Contains("Subtitles")) Subtitles = state.Subtitles;
|
||||
if (changed.Contains("ExternalTracks")) ExternalTracks = state.ExternalTracks;
|
||||
if (changed.Contains("ExternalSubtitles")) ExternalSubtitles = state.ExternalSubtitles;
|
||||
if (changed.Contains("Fonts")) Fonts = state.Fonts;
|
||||
@ -261,7 +256,7 @@ public sealed class AddFilesSettingsViewModel : INotifyPropertyChanged
|
||||
Bitrate = AudioBitrate,
|
||||
VideoBitrateMode = VideoBitrateMode,
|
||||
VideoBitrateMbps = IsVideoBitrateCustomVisible && TryParseCustomVideoBitrate(VideoBitrateCustomMbps, out var mbps) ? mbps : null,
|
||||
Subtitles = ToYesNo(Subtitles),
|
||||
Subtitles = _sourceProfile.Subtitles,
|
||||
ExternalTracks = ToYesNo(ExternalTracks),
|
||||
ExternalSubtitles = ToYesNo(ExternalSubtitles),
|
||||
Fonts = ToYesNo(Fonts)
|
||||
@ -348,7 +343,6 @@ public sealed class AddFilesSettingsState
|
||||
public string VideoBitrateCustomMbps { get; init; } = string.Empty;
|
||||
public string Audio { get; init; } = string.Empty;
|
||||
public string AudioBitrate { get; init; } = string.Empty;
|
||||
public bool Subtitles { get; init; }
|
||||
public bool ExternalTracks { get; init; }
|
||||
public bool ExternalSubtitles { get; init; }
|
||||
public bool Fonts { get; init; }
|
||||
|
||||
@ -144,7 +144,6 @@
|
||||
|
||||
<GroupBox Grid.Column="2" Header="Прочие настройки" Style="{StaticResource AddSettingsGroup}">
|
||||
<WrapPanel>
|
||||
<CheckBox Content="Субтитры" IsChecked="{Binding Subtitles, Mode=TwoWay}" Margin="0,0,14,4" />
|
||||
<CheckBox Content="Удалять иностранные дорожки" IsChecked="{Binding RemoveForeignTracks, Mode=TwoWay}" Margin="0,0,14,4" />
|
||||
<CheckBox Content="Отключать субтитры" IsChecked="{Binding DisableSubtitleDefault, Mode=TwoWay}" Margin="0,0,14,4" />
|
||||
</WrapPanel>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user