fix media workflows and download organization

This commit is contained in:
ShukeBta
2026-06-26 08:42:16 +08:00
parent 0da96f7e4e
commit 65adca04df
102 changed files with 4063 additions and 437 deletions
+3 -1
View File
@@ -18,6 +18,8 @@ const (
mteamAPIEndpointSearch = "torrent_search"
mteamAPIEndpointDetail = "torrent_detail"
mteamAPIEndpointDownload = "torrent_download"
mteamAPISearchDailyLimit = 1500
)
type siteAPIRateLimit struct {
@@ -165,7 +167,7 @@ func reserveMTeamAPIQuota(ctx context.Context, cfg SiteConfig, endpoint string)
func mteamAPIRateLimits(endpoint string) []siteAPIRateLimit {
switch endpoint {
case mteamAPIEndpointSearch:
return []siteAPIRateLimit{{Bucket: "torrent_search_24h", Limit: 1000, Window: 24 * time.Hour}}
return []siteAPIRateLimit{{Bucket: "torrent_search_24h", Limit: mteamAPISearchDailyLimit, Window: 24 * time.Hour}}
case mteamAPIEndpointDetail:
return []siteAPIRateLimit{{Bucket: "torrent_detail_1h", Limit: 100, Window: time.Hour}}
case mteamAPIEndpointDownload: