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