feat: integrate AIOratings as a poster service#726
feat: integrate AIOratings as a poster service#726nippe3r wants to merge 1 commit intoViren070:mainfrom
Conversation
Add AIOratings alongside RPDB and Top Poster as a selectable poster service. AIOratings supports custom poster profiles with configurable rating overlays via imdb and tmdb IDs (with series→tv conversion and tvdb fallback through AnimeDatabase).
WalkthroughThis PR introduces support for a new AIOratings poster service across the codebase, extending database schemas, implementing the service backend with validation and caching, updating configuration surfaces, and providing frontend UI and server API routes for poster discovery. Changes
Sequence DiagramsequenceDiagram
actor User
participant Frontend
participant Server as Server API<br/>/aioratings
participant AIOratings as AIOratings<br/>Service
participant Cache as Cache Layer
participant AIOratingsAPI as AIOratings<br/>External API
User->>Frontend: Request poster for<br/>type & id
Frontend->>Server: GET /api/v1/aioratings<br/>(id, type, apiKey)
Server->>Server: Validate input params
Server->>AIOratings: new AIOratings(apiKey,<br/>profileId)
Server->>AIOratings: getPosterUrl(type, id)
AIOratings->>Cache: Check cached result<br/>for key
alt Cache Hit
Cache-->>AIOratings: Return cached URL
else Cache Miss
AIOratings->>AIOratings: Parse id to<br/>idType & idValue
AIOratings->>AIOratingsAPI: HEAD /api/{apiKey}/...<br/>{idType}/{profileId}/{idValue}.jpg
AIOratingsAPI-->>AIOratings: 200 OK / 404 Not Found
AIOratings->>Cache: Store result<br/>(24h TTL)
end
AIOratings-->>Server: Return poster URL<br/>or null
alt Poster Found
Server->>User: HTTP 301 Redirect<br/>to poster URL
else Poster Not Found
Server->>User: HTTP 404 with<br/>error response
end
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly Related PRs
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Comment |
Add AIOratings alongside RPDB and Top Poster as a selectable poster service. AIOratings supports custom poster profiles with configurable rating overlays via imdb and tmdb IDs (with series→tv conversion and tvdb fallback through AnimeDatabase).
Summary by CodeRabbit
Release Notes