recording fixes

pull/702/head
Luke Pulverenti 9 years ago
parent 9849f522ef
commit 66ccb313c2

@ -224,7 +224,6 @@ namespace MediaBrowser.Server.Implementations.Library
if (enableUserSpecificViews)
{
viewType = enableRichView ? viewType : null;
var view = await _libraryManager.GetNamedView(user, name, viewType, sortName, cancellationToken).ConfigureAwait(false);
if (view.ParentId != parentId)

@ -177,6 +177,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
public Task CancelSeriesTimerAsync(string timerId, CancellationToken cancellationToken)
{
var timers = _timerProvider.GetAll().Where(i => string.Equals(i.SeriesTimerId, timerId, StringComparison.OrdinalIgnoreCase));
foreach (var timer in timers)
{
CancelTimerInternal(timer.Id);
}
var remove = _seriesTimerProvider.GetAll().FirstOrDefault(r => string.Equals(r.Id, timerId, StringComparison.OrdinalIgnoreCase));
if (remove != null)
{
@ -583,7 +589,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
{
using (var output = File.Open(recordPath, FileMode.Create, FileAccess.Write, FileShare.Read))
{
await response.Content.CopyToAsync(output, 131072, linkedToken);
await response.Content.CopyToAsync(output, StreamDefaults.DefaultCopyToBufferSize, linkedToken);
}
}
@ -659,6 +665,9 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
private IEnumerable<TimerInfo> GetTimersForSeries(SeriesTimerInfo seriesTimer, IEnumerable<ProgramInfo> allPrograms, IReadOnlyList<RecordingInfo> currentRecordings)
{
// Exclude programs that have already ended
allPrograms = allPrograms.Where(i => i.EndDate > DateTime.UtcNow);
allPrograms = GetProgramsForSeries(seriesTimer, allPrograms);
var recordingShowIds = currentRecordings.Select(i => i.ShowId).ToList();

Loading…
Cancel
Save