update live tv database

This commit is contained in:
Luke Pulverenti
2015-06-01 10:49:23 -04:00
parent 68e64feafd
commit f2abd8ba39
20 changed files with 587 additions and 303 deletions

View File

@@ -1,5 +1,4 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.LiveTv;
@@ -7,12 +6,10 @@ using MediaBrowser.Model.Users;
using System;
using System.Linq;
using System.Runtime.Serialization;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.LiveTv
{
public class LiveTvProgram : BaseItem, ILiveTvItem, IHasLookupInfo<LiveTvProgramLookupInfo>
public class LiveTvProgram : BaseItem, ILiveTvItem, IHasLookupInfo<LiveTvProgramLookupInfo>, IHasStartDate, IHasProgramAttributes
{
/// <summary>
/// Gets the user data key.
@@ -28,12 +25,6 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
public string ExternalId { get; set; }
/// <summary>
/// Gets or sets the channel identifier.
/// </summary>
/// <value>The channel identifier.</value>
public string ExternalChannelId { get; set; }
/// <summary>
/// Gets or sets the original air date.
/// </summary>
@@ -204,15 +195,6 @@ namespace MediaBrowser.Controller.LiveTv
return "Program";
}
public override Task UpdateToRepository(ItemUpdateType updateReason, CancellationToken cancellationToken)
{
DateLastSaved = DateTime.UtcNow;
// Avoid library manager and keep out of in-memory cache
// Not great that this class has to know about that, but we'll improve that later.
return ItemRepository.SaveItem(this, cancellationToken);
}
protected override bool GetBlockUnratedValue(UserPolicy config)
{
return config.BlockUnratedItems.Contains(UnratedItem.LiveTvProgram);