The Free Software Media System - Server Backend & API
add error checking
Luke Pulverentie321d3c54440
diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.csindex e00a68e32b..463e91fd4c 100644--- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs+++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs@@ -498,7 +498,17 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTVprivate bool IsListingProviderEnabledForTuner(ListingsProviderInfo info, string tunerHostId){- return info.EnableAllTuners || info.EnabledTuners.Contains(tunerHostId ?? string.Empty, StringComparer.OrdinalIgnoreCase);+ if (info.EnableAllTuners)+ {+ return true;+ }++ if (string.IsNullOrWhiteSpace(tunerHostId))+ {+ throw new ArgumentNullException("tunerHostId");+ }++ return info.EnabledTuners.Contains(tunerHostId, StringComparer.OrdinalIgnoreCase);}private async Task<IEnumerable<ProgramInfo>> GetProgramsAsyncInternal(string channelId, DateTime startDateUtc, DateTime endDateUtc, CancellationToken cancellationToken)