update metadata editor

This commit is contained in:
Luke Pulverenti
2015-09-19 22:06:56 -04:00
parent c3d6c19cc3
commit 718545a79b
24 changed files with 249 additions and 68 deletions

View File

@@ -115,7 +115,11 @@ namespace MediaBrowser.Controller.Channels
var info = GetItemLookupInfo<ChannelItemLookupInfo>();
info.ContentType = ContentType;
info.ExtraType = ExtraType;
if (ExtraType.HasValue)
{
info.ExtraType = ExtraType.Value;
}
return info;
}

View File

@@ -11,7 +11,7 @@ namespace MediaBrowser.Controller.Channels
ChannelMediaContentType ContentType { get; set; }
ExtraType ExtraType { get; set; }
ExtraType? ExtraType { get; set; }
List<ChannelMediaInfo> ChannelMediaSources { get; set; }
}

View File

@@ -24,14 +24,20 @@ namespace MediaBrowser.Controller.Entities.Audio
IThemeMedia,
IArchivable
{
public string FormatName { get; set; }
public long? Size { get; set; }
public string Container { get; set; }
public int? TotalBitrate { get; set; }
public List<string> Tags { get; set; }
public ExtraType ExtraType { get; set; }
public ExtraType? ExtraType { get; set; }
public bool IsThemeMedia { get; set; }
[IgnoreDataMember]
public bool IsThemeMedia
{
get
{
return ExtraType.HasValue && ExtraType.Value == Model.Entities.ExtraType.ThemeSong;
}
}
public Audio()
{
@@ -46,12 +52,6 @@ namespace MediaBrowser.Controller.Entities.Audio
get { return LocationType == LocationType.FileSystem && RunTimeTicks.HasValue; }
}
/// <summary>
/// Gets or sets a value indicating whether this instance has embedded image.
/// </summary>
/// <value><c>true</c> if this instance has embedded image; otherwise, <c>false</c>.</value>
public bool HasEmbeddedImage { get; set; }
[IgnoreDataMember]
protected override bool SupportsOwnedItems
{
@@ -212,8 +212,7 @@ namespace MediaBrowser.Controller.Entities.Audio
Path = enablePathSubstituion ? GetMappedPath(i.Path, locationType) : i.Path,
RunTimeTicks = i.RunTimeTicks,
Container = i.Container,
Size = i.Size,
Formats = (i.FormatName ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList()
Size = i.Size
};
if (string.IsNullOrEmpty(info.Container))

View File

@@ -66,6 +66,7 @@ namespace MediaBrowser.Controller.Entities.Audio
/// Gets the tracks.
/// </summary>
/// <value>The tracks.</value>
[IgnoreDataMember]
public IEnumerable<Audio> Tracks
{
get

View File

@@ -880,7 +880,7 @@ namespace MediaBrowser.Controller.Entities
if (!i.IsThemeMedia)
{
i.IsThemeMedia = true;
i.ExtraType = ExtraType.ThemeVideo;
subOptions.ForceSave = true;
}
@@ -910,7 +910,7 @@ namespace MediaBrowser.Controller.Entities
if (!i.IsThemeMedia)
{
i.IsThemeMedia = true;
i.ExtraType = ExtraType.ThemeSong;
subOptions.ForceSave = true;
}

View File

@@ -61,10 +61,6 @@ namespace MediaBrowser.Controller.Entities.TV
return base.CreateUserDataKey();
}
/// <summary>
/// The _series
/// </summary>
private Series _series;
/// <summary>
/// This Episode's Series Instance
/// </summary>
@@ -72,7 +68,7 @@ namespace MediaBrowser.Controller.Entities.TV
[IgnoreDataMember]
public Series Series
{
get { return _series ?? (_series = FindParent<Series>()); }
get { return FindParent<Series>(); }
}
[IgnoreDataMember]

View File

@@ -33,14 +33,20 @@ namespace MediaBrowser.Controller.Entities
public List<string> LocalAlternateVersions { get; set; }
public List<LinkedChild> LinkedAlternateVersions { get; set; }
public bool IsThemeMedia { get; set; }
[IgnoreDataMember]
public bool IsThemeMedia
{
get
{
return ExtraType.HasValue && ExtraType.Value == Model.Entities.ExtraType.ThemeVideo;
}
}
public string FormatName { get; set; }
public long? Size { get; set; }
public string Container { get; set; }
public int? TotalBitrate { get; set; }
public string ShortOverview { get; set; }
public ExtraType ExtraType { get; set; }
public ExtraType? ExtraType { get; set; }
/// <summary>
/// Gets or sets the preferred metadata country code.
@@ -498,7 +504,6 @@ namespace MediaBrowser.Controller.Entities
VideoType = i.VideoType,
Container = i.Container,
Size = i.Size,
Formats = (i.FormatName ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(),
Timestamp = i.Timestamp,
Type = type,
PlayableStreamFileNames = i.PlayableStreamFileNames.ToList(),

View File

@@ -18,6 +18,7 @@ namespace MediaBrowser.Controller.LiveTv
public string ProviderImagePath { get; set; }
public string ProviderImageUrl { get; set; }
public string EpisodeTitle { get; set; }
[IgnoreDataMember]
public bool IsSeries { get; set; }
public string SeriesTimerId { get; set; }
[IgnoreDataMember]
@@ -25,6 +26,7 @@ namespace MediaBrowser.Controller.LiveTv
public RecordingStatus Status { get; set; }
[IgnoreDataMember]
public bool IsSports { get; set; }
[IgnoreDataMember]
public bool IsNews { get; set; }
[IgnoreDataMember]
public bool IsKids { get; set; }
@@ -32,7 +34,9 @@ namespace MediaBrowser.Controller.LiveTv
[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; }

View File

@@ -125,18 +125,21 @@ namespace MediaBrowser.Controller.LiveTv
/// Gets or sets a value indicating whether this instance is series.
/// </summary>
/// <value><c>true</c> if this instance is series; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsSeries { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is live.
/// </summary>
/// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsLive { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is news.
/// </summary>
/// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsNews { get; set; }
/// <summary>
@@ -150,6 +153,7 @@ namespace MediaBrowser.Controller.LiveTv
/// Gets or sets a value indicating whether this instance is premiere.
/// </summary>
/// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsPremiere { get; set; }
/// <summary>
@@ -248,6 +252,7 @@ namespace MediaBrowser.Controller.LiveTv
return info;
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get

View File

@@ -18,6 +18,7 @@ namespace MediaBrowser.Controller.LiveTv
public string ProviderImagePath { get; set; }
public string ProviderImageUrl { get; set; }
public string EpisodeTitle { get; set; }
[IgnoreDataMember]
public bool IsSeries { get; set; }
public string SeriesTimerId { get; set; }
[IgnoreDataMember]
@@ -25,6 +26,7 @@ namespace MediaBrowser.Controller.LiveTv
public RecordingStatus Status { get; set; }
[IgnoreDataMember]
public bool IsSports { get; set; }
[IgnoreDataMember]
public bool IsNews { get; set; }
[IgnoreDataMember]
public bool IsKids { get; set; }
@@ -32,7 +34,9 @@ namespace MediaBrowser.Controller.LiveTv
[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; }