aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-10-21 01:09:50 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-10-21 01:09:50 -0400
commit0c7e06648c23f557bfd0038da99c0138a172834a (patch)
tree1eca769c30c972430887d54c6f50c2547f037fec /MediaBrowser.Server.Implementations
parentcf8b8205085aa4378f1e57f677d317f8abc0e709 (diff)
encapsulate validity in tv providers
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
index 0d49607953..cdfe9ebef4 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
@@ -607,8 +607,18 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
throw new ArgumentNullException("timer");
}
+ if (string.IsNullOrWhiteSpace(timer.ProgramId))
+ {
+ throw new InvalidOperationException("timer.ProgramId is null. Cannot record.");
+ }
+
var info = GetProgramInfoFromCache(timer.ChannelId, timer.ProgramId);
+ if (info == null)
+ {
+ throw new InvalidOperationException(string.Format("Program with Id {0} not found", timer.ProgramId));
+ }
+
var recordPath = RecordingPath;
if (info.IsMovie)