diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-18 13:05:57 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-18 13:05:57 -0400 |
| commit | 4d1d2bbaa15e89155bf5bf289ee190db6f155bca (patch) | |
| tree | 21824e5ece79f7931c9e1e3a7700317194e9bf0c /MediaBrowser.Controller/Channels | |
| parent | cd934c5d3d8ede6bf449905cfc0510729bea0000 (diff) | |
Add more channel features
Diffstat (limited to 'MediaBrowser.Controller/Channels')
| -rw-r--r-- | MediaBrowser.Controller/Channels/ChannelCategoryItem.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Channels/ChannelItemInfo.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Channels/IChannel.cs | 36 |
3 files changed, 41 insertions, 8 deletions
diff --git a/MediaBrowser.Controller/Channels/ChannelCategoryItem.cs b/MediaBrowser.Controller/Channels/ChannelCategoryItem.cs new file mode 100644 index 000000000..11e56ee07 --- /dev/null +++ b/MediaBrowser.Controller/Channels/ChannelCategoryItem.cs @@ -0,0 +1,8 @@ +using MediaBrowser.Controller.Entities; + +namespace MediaBrowser.Controller.Channels +{ + public class ChannelCategoryItem : Folder + { + } +} diff --git a/MediaBrowser.Controller/Channels/ChannelItemInfo.cs b/MediaBrowser.Controller/Channels/ChannelItemInfo.cs index f80ad8911..421d3e6f2 100644 --- a/MediaBrowser.Controller/Channels/ChannelItemInfo.cs +++ b/MediaBrowser.Controller/Channels/ChannelItemInfo.cs @@ -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>(); diff --git a/MediaBrowser.Controller/Channels/IChannel.cs b/MediaBrowser.Controller/Channels/IChannel.cs index 956eb67e8..773147a14 100644 --- a/MediaBrowser.Controller/Channels/IChannel.cs +++ b/MediaBrowser.Controller/Channels/IChannel.cs @@ -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; } + } } |
