aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/LiveTv
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/LiveTv')
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs10
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvChannel.cs4
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvProgram.cs48
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs10
-rw-r--r--MediaBrowser.Controller/LiveTv/RecordingGroup.cs6
5 files changed, 45 insertions, 33 deletions
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
index 03c05ec69..d9834c191 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
@@ -36,7 +36,6 @@ namespace MediaBrowser.Controller.LiveTv
public bool IsLive { get; set; }
[IgnoreDataMember]
public bool IsPremiere { get; set; }
- public ProgramAudio? Audio { get; set; }
/// <summary>
/// Gets the user data key.
@@ -106,9 +105,9 @@ namespace MediaBrowser.Controller.LiveTv
}
}
- protected override bool GetBlockUnratedValue(UserPolicy config)
+ public override UnratedItem GetBlockUnratedType()
{
- return config.BlockUnratedItems.Contains(UnratedItem.LiveTvProgram);
+ return UnratedItem.LiveTvProgram;
}
protected override string GetInternalMetadataPath(string basePath)
@@ -140,5 +139,10 @@ namespace MediaBrowser.Controller.LiveTv
return list;
}
+
+ public override bool IsVisibleStandalone(User user)
+ {
+ return IsVisible(user);
+ }
}
}
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
index 89168c578..8c4ee92cd 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
@@ -22,9 +22,9 @@ namespace MediaBrowser.Controller.LiveTv
return GetClientTypeName() + "-" + Name;
}
- protected override bool GetBlockUnratedValue(UserPolicy config)
+ public override UnratedItem GetBlockUnratedType()
{
- return config.BlockUnratedItems.Contains(UnratedItem.LiveTvChannel);
+ return UnratedItem.LiveTvChannel;
}
/// <summary>
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
index 88bbe19b7..fcd065e79 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
@@ -40,10 +40,11 @@ namespace MediaBrowser.Controller.LiveTv
}
/// <summary>
- /// Gets or sets the type of the channel.
+ /// Gets or sets the name.
/// </summary>
- /// <value>The type of the channel.</value>
- public ChannelType ChannelType { get; set; }
+ /// <value>The name.</value>
+ [IgnoreDataMember]
+ public string ServiceName { get; set; }
/// <summary>
/// The start date of the program, in UTC.
@@ -52,12 +53,6 @@ namespace MediaBrowser.Controller.LiveTv
public DateTime StartDate { get; set; }
/// <summary>
- /// Gets or sets the audio.
- /// </summary>
- /// <value>The audio.</value>
- public ProgramAudio? Audio { get; set; }
-
- /// <summary>
/// Gets or sets a value indicating whether this instance is repeat.
/// </summary>
/// <value><c>true</c> if this instance is repeat; otherwise, <c>false</c>.</value>
@@ -72,12 +67,6 @@ namespace MediaBrowser.Controller.LiveTv
public string EpisodeTitle { get; set; }
/// <summary>
- /// Gets or sets the name of the service.
- /// </summary>
- /// <value>The name of the service.</value>
- public string ServiceName { get; set; }
-
- /// <summary>
/// Gets or sets a value indicating whether this instance is movie.
/// </summary>
/// <value><c>true</c> if this instance is movie; otherwise, <c>false</c>.</value>
@@ -153,14 +142,14 @@ namespace MediaBrowser.Controller.LiveTv
}
}
- [IgnoreDataMember]
- public override string MediaType
- {
- get
- {
- return ChannelType == ChannelType.TV ? Model.Entities.MediaType.Video : Model.Entities.MediaType.Audio;
- }
- }
+ //[IgnoreDataMember]
+ //public override string MediaType
+ //{
+ // get
+ // {
+ // return ChannelType == ChannelType.TV ? Model.Entities.MediaType.Video : Model.Entities.MediaType.Audio;
+ // }
+ //}
[IgnoreDataMember]
public bool IsAiring
@@ -189,9 +178,9 @@ namespace MediaBrowser.Controller.LiveTv
return "Program";
}
- protected override bool GetBlockUnratedValue(UserPolicy config)
+ public override UnratedItem GetBlockUnratedType()
{
- return config.BlockUnratedItems.Contains(UnratedItem.LiveTvProgram);
+ return UnratedItem.LiveTvProgram;
}
protected override string GetInternalMetadataPath(string basePath)
@@ -236,5 +225,14 @@ namespace MediaBrowser.Controller.LiveTv
return base.SupportsPeople;
}
}
+
+ [IgnoreDataMember]
+ public override bool SupportsAncestors
+ {
+ get
+ {
+ return false;
+ }
+ }
}
}
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
index 27594317d..c58b5502b 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
@@ -36,7 +36,6 @@ namespace MediaBrowser.Controller.LiveTv
public bool IsLive { get; set; }
[IgnoreDataMember]
public bool IsPremiere { get; set; }
- public ProgramAudio? Audio { get; set; }
/// <summary>
/// Gets the user data key.
@@ -121,9 +120,9 @@ namespace MediaBrowser.Controller.LiveTv
}
}
- protected override bool GetBlockUnratedValue(UserPolicy config)
+ public override UnratedItem GetBlockUnratedType()
{
- return config.BlockUnratedItems.Contains(UnratedItem.LiveTvProgram);
+ return UnratedItem.LiveTvProgram;
}
protected override string GetInternalMetadataPath(string basePath)
@@ -155,5 +154,10 @@ namespace MediaBrowser.Controller.LiveTv
return list;
}
+
+ public override bool IsVisibleStandalone(User user)
+ {
+ return IsVisible(user);
+ }
}
}
diff --git a/MediaBrowser.Controller/LiveTv/RecordingGroup.cs b/MediaBrowser.Controller/LiveTv/RecordingGroup.cs
index 175cf162b..2d58ef67f 100644
--- a/MediaBrowser.Controller/LiveTv/RecordingGroup.cs
+++ b/MediaBrowser.Controller/LiveTv/RecordingGroup.cs
@@ -1,4 +1,5 @@
using MediaBrowser.Controller.Entities;
+using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Users;
namespace MediaBrowser.Controller.LiveTv
@@ -11,6 +12,11 @@ namespace MediaBrowser.Controller.LiveTv
return false;
}
+ public override UnratedItem GetBlockUnratedType()
+ {
+ return UnratedItem.LiveTvProgram;
+ }
+
public override bool SupportsLocalMetadata
{
get