using System;
using System.Collections.Generic;
using System.Linq;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Controller.Entities
{
public interface IHasTrailers : IHasProviderIds
{
///
/// 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; }
Guid Id { 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;
}
}
}