mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 22:38:30 +01:00
calculate item by name counts on the fly
This commit is contained in:
67
MediaBrowser.Controller/Channels/ChannelItemInfo.cs
Normal file
67
MediaBrowser.Controller/Channels/ChannelItemInfo.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
public class ChannelItemInfo
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Id { get; set; }
|
||||
|
||||
public ChannelItemType Type { get; set; }
|
||||
|
||||
public string OfficialRating { get; set; }
|
||||
|
||||
public string Overview { get; set; }
|
||||
|
||||
public List<string> Genres { get; set; }
|
||||
|
||||
public List<PersonInfo> People { get; set; }
|
||||
|
||||
public float? CommunityRating { get; set; }
|
||||
|
||||
public long? RunTimeTicks { get; set; }
|
||||
|
||||
public bool IsInfinite { get; set; }
|
||||
|
||||
public string ImageUrl { get; set; }
|
||||
|
||||
public ChannelMediaType MediaType { get; set; }
|
||||
|
||||
public ChannelMediaContentType ContentType { get; set; }
|
||||
|
||||
public ChannelItemInfo()
|
||||
{
|
||||
Genres = new List<string>();
|
||||
People = new List<PersonInfo>();
|
||||
}
|
||||
}
|
||||
|
||||
public enum ChannelItemType
|
||||
{
|
||||
Media = 0,
|
||||
|
||||
Category = 1
|
||||
}
|
||||
|
||||
public enum ChannelMediaType
|
||||
{
|
||||
Audio = 0,
|
||||
|
||||
Video = 1
|
||||
}
|
||||
|
||||
public enum ChannelMediaContentType
|
||||
{
|
||||
Clip = 0,
|
||||
|
||||
Podcast = 1,
|
||||
|
||||
Trailer = 2,
|
||||
|
||||
Movie = 3,
|
||||
|
||||
Episode = 4
|
||||
}
|
||||
}
|
||||
57
MediaBrowser.Controller/Channels/IChannel.cs
Normal file
57
MediaBrowser.Controller/Channels/IChannel.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
public interface IChannel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the home page URL.
|
||||
/// </summary>
|
||||
/// <value>The home page URL.</value>
|
||||
string HomePageUrl { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the capabilities.
|
||||
/// </summary>
|
||||
/// <returns>ChannelCapabilities.</returns>
|
||||
ChannelCapabilities GetCapabilities();
|
||||
|
||||
/// <summary>
|
||||
/// Searches the specified search term.
|
||||
/// </summary>
|
||||
/// <param name="searchTerm">The search term.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{IEnumerable{ChannelItemInfo}}.</returns>
|
||||
Task<IEnumerable<ChannelItemInfo>> Search(string searchTerm, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel items.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{IEnumerable{ChannelItem}}.</returns>
|
||||
Task<IEnumerable<ChannelItemInfo>> GetChannelItems(CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel items.
|
||||
/// </summary>
|
||||
/// <param name="categoryId">The category identifier.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{IEnumerable{ChannelItem}}.</returns>
|
||||
Task<IEnumerable<ChannelItemInfo>> GetChannelItems(string categoryId, CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
public class ChannelCapabilities
|
||||
{
|
||||
public bool CanSearch { get; set; }
|
||||
|
||||
public bool CanBeIndexed { get; set; }
|
||||
}
|
||||
}
|
||||
12
MediaBrowser.Controller/Channels/IChannelManager.cs
Normal file
12
MediaBrowser.Controller/Channels/IChannelManager.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
public interface IChannelManager
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user