diff --git a/Jellyfin.Plugin.Danmu/Scrapers/Dandan/DandanApi.cs b/Jellyfin.Plugin.Danmu/Scrapers/Dandan/DandanApi.cs index 4c105d6..245fc64 100644 --- a/Jellyfin.Plugin.Danmu/Scrapers/Dandan/DandanApi.cs +++ b/Jellyfin.Plugin.Danmu/Scrapers/Dandan/DandanApi.cs @@ -80,7 +80,7 @@ public class DandanApi : AbstractApi } var cacheKey = $"search_{keyword}"; - var expiredOption = new MemoryCacheEntryOptions() { AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5) }; + var expiredOption = new MemoryCacheEntryOptions() { AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(30) }; if (_memoryCache.TryGetValue>(cacheKey, out var searchResult)) { return searchResult; @@ -219,6 +219,8 @@ public class DandanApi : AbstractApi throw new ArgumentNullException(nameof(epId)); } + this.LimitRequestFrequently(); + var withRelated = this.Config.WithRelatedDanmu ? "true" : "false"; var chConvert = this.Config.ChConvert; var url = $"https://api.dandanplay.net/api/v2/comment/{epId}?withRelated={withRelated}&chConvert={chConvert}";