update storage of genres, studios, tags, & keywords

This commit is contained in:
Luke Pulverenti
2016-05-31 14:07:54 -04:00
parent e0bfbffa75
commit 977f62336b
20 changed files with 58 additions and 106 deletions

View File

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