mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-24 02:56:31 +00:00
Add more channel features
This commit is contained in:
8
MediaBrowser.Controller/Channels/ChannelCategoryItem.cs
Normal file
8
MediaBrowser.Controller/Channels/ChannelCategoryItem.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
|
||||
namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
public class ChannelCategoryItem : Folder
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,10 @@ namespace MediaBrowser.Controller.Channels
|
||||
public ChannelMediaContentType ContentType { get; set; }
|
||||
|
||||
public Dictionary<string, string> ProviderIds { get; set; }
|
||||
|
||||
|
||||
public DateTime? PremiereDate { get; set; }
|
||||
public int? ProductionYear { get; set; }
|
||||
|
||||
public ChannelItemInfo()
|
||||
{
|
||||
Genres = new List<string>();
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -44,19 +47,24 @@ namespace MediaBrowser.Controller.Channels
|
||||
/// <summary>
|
||||
/// Gets the channel items.
|
||||
/// </summary>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <param name="query">The query.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{IEnumerable{ChannelItem}}.</returns>
|
||||
Task<IEnumerable<ChannelItemInfo>> GetChannelItems(User user, CancellationToken cancellationToken);
|
||||
Task<ChannelItemResult> GetChannelItems(InternalChannelItemQuery query, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel items.
|
||||
/// Gets the channel image.
|
||||
/// </summary>
|
||||
/// <param name="categoryId">The category identifier.</param>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{IEnumerable{ChannelItem}}.</returns>
|
||||
Task<IEnumerable<ChannelItemInfo>> GetChannelItems(string categoryId, User user, CancellationToken cancellationToken);
|
||||
/// <returns>Task{DynamicImageInfo}.</returns>
|
||||
Task<DynamicImageResponse> GetChannelImage(ImageType type, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the supported channel images.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable{ImageType}.</returns>
|
||||
IEnumerable<ImageType> GetSupportedChannelImages();
|
||||
}
|
||||
|
||||
public class ChannelCapabilities
|
||||
@@ -68,4 +76,18 @@ namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
public string SearchTerm { get; set; }
|
||||
}
|
||||
|
||||
public class InternalChannelItemQuery
|
||||
{
|
||||
public string CategoryId { get; set; }
|
||||
|
||||
public User User { get; set; }
|
||||
}
|
||||
|
||||
public class ChannelItemResult
|
||||
{
|
||||
public List<ChannelItemInfo> Items { get; set; }
|
||||
|
||||
public TimeSpan CacheLength { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
<Compile Include="..\SharedVersion.cs">
|
||||
<Link>Properties\SharedVersion.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Channels\ChannelCategoryItem.cs" />
|
||||
<Compile Include="Channels\ChannelItemInfo.cs" />
|
||||
<Compile Include="Channels\IChannel.cs" />
|
||||
<Compile Include="Channels\IChannelManager.cs" />
|
||||
|
||||
Reference in New Issue
Block a user