aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/LiveTv
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/LiveTv')
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvItem.cs8
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvManager.cs6
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs7
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvChannel.cs6
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvProgram.cs21
-rw-r--r--MediaBrowser.Controller/LiveTv/ProgramInfo.cs6
-rw-r--r--MediaBrowser.Controller/LiveTv/RecordingGroup.cs1
7 files changed, 42 insertions, 13 deletions
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs b/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs
new file mode 100644
index 0000000000..d3334e8ea0
--- /dev/null
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvItem.cs
@@ -0,0 +1,8 @@
+
+namespace MediaBrowser.Controller.LiveTv
+{
+ public interface ILiveTvItem
+ {
+ string ServiceName { get; set; }
+ }
+}
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
index fcd973ec29..9b36454d2a 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
@@ -15,12 +15,6 @@ namespace MediaBrowser.Controller.LiveTv
public interface ILiveTvManager
{
/// <summary>
- /// Gets the active service.
- /// </summary>
- /// <value>The active service.</value>
- ILiveTvService ActiveService { get; }
-
- /// <summary>
/// Gets the services.
/// </summary>
/// <value>The services.</value>
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs b/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs
index 784cb6ea18..93e1e576ac 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs
@@ -1,4 +1,5 @@
using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Library;
using System.Threading;
@@ -6,10 +7,8 @@ using System.Threading.Tasks;
namespace MediaBrowser.Controller.LiveTv
{
- public interface ILiveTvRecording : IHasImages, IHasMediaSources, IHasUserData
+ public interface ILiveTvRecording : IHasImages, IHasMediaSources, IHasUserData, ILiveTvItem
{
- string ServiceName { get; set; }
-
string MediaType { get; }
string Container { get; }
@@ -22,7 +21,7 @@ namespace MediaBrowser.Controller.LiveTv
bool IsParentalAllowed(User user);
- Task RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken);
+ Task<ItemUpdateType> RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken);
PlayAccess GetPlayAccess(User user);
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
index eaea6cfa45..75e418bcc9 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
@@ -11,7 +11,7 @@ using System.Runtime.Serialization;
namespace MediaBrowser.Controller.LiveTv
{
- public class LiveTvChannel : BaseItem, IHasMediaSources
+ public class LiveTvChannel : BaseItem, IHasMediaSources, ILiveTvItem
{
/// <summary>
/// Gets the user data key.
@@ -58,6 +58,10 @@ namespace MediaBrowser.Controller.LiveTv
/// <value>The type of the channel.</value>
public ChannelType ChannelType { 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>
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
index ee85ce20b0..0b07d8b6d1 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
@@ -1,5 +1,6 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
+using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Users;
@@ -11,7 +12,7 @@ using System.Threading.Tasks;
namespace MediaBrowser.Controller.LiveTv
{
- public class LiveTvProgram : BaseItem
+ public class LiveTvProgram : BaseItem, ILiveTvItem, IHasLookupInfo<LiveTvProgramLookupInfo>
{
/// <summary>
/// Gets the user data key.
@@ -220,5 +221,23 @@ namespace MediaBrowser.Controller.LiveTv
{
return false;
}
+
+ public override bool IsInternetMetadataEnabled()
+ {
+ if (IsMovie)
+ {
+ var options = (LiveTvOptions)ConfigurationManager.GetConfiguration("livetv");
+ return options.EnableMovieProviders;
+ }
+
+ return false;
+ }
+
+ public LiveTvProgramLookupInfo GetLookupInfo()
+ {
+ var info = GetItemLookupInfo<LiveTvProgramLookupInfo>();
+ info.IsMovie = IsMovie;
+ return info;
+ }
}
}
diff --git a/MediaBrowser.Controller/LiveTv/ProgramInfo.cs b/MediaBrowser.Controller/LiveTv/ProgramInfo.cs
index 4d7e5ee63e..36f082b02c 100644
--- a/MediaBrowser.Controller/LiveTv/ProgramInfo.cs
+++ b/MediaBrowser.Controller/LiveTv/ProgramInfo.cs
@@ -145,6 +145,12 @@ namespace MediaBrowser.Controller.LiveTv
/// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>
public bool IsPremiere { get; set; }
+ /// <summary>
+ /// Gets or sets the production year.
+ /// </summary>
+ /// <value>The production year.</value>
+ public int? ProductionYear { get; set; }
+
public ProgramInfo()
{
Genres = new List<string>();
diff --git a/MediaBrowser.Controller/LiveTv/RecordingGroup.cs b/MediaBrowser.Controller/LiveTv/RecordingGroup.cs
index d7250d9d2f..175cf162b4 100644
--- a/MediaBrowser.Controller/LiveTv/RecordingGroup.cs
+++ b/MediaBrowser.Controller/LiveTv/RecordingGroup.cs
@@ -1,5 +1,4 @@
using MediaBrowser.Controller.Entities;
-using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Users;
namespace MediaBrowser.Controller.LiveTv