> 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/crosswatch/settings/synchronization/others/cw.md).

# CW

CW adapter is a **local backup provider**. It stores watchlist, history, and ratings as JSON in your config folder.

Use it as a safety net:

* Backup: `Plex/Emby/Jellyfin/Trakt/SIMKL/MDBList/TMDb → CW`
* Restore: `CW → any provider`

{% hint style="info" %}
Nothing runs “automatically”. CW adapter only does work when it’s used in a pair.
{% endhint %}

### What it supports

* Features: **Watchlist**, **History**, **Ratings**
* Auth: none (local only)
* Storage:
  * Current state: `/config/.cw_provider/`
  * Snapshots: `/config/.cw_provider/snapshots/`
* Restore granularity: per feature (pick different snapshots per feature)

### Storage layout

Current state files:

* `/config/.cw_provider/watchlist.json`
* `/config/.cw_provider/history.json`
* `/config/.cw_provider/ratings.json`

Snapshots are timestamped:

* `YYYYMMDDThhmmssZ-watchlist.json`
* `YYYYMMDDThhmmssZ-history.json`
* `YYYYMMDDThhmmssZ-ratings.json`

### When snapshots are created

Snapshots are only created when CW needs to **change** its local data.

Typical case:

* CW is the **target** in a run.
* The run applies add/remove operations.
* If **Auto snapshot** is enabled, CW snapshots the old state first.

### Settings

Go to **Settings → CrossWatch Tracker**.

#### Basic behavior

* **Enabled**: toggles the provider for use in pairs.
* **Retention (days)**: `0` keeps snapshots forever.
* **Auto snapshot**: snapshots before writes.
* **Max snapshots per feature**: `0` = unlimited.

#### Restore snapshots (per feature)

Pick one snapshot for each feature:

* Watchlist snapshot
* History snapshot
* Ratings snapshot

`Latest (default)` uses the most recent snapshot for that feature.

<details>

<summary>What gets written to config</summary>

```jsonc
"crosswatch": {
  "enabled": true,
  "retention_days": 30,
  "auto_snapshot": true,
  "max_snapshots": 64,
  "restore_watchlist": "latest",
  "restore_history": "latest",
  "restore_ratings": "latest"
}
```

</details>

### What “restore” means

Selecting a snapshot does **not** push changes to other providers.

It only changes what CW exposes as its **current state**:

* The chosen snapshot is copied into the main JSON for that feature.
* A restore happens only when you run a pair where CW is the **source**.

{% hint style="warning" %}
Snapshot selection “arms” the restore. Running a pair “applies” the restore.
{% endhint %}

### Common workflows

{% stepper %}
{% step %}

### Undo a bad sync (restore ratings)

1. Open **Settings → CrossWatch Tracker**.
2. Set **Ratings snapshot** to a time before the bad run.
3. **Save**.
4. Run a pair: **CW → target provider**, enable **Ratings** only.
   {% endstep %}

{% step %}

### Roll back watchlist only

1. Set **Watchlist snapshot** to an older file.
2. Keep History/Ratings on **Latest**.
3. Run a pair: **CW → target provider**, enable **Watchlist** only.
   {% endstep %}

{% step %}

### Migrate state to a new provider

1. Pick snapshots you trust for the features you want.
2. Run a pair: **CW → new provider**.
3. Start one-way first. Use one feature. Then expand.
   {% endstep %}
   {% endstepper %}

### Tips and limitations

* CW is **local**. Remove `/config/.cw_provider/` and you lose backups.
* Low retention + frequent runs will prune older snapshots quickly.
* CW history does **not** preserve multiple watch entries for one item.
* Trakt is currently the only provider with full multiple-play support.
* This is intentional. Provider-neutral history matters more than Trakt-specific workarounds.
* This is extra protection. It does not replace provider-side backups (if any).

Recommended baseline:

* Enabled: **On**
* Auto snapshot: **On**
* Retention: **30–90** days
* Max snapshots per feature: **64**
* Restore selection: **Latest**, until you need a rollback


---

# 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/crosswatch/settings/synchronization/others/cw.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.
