aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-11-25 15:39:23 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-11-25 15:39:23 -0500
commita641059c571d9596baa814a01a85546e3a4b5b50 (patch)
tree0f1add9b700dfda818128dd8840bb01f680311bd /MediaBrowser.Controller
parent4054846a6e2ac93a082a22e03f183296a27a0cba (diff)
display programs on channel page
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvManager.cs5
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvService.cs20
-rw-r--r--MediaBrowser.Controller/LiveTv/ProgramInfo.cs49
-rw-r--r--MediaBrowser.Controller/LiveTv/RecordingInfo.cs78
-rw-r--r--MediaBrowser.Controller/MediaBrowser.Controller.csproj2
5 files changed, 145 insertions, 9 deletions
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
index 339367c170..e7b5d733b9 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
@@ -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);
}
}
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs
index 53cb514b52..4e4f8dcc78 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs
@@ -1,5 +1,4 @@
using MediaBrowser.Common.Net;
-using MediaBrowser.Model.LiveTv;
using System;
using System.Collections.Generic;
using System.Threading;
@@ -34,6 +33,14 @@ namespace MediaBrowser.Controller.LiveTv
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>
/// <param name="name">The name for the recording</param>
@@ -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);
}
}
diff --git a/MediaBrowser.Controller/LiveTv/ProgramInfo.cs b/MediaBrowser.Controller/LiveTv/ProgramInfo.cs
new file mode 100644
index 0000000000..8314b91705
--- /dev/null
+++ b/MediaBrowser.Controller/LiveTv/ProgramInfo.cs
@@ -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>();
+ }
+ }
+}
diff --git a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs
new file mode 100644
index 0000000000..f35b6d5c63
--- /dev/null
+++ b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs
@@ -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; }
+ }
+}
diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
index ea227349ea..ed63bc1647 100644
--- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj
+++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
@@ -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" />