mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-19 04:34:18 +01:00
fixes #550 - Add internal interfaces for live tv
This commit is contained in:
21
MediaBrowser.Controller/LiveTv/ChannelInfo.cs
Normal file
21
MediaBrowser.Controller/LiveTv/ChannelInfo.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
namespace MediaBrowser.Controller.LiveTv
|
||||
{
|
||||
/// <summary>
|
||||
/// Class ChannelInfo
|
||||
/// </summary>
|
||||
public class ChannelInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the service.
|
||||
/// </summary>
|
||||
/// <value>The name of the service.</value>
|
||||
public string ServiceName { get; set; }
|
||||
}
|
||||
}
|
||||
30
MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
Normal file
30
MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.LiveTv
|
||||
{
|
||||
/// <summary>
|
||||
/// Manages all live tv services installed on the server
|
||||
/// </summary>
|
||||
public interface ILiveTvManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the services.
|
||||
/// </summary>
|
||||
/// <value>The services.</value>
|
||||
IReadOnlyList<ILiveTvService> Services { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Adds the parts.
|
||||
/// </summary>
|
||||
/// <param name="services">The services.</param>
|
||||
void AddParts(IEnumerable<ILiveTvService> services);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel info dto.
|
||||
/// </summary>
|
||||
/// <param name="info">The info.</param>
|
||||
/// <returns>ChannelInfoDto.</returns>
|
||||
ChannelInfoDto GetChannelInfoDto(ChannelInfo info);
|
||||
}
|
||||
}
|
||||
25
MediaBrowser.Controller/LiveTv/ILiveTvService.cs
Normal file
25
MediaBrowser.Controller/LiveTv/ILiveTvService.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Controller.LiveTv
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a single live tv back end (next pvr, media portal, etc).
|
||||
/// </summary>
|
||||
public interface ILiveTvService
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channels async.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{IEnumerable{ChannelInfo}}.</returns>
|
||||
Task<IEnumerable<ChannelInfo>> GetChannelsAsync(CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -96,6 +96,9 @@
|
||||
<Compile Include="Library\ILibraryPrescanTask.cs" />
|
||||
<Compile Include="Library\IMetadataSaver.cs" />
|
||||
<Compile Include="Library\ItemUpdateType.cs" />
|
||||
<Compile Include="LiveTv\ChannelInfo.cs" />
|
||||
<Compile Include="LiveTv\ILiveTvManager.cs" />
|
||||
<Compile Include="LiveTv\ILiveTvService.cs" />
|
||||
<Compile Include="Localization\ILocalizationManager.cs" />
|
||||
<Compile Include="Notifications\INotificationsRepository.cs" />
|
||||
<Compile Include="Notifications\NotificationUpdateEventArgs.cs" />
|
||||
|
||||
Reference in New Issue
Block a user