aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authorPika <15848969+ThatNerdyPikachu@users.noreply.github.com>2020-07-23 19:12:52 -0400
committerGitHub <noreply@github.com>2020-07-23 19:12:52 -0400
commitf5a3408c89663901808f516400ec04e64f1dd463 (patch)
tree14e1c4dbcc150bddd152a1ec4b9e90ed46e648d7 /MediaBrowser.Model
parent3b21abd879c278bdc7d2f02a62eba3a57cb55987 (diff)
Update MediaBrowser.Model/Entities/MediaStream.cs
Co-authored-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index 5d2897d1ee..58b46519c9 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -223,12 +223,17 @@ namespace MediaBrowser.Model.Entities
if (!string.IsNullOrEmpty(Title))
{
- return attributes.AsEnumerable()
- // keep Tags that are not already in Title
- .Where(tag => Title.IndexOf(tag, StringComparison.OrdinalIgnoreCase) == -1)
- // attributes concatenation, starting with Title
- .Aggregate(new StringBuilder(Title), (builder, attr) => builder.Append(" - ").Append(attr))
- .ToString();
+ var result = new StringBuilder(Title);
+ foreach (var tag in attributes)
+ {
+ // Keep Tags that are not already in Title.
+ if (Title.IndexOf(tag, StringComparison.OrdinalIgnoreCase) == -1)
+ {
+ result.Append(" - ").Append(tag);
+ }
+ }
+
+ return result.ToString();
}
return string.Join(" - ", attributes.ToArray());