mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-19 04:34:18 +01:00
move people page into main editor
This commit is contained in:
@@ -3,7 +3,7 @@ using MediaBrowser.Controller.Providers;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
public class AdultVideo : Video, IHasPreferredMetadataLanguage, IHasTaglines
|
||||
public class AdultVideo : Video, IHasProductionLocations, IHasPreferredMetadataLanguage, IHasTaglines
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the preferred metadata language.
|
||||
@@ -16,12 +16,14 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <value>The preferred metadata country code.</value>
|
||||
public string PreferredMetadataCountryCode { get; set; }
|
||||
public List<string> ProductionLocations { get; set; }
|
||||
|
||||
public List<string> Taglines { get; set; }
|
||||
|
||||
public AdultVideo()
|
||||
{
|
||||
Taglines = new List<string>();
|
||||
ProductionLocations = new List<string>();
|
||||
}
|
||||
|
||||
public override bool BeforeMetadataRefresh()
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
/// <summary>
|
||||
/// Class Movie
|
||||
/// </summary>
|
||||
public class Movie : Video, IHasCriticRating, IHasSoundtracks, IHasBudget, IHasKeywords, IHasTrailers, IHasThemeMedia, IHasTaglines, IHasPreferredMetadataLanguage, IHasAwards, IHasMetascore, IHasLookupInfo<MovieInfo>, ISupportsBoxSetGrouping
|
||||
public class Movie : Video, IHasCriticRating, IHasSoundtracks, IHasProductionLocations, IHasBudget, IHasKeywords, IHasTrailers, IHasThemeMedia, IHasTaglines, IHasPreferredMetadataLanguage, IHasAwards, IHasMetascore, IHasLookupInfo<MovieInfo>, ISupportsBoxSetGrouping
|
||||
{
|
||||
public List<Guid> SpecialFeatureIds { get; set; }
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
|
||||
public List<Guid> ThemeSongIds { get; set; }
|
||||
public List<Guid> ThemeVideoIds { get; set; }
|
||||
public List<string> ProductionLocations { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This is just a cache to enable quick access by Id
|
||||
@@ -48,6 +49,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
BoxSetIdList = new List<Guid>();
|
||||
Taglines = new List<string>();
|
||||
Keywords = new List<string>();
|
||||
ProductionLocations = new List<string>();
|
||||
}
|
||||
|
||||
public string AwardSummary { get; set; }
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Runtime.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
public class MusicVideo : Video, IHasArtist, IHasMusicGenres, IHasBudget, IHasLookupInfo<MusicVideoInfo>
|
||||
public class MusicVideo : Video, IHasArtist, IHasMusicGenres, IHasProductionLocations, IHasBudget, IHasLookupInfo<MusicVideoInfo>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the artist.
|
||||
@@ -34,6 +34,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <value>The revenue.</value>
|
||||
public double? Revenue { get; set; }
|
||||
public List<string> ProductionLocations { get; set; }
|
||||
|
||||
public MusicVideo()
|
||||
{
|
||||
ProductionLocations = new List<string>();
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public List<string> AllArtists
|
||||
|
||||
@@ -12,11 +12,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <summary>
|
||||
/// Class Trailer
|
||||
/// </summary>
|
||||
public class Trailer : Video, IHasCriticRating, IHasSoundtracks, IHasBudget, IHasTrailers, IHasKeywords, IHasTaglines, IHasPreferredMetadataLanguage, IHasMetascore, IHasLookupInfo<TrailerInfo>
|
||||
public class Trailer : Video, IHasCriticRating, IHasSoundtracks, IHasProductionLocations, IHasBudget, IHasTrailers, IHasKeywords, IHasTaglines, IHasPreferredMetadataLanguage, IHasMetascore, IHasLookupInfo<TrailerInfo>
|
||||
{
|
||||
public List<Guid> SoundtrackIds { get; set; }
|
||||
|
||||
public string PreferredMetadataLanguage { get; set; }
|
||||
public List<string> ProductionLocations { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the preferred metadata country code.
|
||||
@@ -31,6 +32,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
SoundtrackIds = new List<Guid>();
|
||||
LocalTrailerIds = new List<Guid>();
|
||||
Keywords = new List<string>();
|
||||
ProductionLocations = new List<string>();
|
||||
}
|
||||
|
||||
public float? Metascore { get; set; }
|
||||
|
||||
@@ -62,34 +62,6 @@ namespace MediaBrowser.Controller.Providers
|
||||
ValidationType = ValidationType.None
|
||||
};
|
||||
|
||||
var hasTaglines = item as IHasTaglines;
|
||||
if (hasTaglines != null)
|
||||
{
|
||||
hasTaglines.Taglines.Clear();
|
||||
}
|
||||
|
||||
item.Studios.Clear();
|
||||
item.Genres.Clear();
|
||||
item.People.Clear();
|
||||
|
||||
var hasTags = item as IHasTags;
|
||||
if (hasTags != null)
|
||||
{
|
||||
hasTags.Tags.Clear();
|
||||
}
|
||||
|
||||
var hasKeywords = item as IHasKeywords;
|
||||
if (hasKeywords != null)
|
||||
{
|
||||
hasKeywords.Keywords.Clear();
|
||||
}
|
||||
|
||||
var hasTrailers = item as IHasTrailers;
|
||||
if (hasTrailers != null)
|
||||
{
|
||||
hasTrailers.RemoteTrailers.Clear();
|
||||
}
|
||||
|
||||
//Fetch(item, metadataFile, settings, Encoding.GetEncoding("ISO-8859-1"), cancellationToken);
|
||||
Fetch(item, metadataFile, settings, Encoding.UTF8, cancellationToken);
|
||||
}
|
||||
@@ -373,6 +345,15 @@ namespace MediaBrowser.Controller.Providers
|
||||
break;
|
||||
}
|
||||
|
||||
case "Countries":
|
||||
{
|
||||
using (var subtree = reader.ReadSubtree())
|
||||
{
|
||||
FetchFromCountriesNode(subtree, item);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case "ContentRating":
|
||||
case "MPAARating":
|
||||
{
|
||||
@@ -857,6 +838,42 @@ namespace MediaBrowser.Controller.Providers
|
||||
}
|
||||
}
|
||||
|
||||
private void FetchFromCountriesNode(XmlReader reader, T item)
|
||||
{
|
||||
reader.MoveToContent();
|
||||
|
||||
while (reader.Read())
|
||||
{
|
||||
if (reader.NodeType == XmlNodeType.Element)
|
||||
{
|
||||
switch (reader.Name)
|
||||
{
|
||||
case "Country":
|
||||
{
|
||||
var val = reader.ReadElementContentAsString();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(val))
|
||||
{
|
||||
var hasProductionLocations = item as IHasProductionLocations;
|
||||
if (hasProductionLocations != null)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(val))
|
||||
{
|
||||
hasProductionLocations.AddProductionLocation(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
reader.Skip();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fetches from taglines node.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user