aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-05-15 15:47:16 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-05-15 15:47:16 -0400
commit7446d2803d26fa4cb4ef86f1b3014c837f08f66d (patch)
tree23f4aec84466afbe533e0fe78e56d82ce5e79bc5
parent83c1503333fae11af63199ae6daba95d62673ee2 (diff)
update recording
-rw-r--r--Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs22
1 files changed, 16 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
index f1b3f41b4..7f1a9ba6d 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
@@ -1517,7 +1517,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
EnforceKeepUpTo(timer, seriesPath);
};
- await recorder.Record(mediaStreamInfo, recordPath, duration, onStarted, cancellationToken).ConfigureAwait(false);
+ await recorder.Record(liveStreamInfo.Item1 as IDirectStreamProvider, mediaStreamInfo, recordPath, duration, onStarted, cancellationToken).ConfigureAwait(false);
recordingStatus = RecordingStatus.Completed;
_logger.Info("Recording completed: {0}", recordPath);
@@ -1759,17 +1759,27 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
{
var config = GetConfiguration();
- if (config.EnableRecordingEncoding)
- {
- var regInfo = await _liveTvManager.GetRegistrationInfo("embytvrecordingconversion").ConfigureAwait(false);
+ var regInfo = await _liveTvManager.GetRegistrationInfo("embytvrecordingconversion").ConfigureAwait(false);
- if (regInfo.IsValid)
+ if (regInfo.IsValid)
+ {
+ if (config.EnableRecordingEncoding)
{
return new EncodedRecorder(_logger, _fileSystem, _mediaEncoder, _config.ApplicationPaths, _jsonSerializer, config, _httpClient, _processFactory, _config);
}
+
+ return new DirectRecorder(_logger, _httpClient, _fileSystem);
+
+ //var options = new LiveTvOptions
+ //{
+ // EnableOriginalAudioWithEncodedRecordings = true,
+ // RecordedVideoCodec = "copy",
+ // RecordingEncodingFormat = "ts"
+ //};
+ //return new EncodedRecorder(_logger, _fileSystem, _mediaEncoder, _config.ApplicationPaths, _jsonSerializer, options, _httpClient, _processFactory, _config);
}
- return new DirectRecorder(_logger, _httpClient, _fileSystem);
+ throw new InvalidOperationException("Emby DVR Requires an active Emby Premiere subscription.");
}
private async void OnSuccessfulRecording(TimerInfo timer, string path)