From 740348fefc3872d74b1a49752e48e36c20656303 Mon Sep 17 00:00:00 2001 From: sr55 Date: Mon, 14 Jan 2019 22:17:45 +0000 Subject: WinGui: Initial support for SSA file import. --- .../Services/Encode/Factories/EncodeTaskFactory.cs | 5 +++-- .../Services/Encode/Factories/EncodeTaskImportFactory.cs | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'win/CS/HandBrakeWPF/Services') 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; } -- cgit v1.2.3