diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-10-21 01:09:50 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-10-21 01:09:50 -0400 |
| commit | 0c7e06648c23f557bfd0038da99c0138a172834a (patch) | |
| tree | 1eca769c30c972430887d54c6f50c2547f037fec /MediaBrowser.Server.Implementations | |
| parent | cf8b8205085aa4378f1e57f677d317f8abc0e709 (diff) | |
encapsulate validity in tv providers
Diffstat (limited to 'MediaBrowser.Server.Implementations')
| -rw-r--r-- | MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs | 10 |
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) |
