diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-12-03 02:58:48 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-12-03 02:58:48 -0500 |
| commit | 68772e7d9b5273766e3a0e13c60ebec07254a924 (patch) | |
| tree | 61bbe0dd963fc43656dcbbf4a17e687eff8e6b75 /MediaBrowser.Model/Entities | |
| parent | 4a9c77c32713ed0a52597f9abb7313062ef1872f (diff) | |
update details
Diffstat (limited to 'MediaBrowser.Model/Entities')
| -rw-r--r-- | MediaBrowser.Model/Entities/MediaStream.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs index abdebba4ed..85f475ca25 100644 --- a/MediaBrowser.Model/Entities/MediaStream.cs +++ b/MediaBrowser.Model/Entities/MediaStream.cs @@ -118,7 +118,9 @@ namespace MediaBrowser.Model.Entities private string AddLanguageIfNeeded(string title) { - if (!string.IsNullOrEmpty(Language) && !string.Equals(Language, "und", StringComparison.OrdinalIgnoreCase) && title.IndexOf(Language, StringComparison.OrdinalIgnoreCase) == -1) + if (!string.IsNullOrEmpty(Language) && + !string.Equals(Language, "und", StringComparison.OrdinalIgnoreCase) && + !IsLanguageInTitle(title, Language)) { title = StringHelper.FirstToUpper(Language) + " " + title; } @@ -126,6 +128,16 @@ namespace MediaBrowser.Model.Entities return title; } + private bool IsLanguageInTitle(string title, string language) + { + if (title.IndexOf(Language, StringComparison.OrdinalIgnoreCase) != -1) + { + return true; + } + + return false; + } + public string NalLengthSize { get; set; } /// <summary> |
