2013-12-02 09:46:25 -07:00
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2016-04-08 21:16:53 -07:00
|
|
|
|
using System.Linq;
|
2013-12-02 09:46:25 -07:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Entities
|
|
|
|
|
{
|
2017-09-18 09:52:22 -07:00
|
|
|
|
public interface IHasTrailers : IHasMetadata
|
2013-12-02 09:46:25 -07:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the remote trailers.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The remote trailers.</value>
|
2017-08-10 11:01:31 -07:00
|
|
|
|
MediaUrl[] RemoteTrailers { get; set; }
|
2013-12-02 09:46:25 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the local trailer ids.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The local trailer ids.</value>
|
2017-08-10 11:01:31 -07:00
|
|
|
|
Guid[] LocalTrailerIds { get; set; }
|
|
|
|
|
Guid[] RemoteTrailerIds { get; set; }
|
2016-04-08 21:16:53 -07:00
|
|
|
|
}
|
2014-12-10 23:20:28 -07:00
|
|
|
|
|
2016-04-08 21:16:53 -07:00
|
|
|
|
public static class HasTrailerExtensions
|
|
|
|
|
{
|
2014-12-10 23:20:28 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the trailer ids.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>List<Guid>.</returns>
|
2016-04-08 21:16:53 -07:00
|
|
|
|
public static List<Guid> GetTrailerIds(this IHasTrailers item)
|
|
|
|
|
{
|
|
|
|
|
var list = item.LocalTrailerIds.ToList();
|
|
|
|
|
list.AddRange(item.RemoteTrailerIds);
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
2013-12-02 09:46:25 -07:00
|
|
|
|
}
|
|
|
|
|
}
|