fix channel query by category
This commit is contained in:
parent
715119b525
commit
ca5989cb17
|
@ -133,6 +133,12 @@ namespace MediaBrowser.Model.Dto
|
|||
/// <value>The custom rating.</value>
|
||||
public string CustomRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the channel identifier.
|
||||
/// </summary>
|
||||
/// <value>The channel identifier.</value>
|
||||
public string ChannelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the overview.
|
||||
/// </summary>
|
||||
|
|
|
@ -385,6 +385,11 @@ namespace MediaBrowser.Server.Implementations.Channels
|
|||
|
||||
private async Task<BaseItem> GetChannelItemEntity(ChannelItemInfo info, string internalChannnelId, CancellationToken cancellationToken)
|
||||
{
|
||||
if (string.IsNullOrEmpty(internalChannnelId))
|
||||
{
|
||||
throw new ArgumentNullException("internalChannnelId");
|
||||
}
|
||||
|
||||
BaseItem item;
|
||||
Guid id;
|
||||
var isNew = false;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Controller.Channels;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Drawing;
|
||||
using MediaBrowser.Controller.Dto;
|
||||
|
@ -1140,6 +1141,13 @@ namespace MediaBrowser.Server.Implementations.Dto
|
|||
{
|
||||
dto.MediaSources = GetMediaSources(tvChannel);
|
||||
}
|
||||
|
||||
var channelItem = item as IChannelItem;
|
||||
|
||||
if (channelItem != null)
|
||||
{
|
||||
dto.ChannelId = channelItem.ChannelId;
|
||||
}
|
||||
}
|
||||
|
||||
public List<MediaSourceInfo> GetMediaSources(BaseItem item)
|
||||
|
|
|
@ -14,7 +14,7 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace MediaBrowser.Server.Implementations.Session
|
||||
{
|
||||
public class WebSocketController : ISessionController
|
||||
public class WebSocketController : ISessionController, IDisposable
|
||||
{
|
||||
public SessionInfo Session { get; private set; }
|
||||
public IReadOnlyList<IWebSocketConnection> Sockets { get; private set; }
|
||||
|
@ -244,5 +244,13 @@ namespace MediaBrowser.Server.Implementations.Session
|
|||
|
||||
return Task.WhenAll(tasks);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
foreach (var socket in Sockets.ToList())
|
||||
{
|
||||
socket.Closed -= connection_Closed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user