jellyfin-server/Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs

27 lines
855 B
C#
Raw Normal View History

using System;
using MediaBrowser.Controller.LiveTv;
2016-10-25 19:02:04 +00:00
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Serialization;
using Microsoft.Extensions.Logging;
2015-07-20 18:32:55 +00:00
2016-11-03 23:35:19 +00:00
namespace Emby.Server.Implementations.LiveTv.EmbyTV
2015-07-20 18:32:55 +00:00
{
public class SeriesTimerManager : ItemDataProvider<SeriesTimerInfo>
{
2015-09-13 23:07:54 +00:00
public SeriesTimerManager(IFileSystem fileSystem, IJsonSerializer jsonSerializer, ILogger logger, string dataPath)
: base(fileSystem, jsonSerializer, logger, dataPath, (r1, r2) => string.Equals(r1.Id, r2.Id, StringComparison.OrdinalIgnoreCase))
2015-07-20 18:32:55 +00:00
{
}
public override void Add(SeriesTimerInfo item)
{
2018-09-12 17:26:21 +00:00
if (string.IsNullOrEmpty(item.Id))
2015-07-20 18:32:55 +00:00
{
throw new ArgumentException("SeriesTimerInfo.Id cannot be null or empty.");
}
base.Add(item);
}
}
}