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
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the special feature ids.
|
||||
/// Gets the special feature ids.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
public class Movie : Video, IHasSpecialFeatures, IHasTrailers, IHasLookupInfo<MovieInfo>, ISupportsBoxSetGrouping
|
||||
{
|
||||
private IReadOnlyList<Guid> _specialFeatureIds;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IReadOnlyList<Guid> SpecialFeatureIds
|
||||
{
|
||||
get
|
||||
{
|
||||
return _specialFeatureIds ??= GetExtras()
|
||||
.Where(extra => extra.ExtraType != Model.Entities.ExtraType.Trailer)
|
||||
.Select(song => song.Id)
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_specialFeatureIds = value;
|
||||
}
|
||||
}
|
||||
public IReadOnlyList<Guid> SpecialFeatureIds => GetExtras()
|
||||
.Where(extra => extra.ExtraType != null && extra is Video)
|
||||
.Select(extra => extra.Id)
|
||||
.ToArray();
|
||||
|
||||
/// <inheritdoc />
|
||||
public IReadOnlyList<BaseItem> LocalTrailers => GetExtras()
|
||||
|
|
Loading…
Reference in New Issue
Block a user