mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 09:34:44 +01:00
update channels
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
@@ -7,8 +6,6 @@ namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
public List<ChannelItemInfo> Items { get; set; }
|
||||
|
||||
public TimeSpan CacheLength { get; set; }
|
||||
|
||||
public int? TotalRecordCount { get; set; }
|
||||
}
|
||||
}
|
||||
15
MediaBrowser.Controller/Channels/ChannelParentalRating.cs
Normal file
15
MediaBrowser.Controller/Channels/ChannelParentalRating.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
public enum ChannelParentalRating
|
||||
{
|
||||
GeneralAudience = 0,
|
||||
|
||||
UsPG = 1,
|
||||
|
||||
UsPG13 = 2,
|
||||
|
||||
UsR = 3,
|
||||
|
||||
Adult = 4
|
||||
}
|
||||
}
|
||||
@@ -3,5 +3,7 @@
|
||||
public class ChannelSearchInfo
|
||||
{
|
||||
public string SearchTerm { get; set; }
|
||||
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
@@ -27,6 +26,12 @@ namespace MediaBrowser.Controller.Channels
|
||||
/// <value>The home page URL.</value>
|
||||
string HomePageUrl { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the parental rating.
|
||||
/// </summary>
|
||||
/// <value>The parental rating.</value>
|
||||
ChannelParentalRating ParentalRating { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel information.
|
||||
/// </summary>
|
||||
@@ -36,26 +41,9 @@ namespace MediaBrowser.Controller.Channels
|
||||
/// <summary>
|
||||
/// Determines whether [is enabled for] [the specified user].
|
||||
/// </summary>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <param name="userId">The user identifier.</param>
|
||||
/// <returns><c>true</c> if [is enabled for] [the specified user]; otherwise, <c>false</c>.</returns>
|
||||
bool IsEnabledFor(User user);
|
||||
|
||||
/// <summary>
|
||||
/// Searches the specified search term.
|
||||
/// </summary>
|
||||
/// <param name="searchInfo">The search information.</param>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{IEnumerable{ChannelItemInfo}}.</returns>
|
||||
Task<IEnumerable<ChannelItemInfo>> Search(ChannelSearchInfo searchInfo, User user, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all media.
|
||||
/// </summary>
|
||||
/// <param name="query">The query.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{ChannelItemResult}.</returns>
|
||||
Task<ChannelItemResult> GetAllMedia(InternalAllChannelMediaQuery query, CancellationToken cancellationToken);
|
||||
bool IsEnabledFor(string userId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel items.
|
||||
@@ -79,15 +67,4 @@ namespace MediaBrowser.Controller.Channels
|
||||
/// <returns>IEnumerable{ImageType}.</returns>
|
||||
IEnumerable<ImageType> GetSupportedChannelImages();
|
||||
}
|
||||
|
||||
public interface IRequiresMediaInfoCallback
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the channel item media information.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{IEnumerable{ChannelMediaInfo}}.</returns>
|
||||
Task<IEnumerable<ChannelMediaInfo>> GetChannelItemMediaInfo(string id, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
13
MediaBrowser.Controller/Channels/IHasCacheKey.cs
Normal file
13
MediaBrowser.Controller/Channels/IHasCacheKey.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
public interface IHasCacheKey
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the cache key.
|
||||
/// </summary>
|
||||
/// <param name="userId">The user identifier.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
string GetCacheKey(string userId);
|
||||
}
|
||||
}
|
||||
16
MediaBrowser.Controller/Channels/IIndexableChannel.cs
Normal file
16
MediaBrowser.Controller/Channels/IIndexableChannel.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
public interface IIndexableChannel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets all media.
|
||||
/// </summary>
|
||||
/// <param name="query">The query.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{ChannelItemResult}.</returns>
|
||||
Task<ChannelItemResult> GetAllMedia(InternalAllChannelMediaQuery query, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
public interface IRequiresMediaInfoCallback
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the channel item media information.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{IEnumerable{ChannelMediaInfo}}.</returns>
|
||||
Task<IEnumerable<ChannelMediaInfo>> GetChannelItemMediaInfo(string id, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
17
MediaBrowser.Controller/Channels/ISearchableChannel.cs
Normal file
17
MediaBrowser.Controller/Channels/ISearchableChannel.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
public interface ISearchableChannel
|
||||
{
|
||||
/// <summary>
|
||||
/// Searches the specified search term.
|
||||
/// </summary>
|
||||
/// <param name="searchInfo">The search information.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{IEnumerable{ChannelItemInfo}}.</returns>
|
||||
Task<IEnumerable<ChannelItemInfo>> Search(ChannelSearchInfo searchInfo, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
public class InternalAllChannelMediaQuery
|
||||
{
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -5,18 +5,6 @@ namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
public class InternalChannelFeatures
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance can search.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance can search; otherwise, <c>false</c>.</value>
|
||||
public bool CanSearch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance can get all media.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance can get all media; otherwise, <c>false</c>.</value>
|
||||
public bool CanGetAllMedia { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media types.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Model.Channels;
|
||||
using MediaBrowser.Model.Channels;
|
||||
|
||||
namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
@@ -7,7 +6,7 @@ namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
public string FolderId { get; set; }
|
||||
|
||||
public User User { get; set; }
|
||||
public string UserId { get; set; }
|
||||
|
||||
public int? StartIndex { get; set; }
|
||||
|
||||
@@ -17,9 +16,4 @@ namespace MediaBrowser.Controller.Channels
|
||||
|
||||
public bool SortDescending { get; set; }
|
||||
}
|
||||
|
||||
public class InternalAllChannelMediaQuery
|
||||
{
|
||||
public User User { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -73,6 +73,7 @@
|
||||
<Compile Include="Channels\ChannelItemResult.cs" />
|
||||
<Compile Include="Channels\ChannelItemType.cs" />
|
||||
<Compile Include="Channels\ChannelMediaInfo.cs" />
|
||||
<Compile Include="Channels\ChannelParentalRating.cs" />
|
||||
<Compile Include="Channels\ChannelSearchInfo.cs" />
|
||||
<Compile Include="Channels\IChannel.cs" />
|
||||
<Compile Include="Channels\IChannelFactory.cs" />
|
||||
@@ -82,8 +83,13 @@
|
||||
<Compile Include="Channels\ChannelVideoItem.cs" />
|
||||
<Compile Include="Channels\Channel.cs" />
|
||||
<Compile Include="Channels\IChannelMediaItem.cs" />
|
||||
<Compile Include="Channels\IHasCacheKey.cs" />
|
||||
<Compile Include="Channels\IIndexableChannel.cs" />
|
||||
<Compile Include="Channels\InternalAllChannelMediaQuery.cs" />
|
||||
<Compile Include="Channels\InternalChannelFeatures.cs" />
|
||||
<Compile Include="Channels\InternalChannelItemQuery.cs" />
|
||||
<Compile Include="Channels\IRequiresMediaInfoCallback.cs" />
|
||||
<Compile Include="Channels\ISearchableChannel.cs" />
|
||||
<Compile Include="Chapters\ChapterSearchRequest.cs" />
|
||||
<Compile Include="Chapters\IChapterProvider.cs" />
|
||||
<Compile Include="Chapters\ChapterResponse.cs" />
|
||||
|
||||
Reference in New Issue
Block a user