mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 17:44:43 +01:00
update sync objects
This commit is contained in:
@@ -28,12 +28,14 @@ namespace MediaBrowser.Controller.Entities
|
||||
SoundtrackIds = new List<Guid>();
|
||||
RemoteTrailers = new List<MediaUrl>();
|
||||
LocalTrailerIds = new List<Guid>();
|
||||
RemoteTrailerIds = new List<Guid>();
|
||||
ThemeSongIds = new List<Guid>();
|
||||
ThemeVideoIds = new List<Guid>();
|
||||
Tags = new List<string>();
|
||||
}
|
||||
|
||||
public List<Guid> LocalTrailerIds { get; set; }
|
||||
public List<Guid> RemoteTrailerIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the tags.
|
||||
@@ -119,5 +121,16 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the trailer ids.
|
||||
/// </summary>
|
||||
/// <returns>List<Guid>.</returns>
|
||||
public List<Guid> GetTrailerIds()
|
||||
{
|
||||
var list = LocalTrailerIds.ToList();
|
||||
list.AddRange(RemoteTrailerIds);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
public interface IHasTrailers
|
||||
public interface IHasTrailers : IHasProviderIds
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the remote trailers.
|
||||
@@ -17,5 +17,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <value>The local trailer ids.</value>
|
||||
List<Guid> LocalTrailerIds { get; set; }
|
||||
List<Guid> RemoteTrailerIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the trailer ids.
|
||||
/// </summary>
|
||||
/// <returns>List<Guid>.</returns>
|
||||
List<Guid> GetTrailerIds();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
{
|
||||
RemoteTrailers = new List<MediaUrl>();
|
||||
LocalTrailerIds = new List<Guid>();
|
||||
RemoteTrailerIds = new List<Guid>();
|
||||
|
||||
DisplayOrder = ItemSortBy.PremiereDate;
|
||||
Keywords = new List<string>();
|
||||
@@ -35,6 +36,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
}
|
||||
|
||||
public List<Guid> LocalTrailerIds { get; set; }
|
||||
public List<Guid> RemoteTrailerIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the remote trailers.
|
||||
@@ -76,6 +78,17 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the trailer ids.
|
||||
/// </summary>
|
||||
/// <returns>List<Guid>.</returns>
|
||||
public List<Guid> GetTrailerIds()
|
||||
{
|
||||
var list = LocalTrailerIds.ToList();
|
||||
list.AddRange(RemoteTrailerIds);
|
||||
return list;
|
||||
}
|
||||
|
||||
public override IEnumerable<BaseItem> GetChildren(User user, bool includeLinkedChildren)
|
||||
{
|
||||
var children = base.GetChildren(user, includeLinkedChildren);
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
SoundtrackIds = new List<Guid>();
|
||||
RemoteTrailers = new List<MediaUrl>();
|
||||
LocalTrailerIds = new List<Guid>();
|
||||
RemoteTrailerIds = new List<Guid>();
|
||||
ThemeSongIds = new List<Guid>();
|
||||
ThemeVideoIds = new List<Guid>();
|
||||
BoxSetIdList = new List<Guid>();
|
||||
@@ -49,6 +50,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
public float? Metascore { get; set; }
|
||||
|
||||
public List<Guid> LocalTrailerIds { get; set; }
|
||||
public List<Guid> RemoteTrailerIds { get; set; }
|
||||
public List<string> Keywords { get; set; }
|
||||
|
||||
public List<MediaUrl> RemoteTrailers { get; set; }
|
||||
@@ -89,6 +91,17 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
/// <value>The name of the TMDB collection.</value>
|
||||
public string TmdbCollectionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the trailer ids.
|
||||
/// </summary>
|
||||
/// <returns>List<Guid>.</returns>
|
||||
public List<Guid> GetTrailerIds()
|
||||
{
|
||||
var list = LocalTrailerIds.ToList();
|
||||
list.AddRange(RemoteTrailerIds);
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the user data key.
|
||||
/// </summary>
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
SoundtrackIds = new List<Guid>();
|
||||
RemoteTrailers = new List<MediaUrl>();
|
||||
LocalTrailerIds = new List<Guid>();
|
||||
RemoteTrailerIds = new List<Guid>();
|
||||
DisplaySpecialsWithSeasons = true;
|
||||
}
|
||||
|
||||
@@ -57,7 +58,8 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
public bool DisplaySpecialsWithSeasons { get; set; }
|
||||
|
||||
public List<Guid> LocalTrailerIds { get; set; }
|
||||
|
||||
public List<Guid> RemoteTrailerIds { get; set; }
|
||||
|
||||
public List<MediaUrl> RemoteTrailers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -109,6 +111,17 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
return this.GetProviderId(MetadataProviders.Tvdb) ?? this.GetProviderId(MetadataProviders.Tvcom) ?? base.GetUserDataKey();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the trailer ids.
|
||||
/// </summary>
|
||||
/// <returns>List<Guid>.</returns>
|
||||
public List<Guid> GetTrailerIds()
|
||||
{
|
||||
var list = LocalTrailerIds.ToList();
|
||||
list.AddRange(RemoteTrailerIds);
|
||||
return list;
|
||||
}
|
||||
|
||||
// Studio, Genre and Rating will all be the same so makes no sense to index by these
|
||||
protected override IEnumerable<string> GetIndexByOptions()
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// Class Trailer
|
||||
/// </summary>
|
||||
[Obsolete]
|
||||
public class Trailer : Video, IHasCriticRating, IHasSoundtracks, IHasProductionLocations, IHasBudget, IHasTrailers, IHasKeywords, IHasTaglines, IHasMetascore, IHasLookupInfo<TrailerInfo>
|
||||
public class Trailer : Video, IHasCriticRating, IHasSoundtracks, IHasProductionLocations, IHasBudget, IHasKeywords, IHasTaglines, IHasMetascore, IHasLookupInfo<TrailerInfo>
|
||||
{
|
||||
public List<Guid> SoundtrackIds { get; set; }
|
||||
|
||||
@@ -24,15 +24,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
RemoteTrailers = new List<MediaUrl>();
|
||||
Taglines = new List<string>();
|
||||
SoundtrackIds = new List<Guid>();
|
||||
LocalTrailerIds = new List<Guid>();
|
||||
Keywords = new List<string>();
|
||||
ProductionLocations = new List<string>();
|
||||
}
|
||||
|
||||
public float? Metascore { get; set; }
|
||||
|
||||
public List<Guid> LocalTrailerIds { get; set; }
|
||||
|
||||
public List<MediaUrl> RemoteTrailers { get; set; }
|
||||
|
||||
public List<string> Keywords { get; set; }
|
||||
|
||||
@@ -1428,7 +1428,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
var hasTrailers = item as IHasTrailers;
|
||||
if (hasTrailers != null)
|
||||
{
|
||||
trailerCount = hasTrailers.LocalTrailerIds.Count;
|
||||
trailerCount = hasTrailers.GetTrailerIds().Count;
|
||||
}
|
||||
|
||||
var ok = val ? trailerCount > 0 : trailerCount == 0;
|
||||
|
||||
Reference in New Issue
Block a user