summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services/Encode
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-01-24 19:12:46 +0000
committersr55 <[email protected]>2017-01-24 19:12:46 +0000
commitc32a823816c58ffc8ea72394f40629f769830c09 (patch)
tree684f60806781ad718c4f98b40357d73d7d9d39e3 /win/CS/HandBrakeWPF/Services/Encode
parentca1dcccd09b5dfac93829d46fd6c7c9711898b77 (diff)
WinGui: Always use iso639 for srt language code rather than name. #541
Diffstat (limited to 'win/CS/HandBrakeWPF/Services/Encode')
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs2
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Model/Models/SubtitleTrack.cs23
2 files changed, 23 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
index 3a2a8057c..30aa9906d 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
@@ -239,7 +239,7 @@ namespace HandBrakeWPF.Services.Encode.Factories
{
Filename = item.SrtPath,
Codeset = item.SrtCharCode,
- Language = item.SrtLang
+ Language = item.SrtLangCode
}
};
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/SubtitleTrack.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/SubtitleTrack.cs
index b4cb45d61..b19fc80f4 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/SubtitleTrack.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/SubtitleTrack.cs
@@ -11,6 +11,8 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
{
using System;
+ using HandBrake.ApplicationServices.Utilities;
+
using HandBrakeWPF.Services.Scan.Model;
using HandBrakeWPF.Utilities;
@@ -46,6 +48,8 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
/// </summary>
private bool forced;
+ private string srtLang;
+
#endregion
#region Constructors and Destructors
@@ -198,7 +202,24 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
/// <summary>
/// Gets or sets the SRT Language
/// </summary>
- public string SrtLang { get; set; }
+ public string SrtLang
+ {
+ get
+ {
+ return this.srtLang;
+ }
+ set
+ {
+ this.srtLang = value;
+ string iso639 = LanguageUtilities.GetLanguageCode(this.srtLang);
+ this.SrtLangCode = iso639;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the srt lang code.
+ /// </summary>
+ public string SrtLangCode { get; set; }
/// <summary>
/// Gets or sets the SRT Offset