Studio.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. namespace MediaBrowser.Controller.Entities
  5. {
  6. /// <summary>
  7. /// Class Studio
  8. /// </summary>
  9. public class Studio : BaseItem, IItemByName
  10. {
  11. /// <summary>
  12. /// Gets the user data key.
  13. /// </summary>
  14. /// <returns>System.String.</returns>
  15. public override string GetUserDataKey()
  16. {
  17. return "Studio-" + Name;
  18. }
  19. /// <summary>
  20. /// Returns the folder containing the item.
  21. /// If the item is a folder, it returns the folder itself
  22. /// </summary>
  23. /// <value>The containing folder path.</value>
  24. public override string ContainingFolderPath
  25. {
  26. get
  27. {
  28. return Path;
  29. }
  30. }
  31. /// <summary>
  32. /// Gets a value indicating whether this instance is owned item.
  33. /// </summary>
  34. /// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value>
  35. public override bool IsOwnedItem
  36. {
  37. get
  38. {
  39. return false;
  40. }
  41. }
  42. public IEnumerable<BaseItem> GetTaggedItems(IEnumerable<BaseItem> inputItems)
  43. {
  44. return inputItems.Where(i => i.Studios.Contains(Name, StringComparer.OrdinalIgnoreCase));
  45. }
  46. }
  47. }