# Sink

These pages document scrobble **sinks**.

Sinks send normalized playback events to trackers.

{% tabs %}
{% tab title="End users" %}
{% hint style="info" %}
If you want setup steps, use [Watcher](/crosswatch/scrobble/watcher.md).
{% endhint %}

### Supported sinks

* [Sink: Trakt](/blueprint-architecture/scrobble/sink/sink-trakt.md)
* [Sink: SIMKL](/blueprint-architecture/scrobble/sink/sink-simkl.md)
* [Sink: MDBList](/blueprint-architecture/scrobble/sink/sink-mdblist.md)

### How sinks are used

1. A watch provider emits a `ScrobbleEvent`.
2. The dispatcher filters and dedupes it.
3. Each sink gets `send(event)`.

Sinks should stay policy-free.

The dispatcher owns filtering decisions.

### Configuration touchpoints

User-facing config lives in **Settings → Scrobble**.

In `config.json`, selection typically uses:

* `scrobble.mode` (`watch` or `webhook`)
* `scrobble.watch.sink` (Watcher mode)

Reference: [Configuration (config.json)](/crosswatch/configuration-config-json.md).

### Common failure modes

**Auth failures**

Fix auth in **Settings → Authentication**.

Then restart scrobbling.

**Matching failures**

Missing external IDs cause “skip” behavior.

Fix metadata on the media server.

**Rate limits**

You may see gaps during API outages.

Events resume on the next playback changes.
{% endtab %}

{% tab title="Power users" %}

### Contract

Sinks implement a small interface:

* accept a `ScrobbleEvent`
* translate it into tracker-specific API calls
* return status and log details

### Code map

* Trakt: `providers/scrobble/trakt/sink.py`
* SIMKL: `providers/scrobble/simkl/sink.py`
* MDBList: `providers/scrobble/mdblist/sink.py`

### Config touchpoints

Common keys:

* `scrobble.*`
* `<sink>.*` (`trakt.*`, `simkl.*`, `mdblist.*`)

### State files

Sinks are mostly stateless.

They may interact with:

* `/config/.cw_state/currently_watching.json`
* `/config/.cw_state/watchlist_wl_autoremove.json`
  {% endtab %}
  {% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.crosswatch.app/blueprint-architecture/scrobble/sink.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
