diff options
author | sr55 <[email protected]> | 2019-01-14 22:17:45 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2019-01-14 22:18:05 +0000 |
commit | 740348fefc3872d74b1a49752e48e36c20656303 (patch) | |
tree | cd26954a9c7eae2d5cf76d9291feba4056e7d81e /win/CS/HandBrakeWPF | |
parent | 8f99ad6571508d67b237ef106dc60c6cbec88f6d (diff) |
WinGui: Initial support for SSA file import.
Diffstat (limited to 'win/CS/HandBrakeWPF')
7 files changed, 21 insertions, 20 deletions
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index f63893372..df97f4a66 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -4660,11 +4660,11 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to Import SRT. + /// Looks up a localized string similar to Import Subtitle. /// </summary> - public static string SubtitlesView_ImportSRT { + public static string SubtitlesView_ImportSubtitle { get { - return ResourceManager.GetString("SubtitlesView_ImportSRT", resourceCulture); + return ResourceManager.GetString("SubtitlesView_ImportSubtitle", resourceCulture); } } diff --git a/win/CS/HandBrakeWPF/Properties/Resources.de.resx b/win/CS/HandBrakeWPF/Properties/Resources.de.resx index ae572bb56..de7a22085 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.de.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.de.resx @@ -1641,8 +1641,8 @@ Dies beeinflusst nicht die momentanen Einstellungen im Untertitel-Tab. </value> <data name="SubtitlesView_BurnInBehaviour" xml:space="preserve"> <value>Einbrennverhalten:</value> </data> - <data name="SubtitlesView_ImportSRT" xml:space="preserve"> - <value>SRT importieren</value> + <data name="SubtitlesView_ImportSubtitle" xml:space="preserve"> + <value>SRT / SSA importieren</value> </data> <data name="SubtitlesView_TrackSelectionBehaviour" xml:space="preserve"> <value>Spurverhalten:</value> diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index f611f0020..baf8533d9 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -1642,8 +1642,8 @@ This will not affect your current settings in the Subtitle tab.</value> <data name="SubtitlesView_BurnInBehaviour" xml:space="preserve">
<value>Burn-In Behaviour:</value>
</data>
- <data name="SubtitlesView_ImportSRT" xml:space="preserve">
- <value>Import SRT</value>
+ <data name="SubtitlesView_ImportSubtitle" xml:space="preserve">
+ <value>Import Subtitle</value>
</data>
<data name="SubtitlesView_TrackSelectionBehaviour" xml:space="preserve">
<value>Track Selection Behaviour:</value>
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs index 46ff1e97a..3c6e4d35c 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs @@ -234,9 +234,10 @@ namespace HandBrakeWPF.Services.Encode.Factories Default = item.Default, Offset = item.SrtOffset, Burn = item.Burned, - SRT = - new SRT + Import = + new SubImport { + Format = item.SrtPath.EndsWith("srt") ? "SRT" : "SSA", Filename = item.SrtPath, Codeset = item.SrtCharCode, Language = item.SrtLangCode diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskImportFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskImportFactory.cs index ea19c367e..3daf6b353 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskImportFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskImportFactory.cs @@ -260,12 +260,12 @@ namespace HandBrakeWPF.Services.Encode.Factories subtitleTrack.Default = subtitle.Default; subtitleTrack.Forced = subtitle.Forced; - if (!string.IsNullOrEmpty(subtitle.SRT.Filename)) + if (!string.IsNullOrEmpty(subtitle.Import.Filename)) { - subtitleTrack.SubtitleType = SubtitleType.SRT; - subtitleTrack.SrtCharCode = subtitle.SRT.Codeset; - subtitleTrack.SrtFileName = subtitle.SRT.Filename; - subtitleTrack.SrtLangCode = subtitle.SRT.Language; + subtitleTrack.SubtitleType = subtitle.Import.Filename.EndsWith("srt") ? SubtitleType.SRT : SubtitleType.SSA; + subtitleTrack.SrtCharCode = subtitle.Import.Codeset; + subtitleTrack.SrtFileName = subtitle.Import.Filename; + subtitleTrack.SrtLangCode = subtitle.Import.Language; subtitleTrack.SrtLang = HandBrakeLanguagesHelper.Get(subtitleTrack.SrtLangCode).EnglishName; subtitleTrack.SrtOffset = subtitleTrack.SrtOffset; } diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs index a847bc060..e164f1192 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs @@ -238,11 +238,11 @@ namespace HandBrakeWPF.ViewModels public void Import()
{
OpenFileDialog dialog = new OpenFileDialog
- {
- Filter = "SRT files (*.srt)|*.srt",
- CheckFileExists = true,
- Multiselect = true
- };
+ {
+ Filter = "Subtitle files (*.srt, *.ssa)|*.srt;*.ssa",
+ CheckFileExists = true,
+ Multiselect = true
+ };
if (this.Task != null && this.Task.Source != null)
{
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml index 9bec61cc4..01195259a 100644 --- a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml +++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml @@ -84,7 +84,7 @@ <Button MinWidth="75" Grid.Column="1"
cal:Message.Attach="[Event Click] = [Action Import]"
- Content="{x:Static Properties:Resources.SubtitlesView_ImportSRT}"
+ Content="{x:Static Properties:Resources.SubtitlesView_ImportSubtitle}"
Margin="0,0,10,0"/>
<Button MinWidth="65" Grid.Column="2"
Margin="0,0,10,0"
|