diff options
Diffstat (limited to 'MediaBrowser.Controller/LiveTv/LiveTvProgram.cs')
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/LiveTvProgram.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs index 6a00607e4..e7a501479 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs @@ -1,6 +1,9 @@ using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Library; using MediaBrowser.Model.LiveTv; using System; +using System.Threading; +using System.Threading.Tasks; namespace MediaBrowser.Controller.LiveTv { @@ -127,6 +130,31 @@ namespace MediaBrowser.Controller.LiveTv /// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value> public bool IsPremiere { get; set; } + /// <summary> + /// Returns the folder containing the item. + /// If the item is a folder, it returns the folder itself + /// </summary> + /// <value>The containing folder path.</value> + public override string ContainingFolderPath + { + get + { + return Path; + } + } + + /// <summary> + /// Gets a value indicating whether this instance is owned item. + /// </summary> + /// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value> + public override bool IsOwnedItem + { + get + { + return false; + } + } + public override string MediaType { get @@ -159,5 +187,14 @@ 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); + } } } |
