diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 84a255c7a..2e591711b 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -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 epgData, SeriesTimerInfo seriesTimer, bool deleteInvalidTimers) + private async Task UpdateTimersForSeriesTimer(List 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); } - existingTimer.KeepUntil = seriesTimer.KeepUntil; - existingTimer.IsPostPaddingRequired = seriesTimer.IsPostPaddingRequired; - existingTimer.IsPrePaddingRequired = seriesTimer.IsPrePaddingRequired; - existingTimer.PostPaddingSeconds = seriesTimer.PostPaddingSeconds; - existingTimer.PrePaddingSeconds = seriesTimer.PrePaddingSeconds; - existingTimer.Priority = seriesTimer.Priority; + 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); diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs index 265817cbe..525db4036 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs @@ -1681,7 +1681,7 @@ namespace Emby.Server.Implementations.LiveTv return new QueryResult(); } - 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); } diff --git a/MediaBrowser.Api/LiveTv/LiveTvService.cs b/MediaBrowser.Api/LiveTv/LiveTvService.cs index c829ad2ab..85a66080d 100644 --- a/MediaBrowser.Api/LiveTv/LiveTvService.cs +++ b/MediaBrowser.Api/LiveTv/LiveTvService.cs @@ -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);