No description
  • Rust 63.8%
  • JavaScript 23.4%
  • HTML 7.7%
  • CSS 5%
  • Dockerfile 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daryl Newsholme e31d56b9a6
All checks were successful
Build and Publish Container / Run Tests (push) Successful in 22m55s
Build and Publish Container / Build & Push Container to Forgejo Packages (push) Successful in 16m15s
feat: improve duration and view offset handling in scrobble history and webhooks
2026-11-15 19:55:46 +00:00
.forgejo/workflows feat: add Forgejo build workflow and fix episode rewatch detection logic 2026-11-13 20:47:41 +00:00
.github/workflows ci: ignore wiki and docs changes in Docker build and UI test workflows 2026-10-31 21:38:32 +00:00
docs/screenshots fix: support base paths for cookies, enhance HTTPS detection, and add security headers 2026-11-04 22:32:36 +00:00
src feat: improve duration and view offset handling in scrobble history and webhooks 2026-11-15 19:55:46 +00:00
tests feat: improve duration and view offset handling in scrobble history and webhooks 2026-11-15 19:55:46 +00:00
web feat: improve duration and view offset handling in scrobble history and webhooks 2026-11-15 19:55:46 +00:00
wiki@c4e973e618 feat: add wiki git submodule 2026-10-31 17:12:53 +00:00
.dockerignore chore: add backup, data, docs, wiki, and yaml to .dockerignore 2026-10-31 21:42:24 +00:00
.env.example feat: add custom OIDC admin group configuration support 2026-10-29 22:52:38 +00:00
.gitignore fix(migrations): remove data modification queries from startup migrations and restore clean DDL 2026-11-02 23:41:08 +00:00
.gitmodules feat: add wiki git submodule 2026-10-31 17:12:53 +00:00
AGENTS.md feat: propagate ratings, tags, and notes across all watches of an item 2026-11-08 17:14:29 +00:00
build.rs feat: upgrade sqlx to 0.9.0 with SqlSafeStr query audit 2026-10-31 12:52:40 +00:00
Cargo.lock Implement performance optimizations: LTO release profile, SQLite pool PRAGMAs, HTTP compression, immutable asset caching, and shared HTTP client 2026-11-01 20:28:00 +00:00
Cargo.toml Implement performance optimizations: LTO release profile, SQLite pool PRAGMAs, HTTP compression, immutable asset caching, and shared HTTP client 2026-11-01 20:28:00 +00:00
docker-compose.yml feat: add custom OIDC admin group configuration support 2026-10-29 22:52:38 +00:00
Dockerfile feat: upgrade SQLite to latest 3.5.x release (3.54.1) 2026-10-31 12:43:31 +00:00
GitVersion.yml refactor: simplify GitVersion configuration and workflow settings 2026-10-31 00:52:23 +00:00
LICENSE docs: add project documentation, wiki, and GPL-3.0 license 2026-10-31 17:05:53 +00:00
README.md docs: add project documentation, wiki, and GPL-3.0 license 2026-10-31 17:05:53 +00:00
rust-toolchain.toml fix: add HTTPS-to-HTTP fallback and error hints for Radarr and Sonarr integrations 2026-10-31 00:17:09 +00:00

BingeSync

Rust SQLite Docker License: GPL-3.0

BingeSync is a lightweight, self-hosted media tracker, synchronization engine, and Trakt.tv alternative. It automatically captures playback from Plex, Jellyfin, and Emby webhooks into an embedded SQLite database (WAL mode) and delivers a high-performance web interface with interactive timelines, viewing analytics, duplicate watch pruning, ratings management, and bidirectional media server synchronization.


Screenshots

Interactive Timeline View Viewing Analytics & 7x24 Heatmap
Timeline View Statistics & Viewing Heatmap
Connected Services & Media Server Sync Admin Background Tasks & Monitoring
Connected Services Admin Background Tasks

