CrossWatch Documentation

repository·main·Indexed 20 days ago

https://github.com/cenodude/crosswatch

A synchronization engine that centralizes media metadata, including watchlists, ratings, and history, across multiple media servers (Plex, Jellyfin, Emby) and tracking services (Trakt, AniList, SIMKL, MDBList, and others). It features a local web UI for managing sync pairs, profiles, and scrobbling routes via Watchers and webhooks, as well as data safety tools like snapshots and an analyzer for inconsistent records.

Tokens
2.2K
Snippets
6
Records
12
Agent score
64%

What's inside CrossWatch

  1. Overview of CrossWatch (CW)

    main

    CrossWatch (CW) is a synchronization engine designed to keep multiple media platforms in sync. It acts as a central 'brain' for your media metadata, allowing you to manage watchlists, ratings, history, and playback progress across various providers.

    Key Capabilities

    • Synchronization: Syncs Watchlists, Ratings, History, and Progress across supported providers.
    • Multi-Provider Support: Works with Plex, Jellyfin, Emby, SIMKL, Floppy, Trakt, AniList, TMDb, MDBList, PublicMetaDB, Tautulli, Kodi, Nuvio, Stremio, and the CW local tracker.
    • Scrobbling: Tracks activity via a Watcher (Plex/Emby/Jellyfin/Kodi to Trakt/SIMKL/MDBList/Floppy/CW) or via Webhooks (Plex/Emby/Jellyfin to Trakt/SIMKL/MDBList).
    • Profiles: Manage separate sync setups for different users or media servers.
    • Data Safety: The CW Tracker maintains snapshots and backups of your media server and tracker data.

    Built-in Tools

    • Analyzer: Identifies items that are stuck or inconsistent between providers.
    • Playback Progress Manager: View and edit unfinished playback sessions.
    • Editor: Inspect, adjust, add, or block items.
    • Events Viewer: Search and inspect sync run history.
    • Captures: A rollback tool for provider watchlists, ratings, and history.
  2. Overview of CrossWatch

    main

    CrossWatch (CW) is a media sync hub designed to keep media servers, media clients, and trackers synchronized through a single local web UI. It acts as a control room for your media state, allowing you to manage accounts, profiles, sync pairs, schedules, snapshots, scrobbling routes, and repair tools.

    Key Features:

    • Sync: Aligns watchlists, ratings, history, and playback progress across providers.
    • Hub: Supports multiple profiles to separate sync setups for different users or servers.
    • Live (Watcher & Webhooks): Routes play events from Plex, Emby, Jellyfin, and Kodi to trackers like Trakt, SIMKL, or MDBList. Webhooks support Plex, Emby, and Jellyfin without requiring premium passes.
    • Safe: Provides snapshots and captures to compare changes and restore data.
    • Tools: Includes an analyzer, editor, and event inspector to manage records and clean up provider state.
    • Anime Support: Uses AniBridge for clean anime ID mapping across providers.
  3. The CrossWatch Workflow

    main

    Setting up CrossWatch follows a four-step process:

    1. Connect: Add your media servers, trackers, and metadata providers.
    2. Pair: Define which data (watchlists, ratings, etc.) should move between specific providers.
    3. Automate: Execute syncs manually, set up scheduled jobs, or trigger them automatically using the Watcher or webhooks.
    4. Review: Monitor your setup using statistics, events, captures, and built-in repair tools.
  4. Run CrossWatch as a Docker Container

    main

    You can run CrossWatch as a standalone container. The container exposes its web UI on port 8787 by default. Ensure you map a volume to /config to persist your configuration.

    docker run -d \
      --name crosswatch \
      -p 8787:8787 \
      -v crosswatch_config:/config \
      -e TZ=Europe/Amsterdam \
      --restart unless-stopped \
      ghcr.io/cenodude/crosswatch:latest
  5. Install CrossWatch via Docker

    main

    The recommended way to run CrossWatch is via Docker. The web UI is exposed at http://localhost:8787. It is highly recommended to use a Docker volume to persist your configuration so you can update the image without losing data.

    Use the following command to start the container:

    docker run -d \
      --name crosswatch \
      -p 8787:8787 \
      -v crosswatch_config:/config \
      -e TZ=Europe/Amsterdam \
      --restart unless-stopped \
      ghcr.io/cenodude/crosswatch:latest
  6. Deploy CrossWatch using Docker Compose

    main

    Use the following docker-compose.yml configuration to deploy CrossWatch. This setup includes a named volume crosswatch_config for persistent storage and sets the timezone via the TZ environment variable.

    services:
      crosswatch:
        image: ghcr.io/cenodude/crosswatch:latest
        container_name: crosswatch
        ports:
          - "8787:8787"
        environment:
          TZ: Europe/Amsterdam
        volumes:
          - type: volume
            source: crosswatch_config
            target: /config
        restart: unless-stopped
    
    volumes:
      crosswatch_config:
  7. Supported Media Providers and Trackers

    main

    CrossWatch supports a wide range of media servers, clients, and trackers:

    Media Servers:

    • Emby
    • Jellyfin
    • Plex

    Media Clients:

    • Kodi
    • Nuvio
    • Stremio

    Trackers & Metadata:

    • AniList (with AniBridge support)
    • CrossWatch (Local tracker)
    • Floppy
    • MDBList
    • PublicMetaDB
    • SIMKL
    • Tautulli
    • TMDb (Tracker and metadata)
    • Trakt
  8. Mount the raw editor modal component

    main

    Use the mount function to render the raw editor modal, which displays a flattened view of an item's fields alongside its raw JSON representation. This is useful for inspecting the data structure of items in CrossWatch.

    Parameters

    • shell: The DOM element (container) where the modal should be rendered.
    • props: An object containing the data to display:
      • item (Object): The data object to inspect. If null or not an object, an empty state is shown.
      • title (String): The title displayed in the modal header. Defaults to item.title, item.series_title, or props.key.
      • source (String): Determines the source label. 'tracker' becomes Local Tracker, 'state' becomes Current State, otherwise defaults to Editor.
      • kind (String): An optional label displayed next to the source (e.g., Source - Kind).
      • key (String): An optional identifier displayed as a chip in the metadata section.
      • origin (String): An optional origin identifier displayed as a chip.

    Behavior

    • The component automatically handles HTML escaping for security.
    • It includes a 'Copy JSON' button that uses the navigator.clipboard API.
    • The close button triggers window.cxCloseModal() when clicked.
    import { mount } from './path/to/assets/js/modals/editor-raw/index.js';
    
    const shell = document.getElementById('modal-container');
    const props = {
      item: { id: 1, name: 'Test Item', metadata: { color: 'blue' } },
      title: 'My Item',
      source: 'tracker',
      kind: 'debug',
      key: 'item_001'
    };
    
    await mount(shell, props);
  9. Initialize and run a Plex watcher with TraktSink

    main

    To run CrossWatch as a service that scrobble Plex watch history to Trakt, use make_default_watch passing an instance of TraktSink. The resulting watcher object must be started with .start() and stopped with .stop() to manage the lifecycle of the scrobbling process.

    from providers.scrobble.plex.watch import make_default_watch
    from providers.scrobble.trakt.sink import TraktSink
    
    # Initialize the watcher with Trakt as the destination sink
    watcher = make_default_watch([TraktSink()])
    
    try:
        watcher.start()
        # Keep the process alive
        while True:
            import time
            time.sleep(1)
    except KeyboardInterrupt:
        pass
    finally:
        watcher.stop()
  10. Configure Crosswatch environment variables

    main

    When running Crosswatch via Docker Compose, you can use the following environment variables to customize the deployment:

    VariableDefault ValueDescription
    CROSSWATCH_PORT8787The port on the host machine that will map to the container's port 8787
    TZEurope/AmsterdamThe timezone for the container

    Note: The container's internal port is fixed at 8787.