A autoscrobbler that uses a Plex webhook to scrobble directly to Rocksky on ATProtocol!
- JavaScript 51.3%
- HTML 46.6%
- Dockerfile 1.4%
- Shell 0.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| public | ||
| scripts | ||
| src | ||
| test | ||
| .dockerignore | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| docker-compose.yml | ||
| docker-entrypoint.sh | ||
| Dockerfile | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
PlexRockskyScrobbler
An autoscrobbler that uses a Plex webhook to scrobble directly to Rocksky on ATProtocol, using the official Rocksky CLI. Web portal is on port 9033 that does this shit:
- copy the webhook URL to paste into Plex
- check your Rocksky login and see how to use the Rocksky CLI inside the container
- watch what is playing on Plex right now
- browse the status and history of every scrobble (with the CLI output, and Retry for failures)
- see every raw webhook Plex sends, including the ones that are ignored (I might actually remove this idk, its proof of concept)
- send a test scrobble
- connect a ListenBrainz account and import your listens from any date up to now (shoutout ip blocks fr)
Setup
- git pull this repo!
- do
docker compose up -d --build - Login to the portal at
<ip or FQDN of your docker host>:9033a. You can set up a username/password but this is flimsy. I strongly recommend NOT exposing this to the open internet as it can contain an app password for your ATProtocol account. Tread carefully and with intent, netizen.
If you need to pull a code update, just git pull and do docker compose up -d --build and it'll refresh it. All of your scrobbles that failed will retry when the application resets.
API
The portal uses a small JSON API you can script against (POST requests need Content-Type: application/json):
| Method | Path | |
|---|---|---|
POST |
/plex/webhook?token=… |
Plex webhook receiver |
GET |
/api/status |
Config summary, login check, queue, now playing, counts |
GET |
/api/history?limit=&offset=&status= |
Scrobble history |
POST |
/api/history/:id/retry |
Retry a scrobble |
DELETE |
/api/history |
Clear the portal history (nothing is removed from Rocksky) |
GET |
/api/events |
Raw webhook log |
POST |
/api/check-credentials |
Log in to your PDS with the app password |
POST |
/api/test-scrobble |
{ "title", "artist", "album", "dryRun" } |
GET |
/api/listenbrainz |
Connection status, import jobs and the latest job |
POST |
/api/listenbrainz/connect |
{ "username", "token" } |
POST |
/api/listenbrainz/disconnect |
Forget the saved token |
POST |
/api/listenbrainz/import |
{ "from", "to", "dryRun" } (ISO dates, to optional) |
POST |
/api/listenbrainz/import/:id/cancel |
Stop an import, keeping its checkpoint |
POST |
/api/listenbrainz/import/:id/resume |
Resume an import |
GET |
/healthz |
Health check |
Running without Docker
Requires Node 20+ and the Rocksky CLI (npm install -g @rocksky/cli).
npm install
ROCKSKY_HANDLE=you.bsky.social ROCKSKY_PASSWORD=xxxx-xxxx-xxxx-xxxx DATA_DIR=./data npm start
npm test