aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Entities/TV/Episode.cs36
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvManager.cs16
-rw-r--r--MediaBrowser.Controller/LiveTv/RecordingInfo.cs20
3 files changed, 71 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs
index 40b999b02..e9f250d2a 100644
--- a/MediaBrowser.Controller/Entities/TV/Episode.cs
+++ b/MediaBrowser.Controller/Entities/TV/Episode.cs
@@ -235,6 +235,42 @@ namespace MediaBrowser.Controller.Entities.TV
get { return LocationType == Model.Entities.LocationType.Virtual && IsUnaired; }
}
+ [IgnoreDataMember]
+ public Guid? SeasonId
+ {
+ get
+ {
+ // First see if the parent is a Season
+ var season = Parent as Season;
+
+ if (season != null)
+ {
+ return season.Id;
+ }
+
+ var seasonNumber = ParentIndexNumber;
+
+ // Parent is a Series
+ if (seasonNumber.HasValue)
+ {
+ var series = Parent as Series;
+
+ if (series != null)
+ {
+ season = series.Children.OfType<Season>()
+ .FirstOrDefault(i => i.IndexNumber.HasValue && i.IndexNumber.Value == seasonNumber.Value);
+
+ if (season != null)
+ {
+ return season.Id;
+ }
+ }
+ }
+
+ return null;
+ }
+ }
+
public override IEnumerable<string> GetDeletePaths()
{
return new[] { Path };
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
index d5b9cea27..4e73fc109 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
@@ -52,6 +52,22 @@ namespace MediaBrowser.Controller.LiveTv
QueryResult<ChannelInfoDto> GetChannels(ChannelQuery query);
/// <summary>
+ /// Gets the recording.
+ /// </summary>
+ /// <param name="id">The identifier.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task{RecordingInfoDto}.</returns>
+ Task<RecordingInfoDto> GetRecording(string id, CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Gets the timer.
+ /// </summary>
+ /// <param name="id">The identifier.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task{TimerInfoDto}.</returns>
+ Task<TimerInfoDto> GetTimer(string id, CancellationToken cancellationToken);
+
+ /// <summary>
/// Gets the recordings.
/// </summary>
/// <param name="query">The query.</param>
diff --git a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs
index 65e977d75..2c8e8cb46 100644
--- a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs
+++ b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs
@@ -20,7 +20,13 @@ namespace MediaBrowser.Controller.LiveTv
/// ChannelName of the recording.
/// </summary>
public string ChannelName { get; set; }
-
+
+ /// <summary>
+ /// Gets or sets the type of the channel.
+ /// </summary>
+ /// <value>The type of the channel.</value>
+ public ChannelType ChannelType { get; set; }
+
/// <summary>
/// Name of the recording.
/// </summary>
@@ -76,6 +82,18 @@ namespace MediaBrowser.Controller.LiveTv
/// <value>The episode title.</value>
public string EpisodeTitle { get; set; }
+ /// <summary>
+ /// Gets or sets the official rating.
+ /// </summary>
+ /// <value>The official rating.</value>
+ public string OfficialRating { get; set; }
+
+ /// <summary>
+ /// Gets or sets the community rating.
+ /// </summary>
+ /// <value>The community rating.</value>
+ public float? CommunityRating { get; set; }
+
public RecordingInfo()
{
Genres = new List<string>();