mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-15 10:43:30 +01:00
Add GPL modules
This commit is contained in:
39
MediaBrowser.Controller/Entities/IHasTrailers.cs
Normal file
39
MediaBrowser.Controller/Entities/IHasTrailers.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using MediaBrowser.Model.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
public interface IHasTrailers : IHasProviderIds
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the remote trailers.
|
||||
/// </summary>
|
||||
/// <value>The remote trailers.</value>
|
||||
MediaUrl[] RemoteTrailers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the local trailer ids.
|
||||
/// </summary>
|
||||
/// <value>The local trailer ids.</value>
|
||||
Guid[] LocalTrailerIds { get; set; }
|
||||
Guid[] RemoteTrailerIds { get; set; }
|
||||
Guid Id { get; set; }
|
||||
}
|
||||
|
||||
public static class HasTrailerExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the trailer ids.
|
||||
/// </summary>
|
||||
/// <returns>List<Guid>.</returns>
|
||||
public static List<Guid> GetTrailerIds(this IHasTrailers item)
|
||||
{
|
||||
var list = item.LocalTrailerIds.ToList();
|
||||
list.AddRange(item.RemoteTrailerIds);
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user