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/Services | |
parent | 8f99ad6571508d67b237ef106dc60c6cbec88f6d (diff) |
WinGui: Initial support for SSA file import.
Diffstat (limited to 'win/CS/HandBrakeWPF/Services')
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs | 5 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskImportFactory.cs | 10 |
2 files changed, 8 insertions, 7 deletions
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; } |