BoxSet.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using MediaBrowser.Model.Configuration;
  2. using MediaBrowser.Model.Entities;
  3. using MediaBrowser.Model.Querying;
  4. using System;
  5. using System.Collections.Generic;
  6. namespace MediaBrowser.Controller.Entities.Movies
  7. {
  8. /// <summary>
  9. /// Class BoxSet
  10. /// </summary>
  11. public class BoxSet : Folder, IHasTrailers, IHasTags, IHasPreferredMetadataLanguage
  12. {
  13. public BoxSet()
  14. {
  15. RemoteTrailers = new List<MediaUrl>();
  16. LocalTrailerIds = new List<Guid>();
  17. Tags = new List<string>();
  18. }
  19. public List<Guid> LocalTrailerIds { get; set; }
  20. /// <summary>
  21. /// Gets or sets the remote trailers.
  22. /// </summary>
  23. /// <value>The remote trailers.</value>
  24. public List<MediaUrl> RemoteTrailers { get; set; }
  25. /// <summary>
  26. /// Gets or sets the tags.
  27. /// </summary>
  28. /// <value>The tags.</value>
  29. public List<string> Tags { get; set; }
  30. public string PreferredMetadataLanguage { get; set; }
  31. /// <summary>
  32. /// Gets or sets the preferred metadata country code.
  33. /// </summary>
  34. /// <value>The preferred metadata country code.</value>
  35. public string PreferredMetadataCountryCode { get; set; }
  36. protected override bool GetBlockUnratedValue(UserConfiguration config)
  37. {
  38. return config.BlockUnratedMovies;
  39. }
  40. public override IEnumerable<BaseItem> GetChildren(User user, bool includeLinkedChildren)
  41. {
  42. var children = base.GetChildren(user, includeLinkedChildren);
  43. return LibraryManager.Sort(children, user, new[] { ItemSortBy.ProductionYear, ItemSortBy.PremiereDate, ItemSortBy.SortName }, SortOrder.Ascending);
  44. }
  45. }
  46. }