Added: Separate naming tags for AudioLanguage and SubtitleLanguage (#2261) (Fixes #2257)

fhscholl 7 years ago committed by Leonardo Galli
parent 172cf4d06e
commit 95bc93042c

@ -844,12 +844,13 @@ namespace NzbDrone.Core.Organizer
{
mediaInfoAudioLanguages = string.Format("[{0}]", mediaInfoAudioLanguages);
}
var mediaInfoAudioLanguagesAll = mediaInfoAudioLanguages;
if (mediaInfoAudioLanguages == "[EN]")
{
mediaInfoAudioLanguages = string.Empty;
}
var mediaInfoSubtitleLanguages = GetLanguagesToken(movieFile.MediaInfo.Subtitles);
if (!mediaInfoSubtitleLanguages.IsNullOrWhiteSpace())
{
@ -872,6 +873,9 @@ namespace NzbDrone.Core.Organizer
tokenHandlers["{MediaInfo Simple}"] = m => string.Format("{0} {1}", videoCodec, audioCodec);
tokenHandlers["{MediaInfo Full}"] = m => string.Format("{0} {1}{2} {3}", videoCodec, audioCodec, mediaInfoAudioLanguages, mediaInfoSubtitleLanguages);
tokenHandlers["{MediaInfo AudioLanguages}"] = m => mediaInfoAudioLanguages;
tokenHandlers["{MediaInfo AudioLanguagesAll}"] = m => mediaInfoAudioLanguagesAll;
tokenHandlers["{MediaInfo SubtitleLanguages}"] = m => mediaInfoSubtitleLanguages;
}
private string GetLanguagesToken(string mediaInfoLanguages)

@ -7,5 +7,14 @@
<li><a href="#" data-token="MediaInfo Full">MediaInfo Full</a></li>
<li><a href="#" data-token="MediaInfo.Full">MediaInfo.Full</a></li>
<li><a href="#" data-token="MediaInfo_Full">MediaInfo_Full</a></li>
<li><a href="#" data-token="MediaInfo AudioLanguages">MediaInfo AudioLanguages</a></li>
<li><a href="#" data-token="MediaInfo.AudioLanguages">MediaInfo.AudioLanguages</a></li>
<li><a href="#" data-token="MediaInfo_AudioLanguages">MediaInfo_AudioLanguages</a></li>
<li><a href="#" data-token="MediaInfo AudioLanguagesAll">MediaInfo AudioLanguagesAll</a></li>
<li><a href="#" data-token="MediaInfo.AudioLanguagesAll">MediaInfo.AudioLanguagesAll</a></li>
<li><a href="#" data-token="MediaInfo_AudioLanguagesAll">MediaInfo_AudioLanguagesAll</a></li>
<li><a href="#" data-token="MediaInfo SubtitleLanguages">MediaInfo SubtitleLanguages</a></li>
<li><a href="#" data-token="MediaInfo.SubtitleLanguages">MediaInfo.SubtitleLanguages</a></li>
<li><a href="#" data-token="MediaInfo_SubtitleLanguages">MediaInfo_SubtitleLanguages</a></li>
</ul>
</li>

Loading…
Cancel
Save