aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-03-16 00:14:38 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-03-16 00:14:38 -0400
commite321d3c544405994b08b48421eaf80c27e10f6ab (patch)
tree5464f03fadd126e1590307015dbacc4b9f05933c /MediaBrowser.Server.Implementations
parentb6665e3b4dbebed37d602aeac157a4443201233b (diff)
add error checking
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
index e00a68e32..463e91fd4 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.EmbyTV
private 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)