mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 22:38:30 +01:00
updated live tv + nuget
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using System.Runtime.Serialization;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
|
||||
65
MediaBrowser.Controller/LiveTv/Channel.cs
Normal file
65
MediaBrowser.Controller/LiveTv/Channel.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.LiveTv
|
||||
{
|
||||
public class Channel : BaseItem, IItemByName
|
||||
{
|
||||
public Channel()
|
||||
{
|
||||
UserItemCounts = new Dictionary<Guid, ItemByNameCounts>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the user data key.
|
||||
/// </summary>
|
||||
/// <returns>System.String.</returns>
|
||||
public override string GetUserDataKey()
|
||||
{
|
||||
return "Channel-" + Name;
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public Dictionary<Guid, ItemByNameCounts> UserItemCounts { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number.
|
||||
/// </summary>
|
||||
/// <value>The number.</value>
|
||||
public string ChannelNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Get or sets the Id.
|
||||
/// </summary>
|
||||
/// <value>The id of the channel.</value>
|
||||
public string ChannelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the service.
|
||||
/// </summary>
|
||||
/// <value>The name of the service.</value>
|
||||
public string ServiceName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the channel.
|
||||
/// </summary>
|
||||
/// <value>The type of the channel.</value>
|
||||
public ChannelType ChannelType { get; set; }
|
||||
|
||||
protected override string CreateSortName()
|
||||
{
|
||||
double number = 0;
|
||||
|
||||
if (!string.IsNullOrEmpty(ChannelNumber))
|
||||
{
|
||||
double.TryParse(ChannelNumber, out number);
|
||||
}
|
||||
|
||||
return number.ToString("000-") + (Name ?? string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.LiveTv
|
||||
@@ -22,10 +21,25 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
void AddParts(IEnumerable<ILiveTvService> services);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel info dto.
|
||||
/// Gets the channels.
|
||||
/// </summary>
|
||||
/// <param name="info">The info.</param>
|
||||
/// <param name="query">The query.</param>
|
||||
/// <returns>IEnumerable{Channel}.</returns>
|
||||
IEnumerable<Channel> GetChannels(ChannelQuery query);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel information dto.
|
||||
/// </summary>
|
||||
/// <param name="info">The information.</param>
|
||||
/// <returns>ChannelInfoDto.</returns>
|
||||
ChannelInfoDto GetChannelInfoDto(ChannelInfo info);
|
||||
ChannelInfoDto GetChannelInfoDto(Channel info);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel.
|
||||
/// </summary>
|
||||
/// <param name="serviceName">Name of the service.</param>
|
||||
/// <param name="channelId">The channel identifier.</param>
|
||||
/// <returns>Channel.</returns>
|
||||
Channel GetChannel(string serviceName, string channelId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -50,7 +50,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
/// <param name="channelId">The channel identifier.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{Stream}.</returns>
|
||||
Task<Stream> GetChannelImageAsync(string channelId, CancellationToken cancellationToken);
|
||||
Task<HttpResponseInfo> GetChannelImageAsync(string channelId, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the recordings asynchronous.
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
<Compile Include="Library\ItemUpdateType.cs" />
|
||||
<Compile Include="Library\IUserDataManager.cs" />
|
||||
<Compile Include="Library\UserDataSaveEventArgs.cs" />
|
||||
<Compile Include="LiveTv\Channel.cs" />
|
||||
<Compile Include="LiveTv\ChannelInfo.cs" />
|
||||
<Compile Include="LiveTv\ILiveTvManager.cs" />
|
||||
<Compile Include="LiveTv\ILiveTvService.cs" />
|
||||
|
||||
Reference in New Issue
Block a user