update timer settings

pull/1154/head
Luke Pulverenti 8 years ago
parent 2345d02b41
commit a93c2682d9

@ -326,7 +326,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
{
epgData = GetEpgDataForChannel(timer.ChannelId);
}
await UpdateTimersForSeriesTimer(epgData, timer, true).ConfigureAwait(false);
await UpdateTimersForSeriesTimer(epgData, timer, false, true).ConfigureAwait(false);
}
}
@ -573,7 +573,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
}
_seriesTimerProvider.Add(info);
await UpdateTimersForSeriesTimer(epgData, info, false).ConfigureAwait(false);
await UpdateTimersForSeriesTimer(epgData, info, true, false).ConfigureAwait(false);
return info.Id;
}
@ -614,7 +614,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
epgData = GetEpgDataForChannel(instance.ChannelId);
}
await UpdateTimersForSeriesTimer(epgData, instance, true).ConfigureAwait(false);
await UpdateTimersForSeriesTimer(epgData, instance, true, true).ConfigureAwait(false);
}
}
@ -2159,7 +2159,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
}
}
private async Task UpdateTimersForSeriesTimer(List<ProgramInfo> epgData, SeriesTimerInfo seriesTimer, bool deleteInvalidTimers)
private async Task UpdateTimersForSeriesTimer(List<ProgramInfo> epgData, SeriesTimerInfo seriesTimer, bool updateTimerSettings, bool deleteInvalidTimers)
{
var allTimers = GetTimersForSeries(seriesTimer, epgData)
.ToList();
@ -2204,12 +2204,15 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
enabledTimersForSeries.Add(existingTimer);
}
if (updateTimerSettings)
{
existingTimer.KeepUntil = seriesTimer.KeepUntil;
existingTimer.IsPostPaddingRequired = seriesTimer.IsPostPaddingRequired;
existingTimer.IsPrePaddingRequired = seriesTimer.IsPrePaddingRequired;
existingTimer.PostPaddingSeconds = seriesTimer.PostPaddingSeconds;
existingTimer.PrePaddingSeconds = seriesTimer.PrePaddingSeconds;
existingTimer.Priority = seriesTimer.Priority;
}
existingTimer.SeriesTimerId = seriesTimer.Id;
_timerProvider.Update(existingTimer);

@ -1681,7 +1681,7 @@ namespace Emby.Server.Implementations.LiveTv
return new QueryResult<BaseItem>();
}
if (_services.Count == 1 && !(query.IsInProgress ?? false))
if (_services.Count == 1 && !(query.IsInProgress ?? false) && (!query.IsLibraryItem.HasValue || query.IsLibraryItem.Value))
{
return GetEmbyRecordings(query, new DtoOptions(), user);
}

@ -202,6 +202,7 @@ namespace MediaBrowser.Api.LiveTv
public bool? IsKids { get; set; }
public bool? IsSports { get; set; }
public bool? IsNews { get; set; }
public bool? IsLibraryItem { get; set; }
public GetRecordings()
{
@ -1057,7 +1058,8 @@ namespace MediaBrowser.Api.LiveTv
IsNews = request.IsNews,
IsSeries = request.IsSeries,
IsKids = request.IsKids,
IsSports = request.IsSports
IsSports = request.IsSports,
IsLibraryItem = request.IsLibraryItem
}, options, CancellationToken.None).ConfigureAwait(false);

Loading…
Cancel
Save