PHPackages                             detain/phlix-plugin-trakt - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. detain/phlix-plugin-trakt

ActivePhlix-plugin[Authentication &amp; Authorization](/categories/authentication)

detain/phlix-plugin-trakt
=========================

Trakt scrobbler plugin for Phlix — scrobbles playback to Trakt.tv and syncs watch history over the Trakt OAuth API.

v1.2.0(1mo ago)16MITPHPPHP &gt;=8.3CI passing

Since Jul 10Pushed 1w agoCompare

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

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

phlix-plugin-trakt
==================

[](#phlix-plugin-trakt)

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

> Trakt scrobbler plugin for [Phlix](https://github.com/detain/phlix-server) — scrobbles playback to [Trakt.tv](https://trakt.tv) and syncs your watch history over the Trakt OAuth API.

Overview
--------

[](#overview)

Connects a Phlix server to your Trakt.tv account:

- **Scrobbles** playback (start / pause / stop) so Trakt shows what you're watching in real time and marks items watched at the end.
- **Two-way history sync** — pulls your Trakt watch history into Phlix and pushes Phlix completions back to Trakt on a configurable interval.
- Authenticates via **OAuth**, refreshing tokens automatically.

It subscribes to `phlix.playback.started`, `phlix.playback.paused`, `phlix.playback.resumed`, and `phlix.playback.stopped`.

Install
-------

[](#install)

From the Phlix admin **Plugins** section, paste this repo's URL:

```
https://github.com/detain/phlix-plugin-trakt

```

…or from the CLI:

```
php bin/phlix plugin:install https://github.com/detain/phlix-plugin-trakt
```

Settings
--------

[](#settings)

SettingTypeRequiredSecretTierDefaultDescription`enabled`booleanNoNo`standard``false`Master on/off for Trakt scrobbling and sync. Optional; default off.`username`stringNoNo`advanced``""`Display-only: the Trakt account Phlix is linked to (set during authorization).`access_token`stringNoYes`advanced``null`Obtained automatically when you authorize Phlix with Trakt — you do not enter this by hand. Create an [API app](https://app.trakt.tv/settings/apps/api/new) only if you self-host credentials.`refresh_token`stringNoYes`advanced``null`Set automatically during authorization; used to renew the access token. Not entered by hand.`expires_at`integerNoYes`advanced``null`Unix timestamp when the access token expires. Managed automatically.`sync_enabled`booleanNoNo`advanced``true`Sync watched state with Trakt. Optional; default on.`sync_interval_minutes`integerNoNo`advanced``30`How often to sync with Trakt. Optional; default 30.`scrobble_enabled`booleanNoNo`advanced``true`Report play/pause/stop to Trakt as you watch. Optional; default on.> **`access_token` / `refresh_token` / `expires_at` are set automatically via the Trakt authorization (OAuth) flow — you never enter them by hand.** Create an API application at  only if you self-host your own Trakt credentials.

Development
-----------

[](#development)

```
composer install
vendor/bin/phpunit
```

The entry class is `Phlix\Plugins\Scrobbler\Trakt\TraktPlugin` (implements `Phlix\Shared\Plugin\LifecycleInterface`). It runs inside a Phlix server host, which provides the playback/library services at runtime. Host-supplied classes (`Phlix\Auth\WatchHistory`, `Phlix\Common\Uuid`, `Workerman\MySQL\Connection`) are stubbed from `tests/bootstrap.php` so the unit suite runs standalone.

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance95

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.7% 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 (42 commits)")[![claude](https://avatars.githubusercontent.com/u/81847?v=4)](https://github.com/claude "claude (1 commits)")

---

Tags

composer-packageembyjellyfinmedia-serveroauthphlixphlix-pluginphpphp8plexscrobblerscrobblingtraktwatch-historytraktscrobblingscrobblerphlixphlix-pluginwatch-history

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k87.4M2.2k](/packages/symfony-symfony)[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)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

568591.1k63](/packages/ecotone-ecotone)[wikimedia/parsoid

Parsoid, a bidirectional parser between wikitext and HTML5

200569.1k3](/packages/wikimedia-parsoid)[kimai/kimai

Kimai - Time Tracking

4.8k9.4k1](/packages/kimai-kimai)

PHPackages © 2026

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