updated nuget
This commit is contained in:
parent
4c87979cac
commit
680ffeebf7
|
@ -36,18 +36,27 @@ namespace MediaBrowser.Api
|
|||
public int? Limit { get; set; }
|
||||
}
|
||||
|
||||
[Route("/Channels/{Id}/Features", "GET", Summary = "Gets features for a channel")]
|
||||
public class GetChannelFeatures : IReturn<ChannelFeatures>
|
||||
{
|
||||
[ApiMember(Name = "Id", Description = "Channel Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
[Route("/Channels/{Id}/Items", "GET", Summary = "Gets channel items")]
|
||||
public class GetChannelItems : IReturn<QueryResult<BaseItemDto>>
|
||||
{
|
||||
[ApiMember(Name = "Id", Description = "Channel Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[ApiMember(Name = "FolderId", Description = "Folder Id", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||
public string FolderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user id.
|
||||
/// </summary>
|
||||
/// <value>The user id.</value>
|
||||
[ApiMember(Name = "UserId", Description = "User Id", IsRequired = false, DataType = "string", ParameterType = "path", Verb = "GET")]
|
||||
[ApiMember(Name = "UserId", Description = "User Id", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||
public string UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -99,6 +108,13 @@ namespace MediaBrowser.Api
|
|||
_channelManager = channelManager;
|
||||
}
|
||||
|
||||
public object Get(GetChannelFeatures request)
|
||||
{
|
||||
var result = _channelManager.GetChannelFeatures(request.Id);
|
||||
|
||||
return ToOptimizedResult(result);
|
||||
}
|
||||
|
||||
public object Get(GetChannels request)
|
||||
{
|
||||
var result = _channelManager.GetChannels(new ChannelQuery
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Model.Channels;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
@ -11,6 +12,7 @@ namespace MediaBrowser.Controller.Channels
|
|||
public string ChannelId { get; set; }
|
||||
|
||||
public ChannelItemType ChannelItemType { get; set; }
|
||||
public ChannelFolderType ChannelFolderType { get; set; }
|
||||
|
||||
public string OriginalImageUrl { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
|
|
|
@ -33,6 +33,7 @@ namespace MediaBrowser.Controller.Channels
|
|||
public string ImageUrl { get; set; }
|
||||
|
||||
public ChannelMediaType MediaType { get; set; }
|
||||
public ChannelFolderType FolderType { get; set; }
|
||||
|
||||
public ChannelMediaContentType ContentType { get; set; }
|
||||
|
||||
|
|
|
@ -58,14 +58,6 @@ namespace MediaBrowser.Controller.Channels
|
|||
/// <returns>Task{IEnumerable{ChannelItem}}.</returns>
|
||||
Task<ChannelItemResult> GetChannelItems(InternalChannelItemQuery query, 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(InternalAllChannelItemsQuery query, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel image.
|
||||
/// </summary>
|
||||
|
|
|
@ -16,6 +16,13 @@ namespace MediaBrowser.Controller.Channels
|
|||
/// <param name="factories">The factories.</param>
|
||||
void AddParts(IEnumerable<IChannel> channels, IEnumerable<IChannelFactory> factories);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel features.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>ChannelFeatures.</returns>
|
||||
ChannelFeatures GetChannelFeatures(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel.
|
||||
/// </summary>
|
||||
|
|
|
@ -10,12 +10,6 @@ namespace MediaBrowser.Model.Channels
|
|||
/// <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 index all media.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance can index all media; otherwise, <c>false</c>.</value>
|
||||
public bool CanGetAllMedia { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media types.
|
||||
/// </summary>
|
||||
|
@ -33,11 +27,39 @@ namespace MediaBrowser.Model.Channels
|
|||
/// </summary>
|
||||
public int? MaxPageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the default sort orders.
|
||||
/// </summary>
|
||||
/// <value>The default sort orders.</value>
|
||||
public List<ChannelItemSortField> DefaultSortFields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if a sort ascending/descending toggle is supported or not.
|
||||
/// </summary>
|
||||
public bool SupportsSortOrderToggle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the channel content is just a single media list.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is single media list; otherwise, <c>false</c>.</value>
|
||||
public bool IsSingleMediaList { get; set; }
|
||||
|
||||
public ChannelFeatures()
|
||||
{
|
||||
MediaTypes = new List<ChannelMediaType>();
|
||||
ContentTypes = new List<ChannelMediaContentType>();
|
||||
|
||||
DefaultSortFields = new List<ChannelItemSortField>();
|
||||
}
|
||||
}
|
||||
|
||||
public enum ChannelItemSortField
|
||||
{
|
||||
Name = 0,
|
||||
CommunityRating = 1,
|
||||
ReleaseDate = 2,
|
||||
Runtime = 3,
|
||||
CommunityMostWatched = 4,
|
||||
UserPlayCount = 5
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,4 +8,13 @@
|
|||
|
||||
Photo = 2
|
||||
}
|
||||
|
||||
public enum ChannelFolderType
|
||||
{
|
||||
Container = 0,
|
||||
|
||||
MusicAlbum = 1,
|
||||
|
||||
PhotoAlbum = 2
|
||||
}
|
||||
}
|
|
@ -237,6 +237,15 @@ namespace MediaBrowser.Server.Implementations.Channels
|
|||
return (Channel)_libraryManager.GetItemById(new Guid(id));
|
||||
}
|
||||
|
||||
public ChannelFeatures GetChannelFeatures(string id)
|
||||
{
|
||||
var channel = GetChannel(id);
|
||||
|
||||
var channelProvider = GetChannelProvider(channel);
|
||||
|
||||
return channelProvider.GetChannelFeatures();
|
||||
}
|
||||
|
||||
private Guid GetInternalChannelId(string name)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
|
@ -267,7 +276,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
|||
|
||||
if (query.Limit.HasValue && query.Limit.Value > channelInfo.MaxPageSize.Value)
|
||||
{
|
||||
throw new ArgumentException(string.Format("Channel {0} only supports a maximum of {1} records at a time.", channel.Name, channelInfo.MaxPageSize.Value));
|
||||
throw new ArgumentException(string.Format("{0} channel only supports a maximum of {1} records at a time.", channel.Name, channelInfo.MaxPageSize.Value));
|
||||
}
|
||||
providerLimit = query.Limit;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MediaBrowser.Common.Internal</id>
|
||||
<version>3.0.378</version>
|
||||
<version>3.0.382</version>
|
||||
<title>MediaBrowser.Common.Internal</title>
|
||||
<authors>Luke</authors>
|
||||
<owners>ebr,Luke,scottisafool</owners>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
|
||||
<copyright>Copyright © Media Browser 2013</copyright>
|
||||
<dependencies>
|
||||
<dependency id="MediaBrowser.Common" version="3.0.378" />
|
||||
<dependency id="MediaBrowser.Common" version="3.0.382" />
|
||||
<dependency id="NLog" version="2.1.0" />
|
||||
<dependency id="SimpleInjector" version="2.5.0" />
|
||||
<dependency id="sharpcompress" version="0.10.2" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MediaBrowser.Common</id>
|
||||
<version>3.0.378</version>
|
||||
<version>3.0.382</version>
|
||||
<title>MediaBrowser.Common</title>
|
||||
<authors>Media Browser Team</authors>
|
||||
<owners>ebr,Luke,scottisafool</owners>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MediaBrowser.Server.Core</id>
|
||||
<version>3.0.378</version>
|
||||
<version>3.0.382</version>
|
||||
<title>Media Browser.Server.Core</title>
|
||||
<authors>Media Browser Team</authors>
|
||||
<owners>ebr,Luke,scottisafool</owners>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
||||
<copyright>Copyright © Media Browser 2013</copyright>
|
||||
<dependencies>
|
||||
<dependency id="MediaBrowser.Common" version="3.0.378" />
|
||||
<dependency id="MediaBrowser.Common" version="3.0.382" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
|
Loading…
Reference in New Issue
Block a user