mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-15 02:33:33 +01:00
add movie metadata support to live tv
This commit is contained in:
@@ -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, ILiveTvItem
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user