PHPackages                             detain/phlix-plugin-opensubtitles - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. detain/phlix-plugin-opensubtitles

ActivePhlix-plugin[API Development](/categories/api)

detain/phlix-plugin-opensubtitles
=================================

OpenSubtitles subtitle provider for Phlix — search and download subtitles for movies and TV shows via the OpenSubtitles REST API.

v0.2.0(1mo ago)01MITPHPPHP &gt;=8.3CI passing

Since Jul 9Pushed 3w agoCompare

[ Source](https://github.com/detain/phlix-plugin-opensubtitles)[ Packagist](https://packagist.org/packages/detain/phlix-plugin-opensubtitles)[ Docs](https://github.com/detain/phlix-plugin-opensubtitles)[ RSS](/packages/detain-phlix-plugin-opensubtitles/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (6)Versions (3)Used By (0)

phlix-plugin-opensubtitles
==========================

[](#phlix-plugin-opensubtitles)

[![tests](https://github.com/detain/phlix-plugin-opensubtitles/actions/workflows/test.yml/badge.svg)](https://github.com/detain/phlix-plugin-opensubtitles/actions/workflows/test.yml)

> OpenSubtitles **subtitle-provider** plugin for [Phlix](https://github.com/detain/phlix)— search and download subtitles for movies and TV shows via the OpenSubtitles REST API.

What it does
------------

[](#what-it-does)

This plugin integrates [OpenSubtitles](https://www.opensubtitles.com/) into the Phlix subtitle pipeline. It allows searching for subtitles by:

- **IMDB ID** — find subtitles for a specific movie/TV show
- **Filename** — extract media info from a filename and search matching subtitles
- **File hash** — match subtitles using the OpenSubtitles `moviehash` algorithm

Install
-------

[](#install)

The plugin is unsigned by design. Install via the Phlix admin UI:

1. Log in to your Phlix server as an admin user (`users.is_admin = 1`).
2. Browse to `/admin/plugins`.
3. Paste this URL into the **Install from URL** form and submit:

    ```
    https://raw.githubusercontent.com/detain/phlix-plugin-opensubtitles/main/plugin.json

    ```
4. Configure your OpenSubtitles API key in the plugin settings.

Configuration
-------------

[](#configuration)

Configure these in the Phlix admin **Plugins → Configure** dialog.

SettingRequiredSecretDefaultDescription`api_key`**Yes**yes—API key for your OpenSubtitles.com consumer (API application).`username`No——OpenSubtitles.com username. Raises download limits (VIP limits for VIP accounts).`password`Noyes—OpenSubtitles.com password. Only used with the username.`language`No—`en`Default subtitle language (ISO 639-1, e.g. en, es, fr).`format`No—`srt`Preferred subtitle format (srt, sub, ass, etc.).`priority`No—`10`Ranking weight for this subtitle source relative to others. Lower runs first (0 = highest priority); admins can override the effective order via the server subtitle-provider priority list.### Where to get your API key

[](#where-to-get-your-api-key)

Create a **consumer** (API application) on OpenSubtitles.com and copy its API key: [opensubtitles.com/en/consumers](https://www.opensubtitles.com/en/consumers). Providing your account `username`/`password` as well is optional but raises your download quota.

How it works
------------

[](#how-it-works)

The plugin implements the `Phlix\Shared\Plugin\LifecycleInterface`, `Phlix\Shared\Plugin\ConfigurableInterface`, and `Phlix\Shared\Subtitle\SubtitleSourceInterface` contracts and connects to the OpenSubtitles REST API v1:

1. **Login** — registers a user agent and obtains a session token
2. **Search** — queries subtitles by IMDB ID, filename, or `moviehash`
3. **Download** — fetches the subtitle file and feeds it into Phlix's subtitle pipeline

When the account's download quota is exhausted, `download()` throws `OpenSubtitlesQuotaExceededException` (a subclass of `OpenSubtitlesException`) so callers can stop retrying or fall back to another provider.

API
---

[](#api)

The OpenSubtitles REST API is documented at [opensubtitles.com](https://www.opensubtitles.com/).

License
-------

[](#license)

MIT — see [`LICENSE`](LICENSE).

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance94

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

48d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b1036e0717211b8030b83cbe729e8ba6ba442fdbd5285fb97a39d7dcfe339342?d=identicon)[detain](/maintainers/detain)

---

Top Contributors

[![detain](https://avatars.githubusercontent.com/u/1364504?v=4)](https://github.com/detain "detain (33 commits)")

---

Tags

accessibilitycaptionscomposer-packagedownloadembyforeign-audiojellyfinlibrarymedia-serveropensubtitlesphlixphlix-pluginphpplexsrtsrt-downloadsubtitle-providersubtitlessubtitlessrtcaptionsopensubtitlesphlixphlix-pluginsubtitle-provider

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/detain-phlix-plugin-opensubtitles/health.svg)

```
[![Health](https://phpackages.com/badges/detain-phlix-plugin-opensubtitles/health.svg)](https://phpackages.com/packages/detain-phlix-plugin-opensubtitles)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.9k556.2M21.6k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

762297.9k53](/packages/civicrm-civicrm-core)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
