mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2026-02-17 15:18:36 -06:00
FF-1408 - updated audio set language to look for orig and use original language if set
This commit is contained in:
@@ -45,6 +45,20 @@ public class FfmpegBuilderAudioSetLanguage : FfmpegBuilderNode
|
||||
args.Logger?.WLog("No language set");
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (language.ToLowerInvariant().Contains("orig"))
|
||||
{
|
||||
if (Variables.TryGetValue("OriginalLanguage", out object oLang) == false || string.IsNullOrEmpty(oLang as string))
|
||||
{
|
||||
args.Logger?.ILog("OriginalLanguage not found in varaibles.");
|
||||
return 2;
|
||||
}
|
||||
|
||||
language = oLang as string;
|
||||
language = LanguageHelper.GetIso2Code(language);
|
||||
args.Logger?.ILog("Using original language:" + language);
|
||||
}
|
||||
|
||||
if (StreamType == "Subtitle" || StreamType == "Both")
|
||||
{
|
||||
foreach (var at in Model.SubtitleStreams)
|
||||
|
||||
Reference in New Issue
Block a user