Key Features

  • Plex, Jellyfin & Emby Webhooks: Captures playback start, pause, resume, progress, and completed scrobbles with configurable playback completion thresholds and account/UUID filtering.
  • Cross-Server Sync (Plex \leftrightarrow Jellyfin): Synchronizes watched status back to both Plex and Jellyfin servers automatically or on-demand, keeping disparate media servers in lockstep.
  • Multi-User Isolation: Strictly scoped watch histories, user settings, active sessions, and personal webhook tokens for every account.
  • Rating Threshold Filters: Filter watch history and timeline by minimum star rating thresholds (10/10, 9+ stars, 8+ stars down to 1+ star, rated, or unrated) combined with media type pills.
  • Duplicate Watch Detector & Cleanup: Group identical scrobbles within configurable time windows (1h to 72h) and prune redundant entries using Keep Oldest or Keep Newest strategies.
  • Custom Tags & Personal Review Notes: Annotate scrobbles with searchable tags (e.g. rewatch, imax, favorites) and personal review notes with one-click filter chips.
  • Timeline & History: Daily grouped watch logs with date scrubber, search across all history, batch selection and deletion, and rich filters for genres, directors, cinematographers, and actors.
  • Viewing Heatmap & Annual Review (Binge Wrapped): 7x24 weekly hourly viewing density heatmap matrix, top movies/shows charts, streaks, and an interactive annual "Binge Wrapped" review modal.
  • Metadata Enrichment & Poster Caching: Background enrichment of plot overviews, genres, cast, and crew using The Movie Database (TMDB) or TheTVDB (v4), with disk-based poster caching.
  • Trakt.tv & Tautulli Imports: Import watch history and ratings from Trakt export files (multi-file ZIP, JSON, CSV) or connected Tautulli instances with automatic deduplication.
  • Arr Library Cleanup: Cross-reference watched items against Radarr and Sonarr libraries to identify deletion candidates, calculate reclaimable disk space, and trigger media removal.
  • Automated Backups & Data Export: Point-in-time SQLite database backups with 7-day retention and pre-restore snapshots, plus one-click user data export to a clean ZIP archive (scrobbles CSV, JSON, and ratings).
  • Enterprise Authentication: OpenID Connect (OIDC) SSO with PKCE, OpenID Back-Channel Logout 1.0 for instant session termination upon access revocation, group role mapping, local dev login, and personal scoped API keys.
  • Single-Binary Delivery: Rust backend with embedded web assets (rust-embed) and zero external runtime dependencies.
  • Interactive API Documentation: Embedded OpenAPI 3.0 specification served at /api/v1/openapi.json and interactive Swagger UI at /docs.

Quick Start

Docker Compose

services:
  bingesync:
    image: bingesync:latest
    build: .
    container_name: bingesync
    restart: unless-stopped
    ports:
      - "8080:8080"
    environment:
      - HOST=0.0.0.0
      - PORT=8080
      - APP_URL=http://localhost:8080
      - DATABASE_URL=sqlite:///data/bingesync.db?mode=rwc
      - JWT_SECRET=change-this-to-a-random-secret
      - DEV_LOGIN_ENABLED=true
    volumes:
      - bingesync_data:/data
      - bingesync_backups:/backup

volumes:
  bingesync_data:
    driver: local
  bingesync_backups:
    driver: local

Start the container:

docker compose up -d

Access the web interface at http://localhost:8080.


Cross-Server Sync: Plex \leftrightarrow Jellyfin

Many home media enthusiasts run both a Plex Media Server and a Jellyfin (or Emby) instance simultaneously. Keeping watch history in sync between the two has traditionally required complex external scripts. BingeSync solves this natively as a lightweight central hub:

                  ┌────────────────────────┐
                  │       BingeSync        │
                  │   (SQLite Central Hub) │
                  └──────┬──────────┬──────┘
       Plex Webhook      │          │      Jellyfin Webhook
     (Media Watched)     ▼          ▼     (Media Watched)
  ┌────────────────────────┐      ┌────────────────────────┐
  │   Plex Media Server    │      │  Jellyfin Media Server │
  │   (Automatic Writeback)│◄────►│  (Automatic Writeback) │
  └────────────────────────┘      └────────────────────────┘
  1. Automatic Bi-directional Writeback: Watch on Plex \rightarrow BingeSync marks the item played on Jellyfin. Watch on Jellyfin \rightarrow BingeSync marks it watched on Plex (/:/scrobble).
  2. Per-Service Controls: Enable watch history sync independently for Plex, Jellyfin, or both under User Settings \rightarrow Connected Services.
  3. Scheduled & On-Demand Sync: An integrated background worker runs every 4 hours to catch up on offline watches, with manual on-demand triggers available anytime.

Documentation & Wiki Guides

Detailed setup instructions, configuration references, and troubleshooting guides are available in the BingeSync Wiki:

  • Setup & Configuration Guide: Reverse proxy configs (Nginx, Caddy, Traefik, subpath /bingesync), complete environment variables table, and first-run wizard.
  • Media Server Webhooks & Sync Guide: Step-by-step guides for Plex, Jellyfin, and Emby webhooks, token extraction, and Tautulli continuous sync.
  • Authentication & OIDC Guide: SSO provider setup (Authentik, Keycloak, Authelia, Google, Okta), OIDC Back-Channel Logout, and scoped API keys.
  • Integrations & Power Tools: Radarr/Sonarr library cleanup, Trakt/Tautulli imports, duplicate detector, and outbound webhooks (Discord, Telegram, ntfy, Gotify).
  • Troubleshooting Guide: Resolving webhook username mismatches, SQLite database lock contention, cookie security flags, and inspecting live diagnostic logs.

REST API

Interactive Swagger documentation is available at /docs (or /swagger). The OpenAPI 3.0 specification is served at /api/v1/openapi.json.


Development and Testing

# 1. Build frontend
cd web && npm run build && cd ..

# 2. Run backend
cargo run

# 3. Run backend integration tests (62 tests)
cargo test

# 4. Run Playwright browser E2E tests (46 tests)
cd web && npx playwright test

Attributions


License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0). Any software or project that incorporates or uses BingeSync must also be open source under the GPL-3.0. See the LICENSE file for the full license text.