ItemLookupInfo.cs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. using MediaBrowser.Model.Entities;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace MediaBrowser.Controller.Providers
  5. {
  6. public class ItemLookupInfo : IHasProviderIds
  7. {
  8. /// <summary>
  9. /// Gets or sets the name.
  10. /// </summary>
  11. /// <value>The name.</value>
  12. public string Name { get; set; }
  13. /// <summary>
  14. /// Gets or sets the metadata language.
  15. /// </summary>
  16. /// <value>The metadata language.</value>
  17. public string MetadataLanguage { get; set; }
  18. /// <summary>
  19. /// Gets or sets the metadata country code.
  20. /// </summary>
  21. /// <value>The metadata country code.</value>
  22. public string MetadataCountryCode { get; set; }
  23. /// <summary>
  24. /// Gets or sets the provider ids.
  25. /// </summary>
  26. /// <value>The provider ids.</value>
  27. public Dictionary<string, string> ProviderIds { get; set; }
  28. /// <summary>
  29. /// Gets or sets the year.
  30. /// </summary>
  31. /// <value>The year.</value>
  32. public int? Year { get; set; }
  33. public int? IndexNumber { get; set; }
  34. public int? ParentIndexNumber { get; set; }
  35. public ItemLookupInfo()
  36. {
  37. ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
  38. }
  39. }
  40. public interface IHasLookupInfo<out TLookupInfoType>
  41. where TLookupInfoType : ItemLookupInfo, new()
  42. {
  43. TLookupInfoType GetLookupInfo();
  44. }
  45. public class ArtistInfo : ItemLookupInfo
  46. {
  47. public List<SongInfo> SongInfos { get; set; }
  48. public ArtistInfo()
  49. {
  50. SongInfos = new List<SongInfo>();
  51. }
  52. }
  53. public class AlbumInfo : ItemLookupInfo
  54. {
  55. /// <summary>
  56. /// Gets or sets the album artist.
  57. /// </summary>
  58. /// <value>The album artist.</value>
  59. public string AlbumArtist { get; set; }
  60. /// <summary>
  61. /// Gets or sets the artist provider ids.
  62. /// </summary>
  63. /// <value>The artist provider ids.</value>
  64. public Dictionary<string, string> ArtistProviderIds { get; set; }
  65. public List<SongInfo> SongInfos { get; set; }
  66. public AlbumInfo()
  67. {
  68. ArtistProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
  69. SongInfos = new List<SongInfo>();
  70. }
  71. }
  72. public class GameInfo : ItemLookupInfo
  73. {
  74. /// <summary>
  75. /// Gets or sets the game system.
  76. /// </summary>
  77. /// <value>The game system.</value>
  78. public string GameSystem { get; set; }
  79. }
  80. public class GameSystemInfo : ItemLookupInfo
  81. {
  82. /// <summary>
  83. /// Gets or sets the path.
  84. /// </summary>
  85. /// <value>The path.</value>
  86. public string Path { get; set; }
  87. }
  88. public class EpisodeInfo : ItemLookupInfo
  89. {
  90. public Dictionary<string, string> SeriesProviderIds { get; set; }
  91. public int? IndexNumberEnd { get; set; }
  92. public int? AnimeSeriesIndex { get; set; }
  93. public EpisodeInfo()
  94. {
  95. SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
  96. }
  97. }
  98. public class SongInfo : ItemLookupInfo
  99. {
  100. public string AlbumArtist { get; set; }
  101. public string Album { get; set; }
  102. public List<string> Artists { get; set; }
  103. }
  104. public class SeriesInfo : ItemLookupInfo
  105. {
  106. public int? AnimeSeriesIndex { get; set; }
  107. }
  108. public class PersonLookupInfo : ItemLookupInfo
  109. {
  110. }
  111. public class MovieInfo : ItemLookupInfo
  112. {
  113. }
  114. public class BoxSetInfo : ItemLookupInfo
  115. {
  116. }
  117. public class MusicVideoInfo : ItemLookupInfo
  118. {
  119. }
  120. public class TrailerInfo : ItemLookupInfo
  121. {
  122. public bool IsLocalTrailer { get; set; }
  123. }
  124. public class BookInfo : ItemLookupInfo
  125. {
  126. public string SeriesName { get; set; }
  127. }
  128. public class SeasonInfo : ItemLookupInfo
  129. {
  130. public Dictionary<string, string> SeriesProviderIds { get; set; }
  131. public int? AnimeSeriesIndex { get; set; }
  132. public SeasonInfo()
  133. {
  134. SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
  135. }
  136. }
  137. }