updated live tv + nuget

This commit is contained in:
Luke Pulverenti
2013-12-14 20:17:57 -05:00
parent d576108411
commit 01e65c93ee
39 changed files with 1002 additions and 426 deletions

View File

@@ -26,7 +26,7 @@ namespace MediaBrowser.Controller
/// Gets the path to the Images By Name directory
/// </summary>
/// <value>The images by name path.</value>
string ItemsByNamePath { get; set; }
string ItemsByNamePath { get; }
/// <summary>
/// Gets the path to the People directory
@@ -51,13 +51,13 @@ namespace MediaBrowser.Controller
/// </summary>
/// <value>The game genre path.</value>
string GameGenrePath { get; }
/// <summary>
/// Gets the artists path.
/// </summary>
/// <value>The artists path.</value>
string ArtistsPath { get; }
/// <summary>
/// Gets the path to the Studio directory
/// </summary>
@@ -87,7 +87,7 @@ namespace MediaBrowser.Controller
/// </summary>
/// <value>The media info images path.</value>
string MediaInfoImagesPath { get; }
/// <summary>
/// Gets the path to the user configuration directory
/// </summary>

View File

@@ -1,4 +1,5 @@
using MediaBrowser.Model.LiveTv;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Querying;
using System.Collections.Generic;
using System.Threading;
@@ -54,17 +55,28 @@ namespace MediaBrowser.Controller.LiveTv
/// Gets the channels.
/// </summary>
/// <param name="query">The query.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>IEnumerable{Channel}.</returns>
QueryResult<ChannelInfoDto> GetChannels(ChannelQuery query);
Task<QueryResult<ChannelInfoDto>> GetChannels(ChannelQuery query, CancellationToken cancellationToken);
/// <summary>
/// Gets the recording.
/// </summary>
/// <param name="id">The identifier.</param>
/// <param name="user">The user.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{RecordingInfoDto}.</returns>
Task<RecordingInfoDto> GetRecording(string id, CancellationToken cancellationToken);
Task<RecordingInfoDto> GetRecording(string id, CancellationToken cancellationToken, User user = null);
/// <summary>
/// Gets the channel.
/// </summary>
/// <param name="id">The identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <param name="user">The user.</param>
/// <returns>Task{RecordingInfoDto}.</returns>
Task<ChannelInfoDto> GetChannel(string id, CancellationToken cancellationToken, User user = null);
/// <summary>
/// Gets the timer.
/// </summary>
@@ -73,6 +85,14 @@ namespace MediaBrowser.Controller.LiveTv
/// <returns>Task{TimerInfoDto}.</returns>
Task<TimerInfoDto> GetTimer(string id, CancellationToken cancellationToken);
/// <summary>
/// Gets the series timer.
/// </summary>
/// <param name="id">The identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{TimerInfoDto}.</returns>
Task<SeriesTimerInfoDto> GetSeriesTimer(string id, CancellationToken cancellationToken);
/// <summary>
/// Gets the recordings.
/// </summary>
@@ -89,6 +109,14 @@ namespace MediaBrowser.Controller.LiveTv
/// <returns>Task{QueryResult{TimerInfoDto}}.</returns>
Task<QueryResult<TimerInfoDto>> GetTimers(TimerQuery query, CancellationToken cancellationToken);
/// <summary>
/// Gets the series timers.
/// </summary>
/// <param name="query">The query.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{QueryResult{SeriesTimerInfoDto}}.</returns>
Task<QueryResult<SeriesTimerInfoDto>> GetSeriesTimers(SeriesTimerQuery query, CancellationToken cancellationToken);
/// <summary>
/// Gets the channel.
/// </summary>
@@ -96,14 +124,6 @@ namespace MediaBrowser.Controller.LiveTv
/// <returns>Channel.</returns>
Channel GetChannel(string id);
/// <summary>
/// Gets the channel.
/// </summary>
/// <param name="id">The identifier.</param>
/// <param name="userId">The user identifier.</param>
/// <returns>Channel.</returns>
ChannelInfoDto GetChannelInfoDto(string id, string userId);
/// <summary>
/// Gets the programs.
/// </summary>
@@ -111,5 +131,21 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>IEnumerable{ProgramInfo}.</returns>
Task<QueryResult<ProgramInfoDto>> GetPrograms(ProgramQuery query, CancellationToken cancellationToken);
/// <summary>
/// Updates the timer.
/// </summary>
/// <param name="timer">The timer.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task UpdateTimer(TimerInfoDto timer, CancellationToken cancellationToken);
/// <summary>
/// Updates the timer.
/// </summary>
/// <param name="timer">The timer.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task UpdateSeriesTimer(SeriesTimerInfoDto timer, CancellationToken cancellationToken);
}
}

View File

@@ -1,5 +1,4 @@
using MediaBrowser.Common.Net;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@@ -55,6 +54,14 @@ namespace MediaBrowser.Controller.LiveTv
/// <returns>Task.</returns>
Task CreateSeriesTimerAsync(SeriesTimerInfo info, CancellationToken cancellationToken);
/// <summary>
/// Updates the timer asynchronous.
/// </summary>
/// <param name="info">The information.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task UpdateTimerAsync(TimerInfo info, CancellationToken cancellationToken);
/// <summary>
/// Updates the series timer asynchronous.
/// </summary>

