mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 14:28:46 +01:00
encapsulate validity in tv providers
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user