aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/LiveTv/LiveTvChannel.cs')
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvChannel.cs35
1 files changed, 15 insertions, 20 deletions
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
index de72accff..eaea6cfa4 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
@@ -4,9 +4,10 @@ using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.MediaInfo;
+using MediaBrowser.Model.Users;
using System.Collections.Generic;
using System.Linq;
-using MediaBrowser.Model.Users;
+using System.Runtime.Serialization;
namespace MediaBrowser.Controller.LiveTv
{
@@ -16,24 +17,11 @@ namespace MediaBrowser.Controller.LiveTv
/// Gets the user data key.
/// </summary>
/// <returns>System.String.</returns>
- public override string GetUserDataKey()
+ protected override string CreateUserDataKey()
{
return GetClientTypeName() + "-" + Name;
}
- /// <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;
- }
- }
-
protected override bool GetBlockUnratedValue(UserPolicy config)
{
return config.BlockUnratedItems.Contains(UnratedItem.LiveTvChannel);
@@ -43,6 +31,7 @@ namespace MediaBrowser.Controller.LiveTv
/// 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>
+ [IgnoreDataMember]
public override bool IsOwnedItem
{
get
@@ -51,11 +40,6 @@ namespace MediaBrowser.Controller.LiveTv
}
}
- public override bool IsSaveLocalMetadataEnabled()
- {
- return true;
- }
-
/// <summary>
/// Gets or sets the number.
/// </summary>
@@ -106,6 +90,7 @@ namespace MediaBrowser.Controller.LiveTv
return number.ToString("000-") + (Name ?? string.Empty);
}
+ [IgnoreDataMember]
public override string MediaType
{
get
@@ -145,5 +130,15 @@ namespace MediaBrowser.Controller.LiveTv
return list;
}
+
+ protected override string GetInternalMetadataPath(string basePath)
+ {
+ return System.IO.Path.Combine(basePath, "livetv", Id.ToString("N"), "metadata");
+ }
+
+ public override bool CanDelete()
+ {
+ return false;
+ }
}
}