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