config.js 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. class Config{
  2. constructor() {
  3. //媒体库id,用逗号分隔。进入媒体库后url里的parentId
  4. //this.parentId = "";
  5. this.parentId = "4,12369,19045,19047";
  6. //滚屏间隔 ms
  7. this.interval = 8000;
  8. //是否开启随机
  9. this.random = true;
  10. this.itemQuery={
  11. //返回横幅的最大数量,注意每10个为一轮,一轮不足10个的会被舍弃。例如27则只显示两轮20个
  12. Limit : 20,//(integer) Optional. The maximum number of records to return
  13. //一般只需要关注上面几个配置,下面不了解的不需要修改
  14. /*-------------------------------------------------------------------------------------------------------------------------------*/
  15. Recursive : true,//(boolean) When searching within folders, this determines whether or not the search will be recursive. true/false
  16. SortOrder : "Descending",//(string) Sort Order - Ascending,Descending
  17. Fields : "ProductionYear",//(string) Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines
  18. EnableUserData : "",//(boolean) Optional, include user data
  19. ImageTypeLimit : 1,//(integer) Optional, the max number of images to return, per image type
  20. Fields : "ProductionYear",//(string) Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines
  21. IncludeItemTypes : "Movie,Series",//(string) Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimeted.
  22. ImageTypes : "Backdrop",//(string) Optional. If specified, results will be filtered based on those containing image types. This allows multiple, comma delimited.
  23. EnableImageTypes : "Logo,Backdrop",//(string) Optional. The image types to include in the output.
  24. SortBy : "ProductionYear, PremiereDate, SortName",//(string) Optional. Specify one or more sort orders, comma delimeted. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime
  25. ArtistType : "",//(string) Artist or AlbumArtist
  26. MaxOfficialRating : "",//(string) Optional filter by maximum official rating (PG, PG-13, TV-MA, etc).
  27. HasThemeSong : "",//(boolean) Optional filter by items with theme songs.
  28. HasThemeVideo : "",//(boolean) Optional filter by items with theme videos.
  29. HasSubtitles : "",//(boolean) Optional filter by items with subtitles.
  30. HasSpecialFeature : "",//(boolean) Optional filter by items with special features.
  31. HasTrailer : "",//(boolean) Optional filter by items with trailers.
  32. AdjacentTo : "",//(string) Optional. Return items that are siblings of a supplied item.
  33. MinIndexNumber : "",//(integer) Optional filter by minimum index number.
  34. MaxPlayers : "",//(integer) Optional filter by minimum number of game players.
  35. ParentIndexNumber : "",//(integer) Optional filter by parent index number.
  36. HasParentalRating : "",//(integer) Optional filter by items that have or do not have a parental rating
  37. IsHD : "",//(boolean) Optional filter by items that are HD or not.
  38. LocationTypes : "",//(string) Optional. If specified, results will be filtered based on LocationType. This allows multiple, comma delimeted.
  39. ExcludeLocationTypes : "",//(string) Optional. If specified, results will be filtered based on LocationType. This allows multiple, comma delimeted.
  40. IsMissing : "",//(boolean) Optional filter by items that are missing episodes or not.
  41. IsUnaired : "",//(boolean) Optional filter by items that are unaired episodes or not.
  42. MinCommunityRating : "",//(number) Optional filter by minimum community rating.
  43. MinCriticRating : "",//(number) Optional filter by minimum critic rating.
  44. AiredDuringSeason : "",//(integer) Gets all episodes that aired during a season, including specials.
  45. MinPremiereDate : "",//(string) Optional. The minimum premiere date. Format = ISO
  46. MinDateLastSaved : "",//(string) Optional. The minimum premiere date. Format = ISO
  47. MinDateLastSavedForUser : "",//(string) Optional. The minimum premiere date. Format = ISO
  48. MaxPremiereDate : "",//(string) Optional. The maximum premiere date. Format = ISO
  49. HasOverview : "",//(boolean) Optional filter by items that have an overview or not.
  50. HasImdbId : "",//(boolean) Optional filter by items that have an imdb id or not.
  51. HasTmdbId : "",//(boolean) Optional filter by items that have a tmdb id or not.
  52. HasTvdbId : "",//(boolean) Optional filter by items that have a tvdb id or not.
  53. ExcludeItemIds : "",//(string) Optional. If specified, results will be filtered by exxcluding item ids. This allows multiple, comma delimeted.
  54. StartIndex : "",//(integer) Optional. The record index to start at. All items with a lower index will be dropped from the results.
  55. ExcludeItemTypes : "",//(string) Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimeted.
  56. AnyProviderIdEquals : "",//(string) Optional. If specified, result will be filtered to contain only items which match at least one of the specified IDs. Each provider ID must be in the form 'prov.id', e.g. 'imdb.tt123456'. This allows multiple, comma delimeted value pairs.
  57. Filters : "",//(string) Optional. Specify additional filters to apply. This allows multiple, comma delimeted. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes
  58. IsFavorite : "",//(boolean) Optional filter by items that are marked as favorite, or not.
  59. IsMovie : "",//(boolean) Optional filter for movies.
  60. IsSeries : "",//(boolean) Optional filter for movies.
  61. IsNews : "",//(boolean) Optional filter for news.
  62. IsKids : "",//(boolean) Optional filter for kids.
  63. IsSports : "",//(boolean) Optional filter for sports.
  64. MediaTypes : "",//(string) Optional filter by MediaType. Allows multiple, comma delimited.
  65. IsPlayed : "",//(string) Optional filter by items that are played, or not.
  66. Genres : "",//(string) Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimeted.
  67. OfficialRatings : "",//(string) Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimeted.
  68. Tags : "",//(string) Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimeted.
  69. Years : "",//(string) Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimeted.
  70. EnableImages : "",//(boolean) Optional, include image information in output
  71. Person : "",//(string) Optional. If specified, results will be filtered to include only those containing the specified person.
  72. PersonIds : "",//(string) Optional. If specified, results will be filtered to include only those containing the specified person.
  73. PersonTypes : "",//(string) Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited
  74. Studios : "",//(string) Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimeted.
  75. StudioIds : "",//(string) Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimeted.
  76. Artists : "",//(string) Optional. If specified, results will be filtered based on artist. This allows multiple, pipe delimeted.
  77. ArtistIds : "",//(string) Optional. If specified, results will be filtered based on artist. This allows multiple, pipe delimeted.
  78. Albums : "",//(string) Optional. If specified, results will be filtered based on album. This allows multiple, pipe delimeted.
  79. Ids : "",//(string) Optional. If specific items are needed, specify a list of item id's to retrieve. This allows multiple, comma delimited.
  80. VideoTypes : "",//(string) Optional filter by VideoType (videofile, dvd, bluray, iso). Allows multiple, comma delimeted.
  81. Containers : "",//(string) Optional filter by Container. Allows multiple, comma delimeted.
  82. AudioCodecs : "",//(string) Optional filter by AudioCodec. Allows multiple, comma delimeted.
  83. VideoCodecs : "",//(string) Optional filter by VideoCodec. Allows multiple, comma delimeted.
  84. SubtitleCodecs : "",//(string) Optional filter by SubtitleCodec. Allows multiple, comma delimeted.
  85. Path : "",//(string) Optional filter by Path.
  86. UserId : "",//(string) User Id
  87. MinOfficialRating : "",//(string) Optional filter by minimum official rating (PG, PG-13, TV-MA, etc).
  88. IsLocked : "",//(string) Optional filter by items that are locked.
  89. IsPlaceHolder : "",//(boolean) Optional filter by items that are placeholders
  90. HasOfficialRating : "",//(boolean) Optional filter by items that have official ratings
  91. GroupItemsIntoCollections : "",//(boolean) Whether or not to hide items behind their boxsets.
  92. Is3D : "",//(boolean) Whether or not to hide items behind their boxsets.
  93. SeriesStatus : "",//(string) Optional filter by Series Status. Allows multiple, comma delimeted.
  94. NameStartsWithOrGreater : "",//(string) Optional filter by items whose name is sorted equally or greater than a given input string.
  95. NameStartsWith : "",//(string) Optional filter by items whose name is sorted equally than a given input string.
  96. NameLessThan : ""//(string) Optional filter by items whose name is equally or lesser than a given input string.
  97. }
  98. Object.getOwnPropertyNames(this.itemQuery).forEach(key => {
  99. if(this.itemQuery[key]==""){
  100. delete this.itemQuery[key];
  101. }
  102. })
  103. this.parentIds = this.parentId.split(',');
  104. }
  105. }