|
|
@ -4,27 +4,18 @@ using System.Linq;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Entities
|
|
|
|
namespace MediaBrowser.Controller.Entities
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// Class Extensions
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
public static class Extensions
|
|
|
|
public static class Extensions
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Adds the tagline.
|
|
|
|
/// Adds the trailer URL.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
/// <param name="tagline">The tagline.</param>
|
|
|
|
/// <param name="url">The URL.</param>
|
|
|
|
/// <exception cref="System.ArgumentNullException">tagline</exception>
|
|
|
|
/// <param name="isDirectLink">if set to <c>true</c> [is direct link].</param>
|
|
|
|
public static void AddTagline(this BaseItem item, string tagline)
|
|
|
|
/// <exception cref="System.ArgumentNullException">url</exception>
|
|
|
|
{
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(tagline))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw new ArgumentNullException("tagline");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!item.Taglines.Contains(tagline, StringComparer.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
item.Taglines.Add(tagline);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void AddTrailerUrl(this BaseItem item, string url, bool isDirectLink)
|
|
|
|
public static void AddTrailerUrl(this BaseItem item, string url, bool isDirectLink)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (string.IsNullOrWhiteSpace(url))
|
|
|
|
if (string.IsNullOrWhiteSpace(url))
|
|
|
|