Merge pull request #7441 from 1337joe/add-external-stream-indicator

Add label for external audio/sub tracks
This commit is contained in:
Cody Robibero
2022-03-11 07:48:23 -07:00
committed by GitHub
6 changed files with 63 additions and 21 deletions

View File

@@ -140,6 +140,8 @@ namespace MediaBrowser.Model.Entities
public string LocalizedForced { get; set; }
public string LocalizedExternal { get; set; }
public string DisplayTitle
{
get
@@ -184,6 +186,11 @@ namespace MediaBrowser.Model.Entities
attributes.Add(string.IsNullOrEmpty(LocalizedDefault) ? "Default" : LocalizedDefault);
}
if (IsExternal)
{
attributes.Add(string.IsNullOrEmpty(LocalizedExternal) ? "External" : LocalizedExternal);
}
if (!string.IsNullOrEmpty(Title))
{
var result = new StringBuilder(Title);
@@ -274,6 +281,11 @@ namespace MediaBrowser.Model.Entities
attributes.Add(Codec.ToUpperInvariant());
}
if (IsExternal)
{
attributes.Add(string.IsNullOrEmpty(LocalizedExternal) ? "External" : LocalizedExternal);
}
if (!string.IsNullOrEmpty(Title))
{
var result = new StringBuilder(Title);