mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-12 16:26:36 +08:00
fix: auto-scan cloud libraries on boot + allow CORS for media playback
- Add BootCloudLibraries() to auto-scan all cloud libraries on startup - Delay 3s to avoid conflict with system init, scan without auto-scrape - Enable CORS for /api/cloud/play/* and /api/img to support 3rd-party players - Fixes issue where each user triggers separate cloud library scans - Fixes issue where Infuse/Emby apps cannot play cloud resources
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
//
|
||||
// We implement the minimal subset needed to enrich anime libraries:
|
||||
//
|
||||
// GET /search/subject/{keywords}?type=2&responseGroup=small
|
||||
// GET /v0/subjects/{id} (cover)
|
||||
// GET /search/subject/{keywords}?type=2&responseGroup=small
|
||||
// GET /v0/subjects/{id} (cover)
|
||||
//
|
||||
// The provider gracefully no-ops when bangumi_access_token is empty.
|
||||
package service
|
||||
@@ -100,7 +100,7 @@ func (b *BangumiProvider) Search(ctx context.Context, query string) (*Match, err
|
||||
Rating: r.Rating.Score,
|
||||
}
|
||||
if len(r.Air) >= 4 {
|
||||
fmt.Sscanf(r.Air[:4], "%d", &m.Year)
|
||||
_, _ = fmt.Sscanf(r.Air[:4], "%d", &m.Year)
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user