From daaae69df575f1d7692ba29d6f5ddd4c59516f82 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 9 Oct 2016 03:18:43 -0400 Subject: add playback of in-progress recordings --- MediaBrowser.Controller/LiveTv/ILiveTvManager.cs | 10 ++-------- MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs | 1 + MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs | 3 ++- MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs | 3 ++- 4 files changed, 7 insertions(+), 10 deletions(-) (limited to 'MediaBrowser.Controller/LiveTv') diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs index 7e48f3d21b..8e3c1931b1 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs @@ -301,18 +301,12 @@ namespace MediaBrowser.Controller.LiveTv /// /// Gets the recording media sources. /// - /// The identifier. - /// The cancellation token. - /// Task<IEnumerable<MediaSourceInfo>>. - Task> GetRecordingMediaSources(string id, CancellationToken cancellationToken); + Task> GetRecordingMediaSources(IHasMediaSources item, CancellationToken cancellationToken); /// /// Gets the channel media sources. /// - /// The identifier. - /// The cancellation token. - /// Task<IEnumerable<MediaSourceInfo>>. - Task> GetChannelMediaSources(string id, CancellationToken cancellationToken); + Task> GetChannelMediaSources(IHasMediaSources item, CancellationToken cancellationToken); /// /// Adds the information to recording dto. diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs b/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs index 257024d01e..1bbd1a0082 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs @@ -33,6 +33,7 @@ namespace MediaBrowser.Controller.LiveTv bool CanDelete(User user); string SeriesTimerId { get; set; } + string TimerId { get; set; } RecordingStatus Status { get; set; } DateTime? EndDate { get; set; } DateTime DateLastSaved { get; set; } diff --git a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs index e6f472414e..e6fefbf72c 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs @@ -20,6 +20,7 @@ namespace MediaBrowser.Controller.LiveTv [IgnoreDataMember] public bool IsSeries { get; set; } public string SeriesTimerId { get; set; } + public string TimerId { get; set; } [IgnoreDataMember] public DateTime StartDate { get; set; } public RecordingStatus Status { get; set; } @@ -112,7 +113,7 @@ namespace MediaBrowser.Controller.LiveTv public override bool CanDelete() { - return true; + return Status == RecordingStatus.Completed; } public override bool IsAuthorizedToDelete(User user) diff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs index f4dba070dc..e26dd6a773 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs @@ -19,6 +19,7 @@ namespace MediaBrowser.Controller.LiveTv [IgnoreDataMember] public bool IsSeries { get; set; } public string SeriesTimerId { get; set; } + public string TimerId { get; set; } [IgnoreDataMember] public DateTime StartDate { get; set; } public RecordingStatus Status { get; set; } @@ -111,7 +112,7 @@ namespace MediaBrowser.Controller.LiveTv public override bool CanDelete() { - return true; + return Status == RecordingStatus.Completed; } public override bool IsAuthorizedToDelete(User user) -- cgit v1.2.3