mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 14:28:46 +01:00
update storage of genres, studios, tags, & keywords
This commit is contained in:
@@ -37,6 +37,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
protected BaseItem()
|
||||
{
|
||||
Keywords = new List<string>();
|
||||
Tags = new List<string>();
|
||||
Genres = new List<string>();
|
||||
Studios = new List<string>();
|
||||
@@ -811,6 +812,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
[IgnoreDataMember]
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
public List<string> Keywords { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the home page URL.
|
||||
/// </summary>
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public string[] ExcludeTags { get; set; }
|
||||
public string[] ExcludeInheritedTags { get; set; }
|
||||
public string[] Genres { get; set; }
|
||||
public string[] Keywords { get; set; }
|
||||
|
||||
public bool? IsMissing { get; set; }
|
||||
public bool? IsUnaired { get; set; }
|
||||
@@ -151,6 +152,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
OfficialRatings = new string[] { };
|
||||
SortBy = new string[] { };
|
||||
MediaTypes = new string[] { };
|
||||
Keywords = new string[] { };
|
||||
IncludeItemTypes = new string[] { };
|
||||
ExcludeItemTypes = new string[] { };
|
||||
Genres = new string[] { };
|
||||
|
||||
@@ -1,21 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
public interface IHasKeywords
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the keywords.
|
||||
/// </summary>
|
||||
/// <value>The keywords.</value>
|
||||
List<string> Keywords { get; set; }
|
||||
}
|
||||
|
||||
public static class KeywordExtensions
|
||||
{
|
||||
public static void AddKeyword(this IHasKeywords item, string name)
|
||||
public static void AddKeyword(this BaseItem item, string name)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
@@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
/// <summary>
|
||||
/// Class BoxSet
|
||||
/// </summary>
|
||||
public class BoxSet : Folder, IHasTrailers, IHasKeywords, IHasDisplayOrder, IHasLookupInfo<BoxSetInfo>, IHasShares
|
||||
public class BoxSet : Folder, IHasTrailers, IHasDisplayOrder, IHasLookupInfo<BoxSetInfo>, IHasShares
|
||||
{
|
||||
public List<Share> Shares { get; set; }
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
RemoteTrailerIds = new List<Guid>();
|
||||
|
||||
DisplayOrder = ItemSortBy.PremiereDate;
|
||||
Keywords = new List<string>();
|
||||
Shares = new List<Share>();
|
||||
}
|
||||
|
||||
@@ -47,12 +46,6 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
/// <value>The remote trailers.</value>
|
||||
public List<MediaUrl> RemoteTrailers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the tags.
|
||||
/// </summary>
|
||||
/// <value>The tags.</value>
|
||||
public List<string> Keywords { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the display order.
|
||||
/// </summary>
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
/// <summary>
|
||||
/// Class Movie
|
||||
/// </summary>
|
||||
public class Movie : Video, IHasCriticRating, IHasSpecialFeatures, IHasProductionLocations, IHasBudget, IHasKeywords, IHasTrailers, IHasThemeMedia, IHasTaglines, IHasAwards, IHasMetascore, IHasLookupInfo<MovieInfo>, ISupportsBoxSetGrouping, IHasOriginalTitle
|
||||
public class Movie : Video, IHasCriticRating, IHasSpecialFeatures, IHasProductionLocations, IHasBudget, IHasTrailers, IHasThemeMedia, IHasTaglines, IHasAwards, IHasMetascore, IHasLookupInfo<MovieInfo>, ISupportsBoxSetGrouping, IHasOriginalTitle
|
||||
{
|
||||
public List<Guid> SpecialFeatureIds { get; set; }
|
||||
|
||||
@@ -32,7 +32,6 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
ThemeSongIds = new List<Guid>();
|
||||
ThemeVideoIds = new List<Guid>();
|
||||
Taglines = new List<string>();
|
||||
Keywords = new List<string>();
|
||||
ProductionLocations = new List<string>();
|
||||
}
|
||||
|
||||
@@ -42,7 +41,6 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
|
||||
public List<Guid> LocalTrailerIds { get; set; }
|
||||
public List<Guid> RemoteTrailerIds { get; set; }
|
||||
public List<string> Keywords { get; set; }
|
||||
|
||||
public List<MediaUrl> RemoteTrailers { get; set; }
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <summary>
|
||||
/// Class Trailer
|
||||
/// </summary>
|
||||
public class Trailer : Video, IHasCriticRating, IHasProductionLocations, IHasBudget, IHasKeywords, IHasTaglines, IHasMetascore, IHasOriginalTitle, IHasLookupInfo<TrailerInfo>
|
||||
public class Trailer : Video, IHasCriticRating, IHasProductionLocations, IHasBudget, IHasTaglines, IHasMetascore, IHasOriginalTitle, IHasLookupInfo<TrailerInfo>
|
||||
{
|
||||
public List<string> ProductionLocations { get; set; }
|
||||
|
||||
@@ -31,8 +31,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
public List<MediaUrl> RemoteTrailers { get; set; }
|
||||
|
||||
public List<string> Keywords { get; set; }
|
||||
|
||||
[IgnoreDataMember]
|
||||
public bool IsLocalTrailer
|
||||
{
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
<Compile Include="Entities\IHasDisplayOrder.cs" />
|
||||
<Compile Include="Entities\IHasId.cs" />
|
||||
<Compile Include="Entities\IHasImages.cs" />
|
||||
<Compile Include="Entities\IHasKeywords.cs" />
|
||||
<Compile Include="Entities\KeywordExtensions.cs" />
|
||||
<Compile Include="Entities\IHasMediaSources.cs" />
|
||||
<Compile Include="Entities\IHasMetascore.cs" />
|
||||
<Compile Include="Entities\IHasOriginalTitle.cs" />
|
||||
|
||||
@@ -816,11 +816,7 @@ namespace MediaBrowser.Controller.Providers
|
||||
{
|
||||
using (var subtree = reader.ReadSubtree())
|
||||
{
|
||||
var hasTags = item as IHasKeywords;
|
||||
if (hasTags != null)
|
||||
{
|
||||
FetchFromKeywordsNode(subtree, hasTags);
|
||||
}
|
||||
FetchFromKeywordsNode(subtree, item);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1099,7 +1095,7 @@ namespace MediaBrowser.Controller.Providers
|
||||
}
|
||||
}
|
||||
|
||||
private void FetchFromKeywordsNode(XmlReader reader, IHasKeywords item)
|
||||
private void FetchFromKeywordsNode(XmlReader reader, BaseItem item)
|
||||
{
|
||||
reader.MoveToContent();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user