diff options
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; } |