display programs on channel page

This commit is contained in:
Luke Pulverenti
2013-11-25 15:39:23 -05:00
parent 4054846a6e
commit a641059c57
23 changed files with 283 additions and 144 deletions

View File

@@ -1,4 +1,5 @@
using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Querying;
using System.Collections.Generic;
namespace MediaBrowser.Controller.LiveTv
@@ -25,7 +26,7 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <param name="query">The query.</param>
/// <returns>IEnumerable{Channel}.</returns>
IEnumerable<Channel> GetChannels(ChannelQuery query);
QueryResult<ChannelInfoDto> GetChannels(ChannelQuery query);
/// <summary>
/// Gets the channel information dto.
@@ -46,6 +47,6 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <param name="query">The query.</param>
/// <returns>IEnumerable{ProgramInfo}.</returns>
IEnumerable<ProgramInfo> GetPrograms(ProgramQuery query);
QueryResult<ProgramInfoDto> GetPrograms(ProgramQuery query);
}
}

View File

@@ -1,5 +1,4 @@
using MediaBrowser.Common.Net;
using MediaBrowser.Model.LiveTv;
using System;
using System.Collections.Generic;
using System.Threading;
@@ -33,6 +32,14 @@ namespace MediaBrowser.Controller.LiveTv
/// <returns>Task.</returns>
Task CancelRecordingAsync(string recordingId, CancellationToken cancellationToken);
/// <summary>
/// Deletes the recording asynchronous.
/// </summary>
/// <param name="recordingId">The recording identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task DeleteRecordingAsync(string recordingId, CancellationToken cancellationToken);
/// <summary>
/// Schedules the recording asynchronous.
/// </summary>
@@ -42,8 +49,8 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="duration">The duration.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task ScheduleRecordingAsync(string name,string channelId, DateTime startTime, TimeSpan duration, CancellationToken cancellationToken);
Task ScheduleRecordingAsync(string name, string channelId, DateTime startTime, TimeSpan duration, CancellationToken cancellationToken);
/// <summary>
/// Gets the channel image asynchronous.
/// </summary>
@@ -55,17 +62,16 @@ namespace MediaBrowser.Controller.LiveTv
/// <summary>
/// Gets the recordings asynchronous.
/// </summary>
/// <param name="query">The query.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{IEnumerable{RecordingInfo}}.</returns>
Task<IEnumerable<RecordingInfo>> GetRecordingsAsync(RecordingQuery query, CancellationToken cancellationToken);
Task<IEnumerable<RecordingInfo>> GetRecordingsAsync(CancellationToken cancellationToken);
/// <summary>
/// Gets the channel guide.
/// Gets the programs asynchronous.
/// </summary>
/// <param name="channelId">The channel identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{IEnumerable{ProgramInfo}}.</returns>
Task<IEnumerable<ProgramInfo>> GetChannelGuideAsync(string channelId, CancellationToken cancellationToken);
Task<IEnumerable<ProgramInfo>> GetProgramsAsync(string channelId, CancellationToken cancellationToken);
}
}

View File

@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
namespace MediaBrowser.Controller.LiveTv
{
public class ProgramInfo
{
/// <summary>
/// Id of the program.
/// </summary>
public string Id { get; set; }
/// <summary>
/// Gets or sets the channel identifier.
/// </summary>
/// <value>The channel identifier.</value>
public string ChannelId { get; set; }
/// <summary>
/// Name of the program
/// </summary>
public string Name { get; set; }
/// <summary>
/// Description of the progam.
/// </summary>
public string Description { get; set; }
/// <summary>
/// The start date of the program, in UTC.
/// </summary>
public DateTime StartDate { get; set; }
/// <summary>
/// The end date of the program, in UTC.
/// </summary>
public DateTime EndDate { get; set; }
/// <summary>
/// Genre of the program.
/// </summary>
public List<string> Genres { get; set; }
public ProgramInfo()
{
Genres = new List<string>();
}
}
}

View File

@@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
namespace MediaBrowser.Controller.LiveTv
{
public class RecordingInfo
{
/// <summary>
/// Id of the recording.
/// </summary>
public string Id { get; set; }
/// <summary>
/// ChannelId of the recording.
/// </summary>
public string ChannelId { get; set; }
/// <summary>
/// ChannelName of the recording.
/// </summary>
public string ChannelName { get; set; }
/// <summary>
/// Name of the recording.
/// </summary>
public string Name { get; set; }
/// <summary>
/// Description of the recording.
/// </summary>
public string Description { get; set; }
/// <summary>
/// The start date of the recording, in UTC.
/// </summary>
public DateTime StartDate { get; set; }
/// <summary>
/// The end date of the recording, in UTC.
/// </summary>
public DateTime EndDate { get; set; }
/// <summary>
/// Status of the recording.
/// </summary>
public string Status { get; set; } //TODO: Enum for status?? Difference NextPvr,Argus,...
/// <summary>
/// Quality of the Recording.
/// </summary>
public string Quality { get; set; } // TODO: Enum for quality?? Difference NextPvr,Argus,...
/// <summary>
/// Recurring recording?
/// </summary>
public bool Recurring { get; set; }
/// <summary>
/// Parent recurring.
/// </summary>
public string RecurringParent { get; set; }
/// <summary>
/// Start date for the recurring, in UTC.
/// </summary>
public DateTime RecurrringStartDate { get; set; }
/// <summary>
/// End date for the recurring, in UTC
/// </summary>
public DateTime RecurringEndDate { get; set; }
/// <summary>
/// When do we need the recording?
/// </summary>
public List<string> DayMask { get; set; }
}
}

View File

@@ -108,6 +108,8 @@
<Compile Include="LiveTv\ChannelInfo.cs" />
<Compile Include="LiveTv\ILiveTvManager.cs" />
<Compile Include="LiveTv\ILiveTvService.cs" />
<Compile Include="LiveTv\ProgramInfo.cs" />
<Compile Include="LiveTv\RecordingInfo.cs" />
<Compile Include="Localization\ILocalizationManager.cs" />
<Compile Include="Notifications\INotificationsRepository.cs" />
<Compile Include="Notifications\NotificationUpdateEventArgs.cs" />