update tag saving

This commit is contained in:
Luke Pulverenti
2016-06-02 13:43:29 -04:00
parent 85c508bcd1
commit ae168bc563
21 changed files with 35 additions and 106 deletions

View File

@@ -0,0 +1,21 @@
using System;
using System.Linq;
namespace MediaBrowser.Controller.Entities
{
public static class TagExtensions
{
public static void AddTag(this BaseItem item, string name)
{
if (string.IsNullOrWhiteSpace(name))
{
throw new ArgumentNullException("name");
}
if (!item.Tags.Contains(name, StringComparer.OrdinalIgnoreCase))
{
item.Tags.Add(name);
}
}
}
}