> For the complete documentation index, see [llms.txt](https://wiki.crosswatch.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.crosswatch.app/blueprint-architecture/scrobble/services/overview.md).

# Overview

Scrobble “services” write small JSON state files under `/config/.cw_state`.

They keep Watcher and UI features fast and resilient.

{% tabs %}
{% tab title="End users" %}
You can usually ignore these files.

They only affect convenience features.

Scrobbling still works without them.
{% endtab %}

{% tab title="Power users" %}

### Root folder

* `/config/.cw_state/`

### Files

* `/config/.cw_state/currently_watching.json`
  * transient “now playing” payload
  * used by UI features like [Playing Card](/crosswatch/scrobble/playing-card.md)
  * written by: `providers/scrobble/currently_watching.py`
* `/config/.cw_state/watchlist_wl_autoremove.json`
  * short TTL dedupe map for auto-remove logic
  * written by: `providers/scrobble/_auto_remove_watchlist.py`

### Config touchpoints

Most behavior lives under `scrobble.*`.

### How it works

1. Parse a playback event.
2. Update “currently watching” state (best effort).
3. Forward to sinks.
4. Optionally trigger auto-remove (best effort).

### Conventions

* Prefer atomic writes.
* Log errors. Don’t crash the pipeline.
* Use TTL maps to cap growth.

### Failure modes

* Missing `/config` mount resets state on restart.
* Permission issues break writes.
  * UI state may be stale.
* Corrupted JSON can happen on hard shutdowns.
  * Deleting the file is usually safe.
    {% endtab %}
    {% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://wiki.crosswatch.app/blueprint-architecture/scrobble/services/overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
