From f641c501a78d6270793ee9c9fa185517be6df008 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 29 Mar 2017 15:16:43 -0400 Subject: improve cancellation support of auto-organize --- MediaBrowser.Controller/LiveTv/ILiveTvManager.cs | 2 +- MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Controller') diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs index 5242c5b1f2..c8fa6be8ce 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs @@ -157,7 +157,7 @@ namespace MediaBrowser.Controller.LiveTv /// The media source identifier. /// The cancellation token. /// Task{StreamResponseInfo}. - Task> GetChannelStream(string id, string mediaSourceId, CancellationToken cancellationToken); + Task> GetChannelStream(string id, string mediaSourceId, CancellationToken cancellationToken); /// /// Gets the program. diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 530ff13430..dd31d39b10 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -743,6 +743,11 @@ namespace MediaBrowser.Controller.MediaEncoding public bool CanStreamCopyVideo(EncodingJobInfo state, MediaStream videoStream) { + if (!videoStream.AllowStreamCopy) + { + return false; + } + var request = state.BaseRequest; if (videoStream.IsInterlaced) @@ -883,6 +888,11 @@ namespace MediaBrowser.Controller.MediaEncoding public bool CanStreamCopyAudio(EncodingJobInfo state, MediaStream audioStream, List supportedAudioCodecs) { + if (!audioStream.AllowStreamCopy) + { + return false; + } + var request = state.BaseRequest; // Source and target codecs must match -- cgit v1.2.3