update channel db

This commit is contained in:
Luke Pulverenti
2015-10-04 14:10:50 -04:00
parent cf87301f45
commit 5c613f2dda
22 changed files with 178 additions and 224 deletions

View File

@@ -7,24 +7,15 @@ using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Users;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Threading;
namespace MediaBrowser.Controller.Channels
{
public class ChannelAudioItem : Audio, IChannelMediaItem
{
public string ExternalId { get; set; }
public string DataVersion { get; set; }
public ChannelItemType ChannelItemType { get; set; }
public bool IsInfiniteStream { get; set; }
public ChannelMediaContentType ContentType { get; set; }
public string OriginalImageUrl { get; set; }
public List<ChannelMediaInfo> ChannelMediaSources { get; set; }
protected override bool GetBlockUnratedValue(UserPolicy config)
@@ -37,6 +28,7 @@ namespace MediaBrowser.Controller.Channels
return ExternalId;
}
[IgnoreDataMember]
public override bool SupportsLocalMetadata
{
get
@@ -55,6 +47,7 @@ namespace MediaBrowser.Controller.Channels
ChannelMediaSources = new List<ChannelMediaInfo>();
}
[IgnoreDataMember]
public override LocationType LocationType
{
get

View File

@@ -3,18 +3,15 @@ using MediaBrowser.Model.Channels;
using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Users;
using System;
using System.Runtime.Serialization;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Controller.Channels
{
public class ChannelFolderItem : Folder, IChannelItem
{
public string ExternalId { get; set; }
public string DataVersion { get; set; }
public ChannelItemType ChannelItemType { get; set; }
public ChannelFolderType ChannelFolderType { get; set; }
public string OriginalImageUrl { get; set; }
@@ -25,6 +22,7 @@ namespace MediaBrowser.Controller.Channels
return false;
}
[IgnoreDataMember]
public override bool SupportsLocalMetadata
{
get

View File

@@ -8,24 +8,17 @@ using MediaBrowser.Model.Users;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Runtime.Serialization;
using System.Threading;
namespace MediaBrowser.Controller.Channels
{
public class ChannelVideoItem : Video, IChannelMediaItem, IHasLookupInfo<ChannelItemLookupInfo>
{
public string ExternalId { get; set; }
public string DataVersion { get; set; }
public ChannelItemType ChannelItemType { get; set; }
public bool IsInfiniteStream { get; set; }
public ChannelMediaContentType ContentType { get; set; }
public string OriginalImageUrl { get; set; }
public List<ChannelMediaInfo> ChannelMediaSources { get; set; }
protected override string CreateUserDataKey()
@@ -56,6 +49,7 @@ namespace MediaBrowser.Controller.Channels
return config.BlockUnratedItems.Contains(UnratedItem.ChannelContent);
}
[IgnoreDataMember]
public override bool SupportsLocalMetadata
{
get
@@ -74,6 +68,7 @@ namespace MediaBrowser.Controller.Channels
ChannelMediaSources = new List<ChannelMediaInfo>();
}
[IgnoreDataMember]
public override LocationType LocationType
{
get

View File

@@ -8,10 +8,6 @@ namespace MediaBrowser.Controller.Channels
string ExternalId { get; set; }
ChannelItemType ChannelItemType { get; set; }
string OriginalImageUrl { get; set; }
string DataVersion { get; set; }
string ExternalImagePath { get; set; }
}
}

View File

@@ -124,6 +124,12 @@ namespace MediaBrowser.Controller.Entities
/// <value>The id.</value>
public Guid Id { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is hd.
/// </summary>
/// <value><c>true</c> if this instance is hd; otherwise, <c>false</c>.</value>
public bool? IsHD { get; set; }
/// <summary>
/// Return the id that should be used to key display prefs for this item.
/// Default is based on the type for everything except actual generic folders.
@@ -166,6 +172,33 @@ namespace MediaBrowser.Controller.Entities
}
}
/// <summary>
/// Id of the program.
/// </summary>
[IgnoreDataMember]
public string ExternalId
{
get { return this.GetProviderId("ProviderExternalId"); }
set
{
this.SetProviderId("ProviderExternalId", value);
}
}
/// <summary>
/// Supply the image path if it can be accessed directly from the file system
/// </summary>
/// <value>The image path.</value>
[IgnoreDataMember]
public string ExternalImagePath { get; set; }
/// <summary>
/// Gets or sets the etag.
/// </summary>
/// <value>The etag.</value>
[IgnoreDataMember]
public string ExternalEtag { get; set; }
[IgnoreDataMember]
public virtual bool IsHidden
{

View File

@@ -1397,7 +1397,7 @@ namespace MediaBrowser.Controller.Entities
var val = query.IsHD.Value;
var video = item as Video;
if (video == null || val != video.IsHD)
if (video == null || !video.IsHD.HasValue || val != video.IsHD)
{
return false;
}

View File

@@ -330,8 +330,6 @@ namespace MediaBrowser.Controller.Entities
get { return Video3DFormat.HasValue; }
}
public bool IsHD { get; set; }
/// <summary>
/// Gets the type of the media.
/// </summary>

View File

@@ -12,7 +12,6 @@ namespace MediaBrowser.Controller.LiveTv
public interface ILiveTvRecording : IHasImages, IHasMediaSources, IHasUserData, ILiveTvItem, IHasStartDate, IHasProgramAttributes
{
string ChannelId { get; }
string ProgramId { get; set; }
string MediaType { get; }
string Container { get; }
@@ -31,16 +30,11 @@ namespace MediaBrowser.Controller.LiveTv
bool CanDelete(User user);
string ProviderImagePath { get; set; }
string ExternalImagePath { get; set; }
string ProviderImageUrl { get; set; }
string ExternalId { get; set; }
string EpisodeTitle { get; set; }
string SeriesTimerId { get; set; }
RecordingStatus Status { get; set; }
DateTime? EndDate { get; set; }
ChannelType ChannelType { get; set; }
DateTime DateLastSaved { get; set; }
DateTime DateCreated { get; set; }
DateTime DateModified { get; set; }

View File

@@ -14,9 +14,6 @@ namespace MediaBrowser.Controller.LiveTv
{
public class LiveTvAudioRecording : Audio, ILiveTvRecording
{
public string ExternalId { get; set; }
public string ProviderImagePath { get; set; }
public string ProviderImageUrl { get; set; }
[IgnoreDataMember]
public string EpisodeTitle { get; set; }
[IgnoreDataMember]
@@ -35,13 +32,10 @@ namespace MediaBrowser.Controller.LiveTv
public bool IsRepeat { get; set; }
[IgnoreDataMember]
public bool IsMovie { get; set; }
public bool? IsHD { get; set; }
[IgnoreDataMember]
public bool IsLive { get; set; }
[IgnoreDataMember]
public bool IsPremiere { get; set; }
public ChannelType ChannelType { get; set; }
public string ProgramId { get; set; }
public ProgramAudio? Audio { get; set; }
/// <summary>
@@ -52,11 +46,6 @@ namespace MediaBrowser.Controller.LiveTv
{
var name = GetClientTypeName();
if (!string.IsNullOrEmpty(ProgramId))
{
return name + "-" + ProgramId;
}
return name + "-" + Name + (EpisodeTitle ?? string.Empty);
}

View File

@@ -46,12 +46,6 @@ namespace MediaBrowser.Controller.LiveTv
/// <value>The number.</value>
public string Number { get; set; }
/// <summary>
/// Gets or sets the external identifier.
/// </summary>
/// <value>The external identifier.</value>
public string ExternalId { get; set; }
/// <summary>
/// Gets or sets the type of the channel.
/// </summary>
@@ -64,24 +58,6 @@ namespace MediaBrowser.Controller.LiveTv
/// <value>The name of the service.</value>
public string ServiceName { get; set; }
/// <summary>
/// Supply the image path if it can be accessed directly from the file system
/// </summary>
/// <value>The image path.</value>
public string ProviderImagePath { get; set; }
/// <summary>
/// Supply the image url if it can be downloaded
/// </summary>
/// <value>The image URL.</value>
public string ProviderImageUrl { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance has image.
/// </summary>
/// <value><c>null</c> if [has image] contains no value, <c>true</c> if [has image]; otherwise, <c>false</c>.</value>
public bool? HasProviderImage { get; set; }
public override LocationType LocationType
{
get

View File

@@ -7,6 +7,7 @@ using MediaBrowser.Model.Users;
using System;
using System.Linq;
using System.Runtime.Serialization;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Controller.LiveTv
{
@@ -30,17 +31,6 @@ namespace MediaBrowser.Controller.LiveTv
return GetClientTypeName() + "-" + Name;
}
/// <summary>
/// Gets or sets the etag.
/// </summary>
/// <value>The etag.</value>
public string Etag { get; set; }
/// <summary>
/// Id of the program.
/// </summary>
public string ExternalId { get; set; }
/// <summary>
/// Gets or sets the type of the channel.
/// </summary>
@@ -53,12 +43,6 @@ namespace MediaBrowser.Controller.LiveTv
[IgnoreDataMember]
public DateTime StartDate { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is hd.
/// </summary>
/// <value><c>true</c> if this instance is hd; otherwise, <c>false</c>.</value>
public bool? IsHD { get; set; }
/// <summary>
/// Gets or sets the audio.
/// </summary>
@@ -85,24 +69,6 @@ namespace MediaBrowser.Controller.LiveTv
/// <value>The name of the service.</value>
public string ServiceName { get; set; }
/// <summary>
/// Supply the image path if it can be accessed directly from the file system
/// </summary>
/// <value>The image path.</value>
public string ProviderImagePath { get; set; }
/// <summary>
/// Supply the image url if it can be downloaded
/// </summary>
/// <value>The image URL.</value>
public string ProviderImageUrl { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance has image.
/// </summary>
/// <value><c>null</c> if [has image] contains no value, <c>true</c> if [has image]; otherwise, <c>false</c>.</value>
public bool? HasProviderImage { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is movie.
/// </summary>

View File

@@ -14,9 +14,6 @@ namespace MediaBrowser.Controller.LiveTv
{
public class LiveTvVideoRecording : Video, ILiveTvRecording
{
public string ExternalId { get; set; }
public string ProviderImagePath { get; set; }
public string ProviderImageUrl { get; set; }
[IgnoreDataMember]
public string EpisodeTitle { get; set; }
[IgnoreDataMember]
@@ -35,13 +32,10 @@ namespace MediaBrowser.Controller.LiveTv
public bool IsRepeat { get; set; }
[IgnoreDataMember]
public bool IsMovie { get; set; }
public bool? IsHD { get; set; }
[IgnoreDataMember]
public bool IsLive { get; set; }
[IgnoreDataMember]
public bool IsPremiere { get; set; }
public ChannelType ChannelType { get; set; }
public string ProgramId { get; set; }
public ProgramAudio? Audio { get; set; }
/// <summary>
@@ -62,11 +56,6 @@ namespace MediaBrowser.Controller.LiveTv
var name = GetClientTypeName();
if (!string.IsNullOrEmpty(ProgramId))
{
return name + "-" + ProgramId;
}
return name + "-" + Name + (EpisodeTitle ?? string.Empty);
}
@@ -118,6 +107,7 @@ namespace MediaBrowser.Controller.LiveTv
return false;
}
[IgnoreDataMember]
public override bool SupportsLocalMetadata
{
get