OMDb metadata provider for Phlix — IMDb/RT/Metascore ratings aggregation for movies and TV.
Queries the OMDb API to enrich Phlix media items with
IMDb ID, Rotten Tomatoes critic rating, and Metascore ratings. Ratings are
returned under the valid metadata_ratings.source ENUM values (imdb, rt);
the host resolver owns writing them and Phlix's rating aggregation.
- IMDb ID resolution — search by title + year to resolve the canonical IMDb ID
- Multi-source ratings — captures IMDb and Rotten Tomatoes scores (Metascore is dropped — no valid
metadata_ratings.sourceENUM member) - Non-blocking HTTP — async HTTPS-only client compatible with Workerman's event loop
- Rate limiting — configurable request throttling to respect OMDb API limits
- Response caching — configurable in-memory cache TTL to reduce API calls
- TLS verification toggle — option to disable SSL verification for self-hosted proxies
- Pure read —
getDetails()fetches and shapes data only;onEnable()does no network or DB I/O and never throws on a missing key
The plugin is unsigned by design — install via the Phlix admin UI:
-
Log in to your Phlix server as an admin user (
users.is_admin = 1). -
Browse to
/admin/plugins. -
Paste this URL into the Install from URL form and submit:
https://raw.githubusercontent.com/detain/phlix-plugin-omdb/main/plugin.json -
The server downloads the manifest, validates it, runs
composer install --no-dev, and stores a row in thepluginstable. The plugin lands disabled by default. -
Flip the toggle in the table to enable it.
-
Enter your OMDb API key in the plugin settings (get one at https://www.omdbapi.com/apikey.aspx).
| Setting | Type | Required | Secret | Tier | Default | Description |
|---|---|---|---|---|---|---|
enabled |
boolean | No | No | standard |
false |
Master on/off for OMDb rating enrichment. Optional; default off. |
api_key |
string | Yes | Yes | standard |
null |
Your OMDb API key. The free tier allows 1,000 requests/day. |
use_ssl_verification |
boolean | No | No | advanced |
true |
Verify OMDb's TLS certificate. Optional; default on. Leave on unless debugging. |
cache_ttl_seconds |
integer | No | No | advanced |
86400 |
How long to cache OMDb responses. Optional; default 86400 (24 hours). |
The api_key setting is required. Request a free key at
https://www.omdbapi.com/apikey.aspx — the free tier allows 1,000 requests/day.
When enabled, the plugin registers as a MetadataSourceInterface provider. When
the Phlix metadata manager requests details for a media item:
- The plugin receives the search query (title + optional year)
- It queries OMDb's search endpoint to find matching entries
- It fetches full details including ratings for the selected IMDb ID
- Ratings are returned as a
ratingslist using themetadata_ratings.sourceENUM values (imdb,rt) for the host resolver to persist and aggregate
movieseries
composer install
vendor/bin/phpunit
vendor/bin/phpstan analyse src --level=9
vendor/bin/phpcs src --standard=PSR12MIT — see LICENSE.