View File

@@ -15,11 +15,5 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <value>The type of the MIME.</value>
public string MimeType { get; set; }
/// <summary>
/// Gets or sets the image path.
/// </summary>
/// <value>The image path.</value>
public string ImagePath { get; set; }
}
}

View File

@@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.LiveTv
/// ChannelId of the recording.
/// </summary>
public string ChannelId { get; set; }
/// <summary>
/// ChannelName of the recording.
/// </summary>
@@ -26,7 +26,7 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <value>The program identifier.</value>
public string ProgramId { get; set; }
/// <summary>
/// Name of the recording.
/// </summary>
@@ -35,7 +35,7 @@ namespace MediaBrowser.Controller.LiveTv
/// <summary>
/// Description of the recording.
/// </summary>
public string Description { get; set; }
public string Overview { get; set; }
/// <summary>
/// The start date of the recording, in UTC.
@@ -47,18 +47,6 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
public DateTime EndDate { get; set; }
/// <summary>
/// Gets or sets the pre padding seconds.
/// </summary>
/// <value>The pre padding seconds.</value>
public int PrePaddingSeconds { get; set; }
/// <summary>
/// Gets or sets the post padding seconds.
/// </summary>
/// <value>The post padding seconds.</value>
public int PostPaddingSeconds { get; set; }
/// <summary>
/// Gets or sets the type of the recurrence.
/// </summary>
@@ -77,6 +65,30 @@ namespace MediaBrowser.Controller.LiveTv
/// <value>The priority.</value>
public int Priority { get; set; }
/// <summary>
/// Gets or sets the requested pre padding seconds.
/// </summary>
/// <value>The requested pre padding seconds.</value>
public int RequestedPrePaddingSeconds { get; set; }
/// <summary>
/// Gets or sets the requested post padding seconds.
/// </summary>
/// <value>The requested post padding seconds.</value>
public int RequestedPostPaddingSeconds { get; set; }
/// <summary>
/// Gets or sets the required pre padding seconds.
/// </summary>
/// <value>The required pre padding seconds.</value>
public int RequiredPrePaddingSeconds { get; set; }
/// <summary>
/// Gets or sets the required post padding seconds.
/// </summary>
/// <value>The required post padding seconds.</value>
public int RequiredPostPaddingSeconds { get; set; }
public SeriesTimerInfo()
{
Days = new List<DayOfWeek>();

View File

@@ -759,11 +759,30 @@ namespace MediaBrowser.Controller.Providers
break;
}
case "MediaInfo":
case "Format3D":
{
using (var subtree = reader.ReadSubtree())
var video = item as Video;
if (video != null)
{
FetchFromMediaInfoNode(subtree, item);
var val = reader.ReadElementContentAsString();
if (string.Equals("HSBS", val))
{
video.Video3DFormat = Video3DFormat.HalfSideBySide;
}
else if (string.Equals("HTAB", val))
{
video.Video3DFormat = Video3DFormat.HalfTopAndBottom;
}
else if (string.Equals("FTAB", val))
{
video.Video3DFormat = Video3DFormat.FullTopAndBottom;
}
else if (string.Equals("FSBS", val))
{
video.Video3DFormat = Video3DFormat.FullSideBySide;
}
}
break;
}
@@ -774,89 +793,6 @@ namespace MediaBrowser.Controller.Providers
}
}
/// <summary>
/// Fetches from media info node.
/// </summary>
/// <param name="reader">The reader.</param>
/// <param name="item">The item.</param>
private void FetchFromMediaInfoNode(XmlReader reader, T item)
{
reader.MoveToContent();
while (reader.Read())
{
if (reader.NodeType == XmlNodeType.Element)
{
switch (reader.Name)
{
case "Video":
{
using (var subtree = reader.ReadSubtree())
{
FetchFromMediaInfoVideoNode(subtree, item);
}
break;
}
default:
reader.Skip();
break;
}
}
}
}
/// <summary>
/// Fetches from media info video node.
/// </summary>
/// <param name="reader">The reader.</param>
/// <param name="item">The item.</param>
private void FetchFromMediaInfoVideoNode(XmlReader reader, T item)
{
reader.MoveToContent();
while (reader.Read())
{
if (reader.NodeType == XmlNodeType.Element)
{
switch (reader.Name)
{
case "Format3D":
{
var video = item as Video;
if (video != null)
{
var val = reader.ReadElementContentAsString();
if (string.Equals("HSBS", val))
{
video.Video3DFormat = Video3DFormat.HalfSideBySide;
}
else if (string.Equals("HTAB", val))
{
video.Video3DFormat = Video3DFormat.HalfTopAndBottom;
}
else if (string.Equals("FTAB", val))
{
video.Video3DFormat = Video3DFormat.FullTopAndBottom;
}
else if (string.Equals("FSBS", val))
{
video.Video3DFormat = Video3DFormat.FullSideBySide;
}
}
break;
}
default:
reader.Skip();
break;
}
}
}
}
/// <summary>
/// Fetches from taglines node.
/// </summary>