using MediaBrowser.Model.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
namespace MediaBrowser.Controller.Entities
{
public interface IHasTrailers : IHasMetadata
{
///
/// Gets or sets the remote trailers.
///
/// The remote trailers.
MediaUrl[] RemoteTrailers { get; set; }
///
/// Gets or sets the local trailer ids.
///
/// The local trailer ids.
Guid[] LocalTrailerIds { get; set; }
Guid[] RemoteTrailerIds { get; set; }
}
public static class HasTrailerExtensions
{
///
/// Gets the trailer ids.
///
/// List<Guid>.
public static List GetTrailerIds(this IHasTrailers item)
{
var list = item.LocalTrailerIds.ToList();
list.AddRange(item.RemoteTrailerIds);
return list;
}
}
}