mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Don't cache special feature ids
This commit is contained in:
parent
9158511017
commit
05c8834a3a
@ -10,9 +10,9 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
public interface IHasSpecialFeatures
|
public interface IHasSpecialFeatures
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the special feature ids.
|
/// Gets the special feature ids.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The special feature ids.</value>
|
/// <value>The special feature ids.</value>
|
||||||
IReadOnlyList<Guid> SpecialFeatureIds { get; set; }
|
IReadOnlyList<Guid> SpecialFeatureIds { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,24 +19,11 @@ namespace MediaBrowser.Controller.Entities.Movies
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class Movie : Video, IHasSpecialFeatures, IHasTrailers, IHasLookupInfo<MovieInfo>, ISupportsBoxSetGrouping
|
public class Movie : Video, IHasSpecialFeatures, IHasTrailers, IHasLookupInfo<MovieInfo>, ISupportsBoxSetGrouping
|
||||||
{
|
{
|
||||||
private IReadOnlyList<Guid> _specialFeatureIds;
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public IReadOnlyList<Guid> SpecialFeatureIds
|
public IReadOnlyList<Guid> SpecialFeatureIds => GetExtras()
|
||||||
{
|
.Where(extra => extra.ExtraType != null && extra is Video)
|
||||||
get
|
.Select(extra => extra.Id)
|
||||||
{
|
.ToArray();
|
||||||
return _specialFeatureIds ??= GetExtras()
|
|
||||||
.Where(extra => extra.ExtraType != Model.Entities.ExtraType.Trailer)
|
|
||||||
.Select(song => song.Id)
|
|
||||||
.ToArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_specialFeatureIds = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public IReadOnlyList<BaseItem> LocalTrailers => GetExtras()
|
public IReadOnlyList<BaseItem> LocalTrailers => GetExtras()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user