# \_mod\_JELLYFIN

Provider ID: `JELLYFIN`\
Version (module): `2.1.0`

{% tabs %}
{% tab title="End users" %}
Jellyfin support in the sync engine.

Use it to sync:

* watchlist
* history

Setup docs:

* [Auth: Jellyfin](/crosswatch/providers/authentication/auth-media-servers/auth-jellyfin.md)
* [Adapter: Jellyfin](/crosswatch/providers/synchronization/adapter-jellyfin.md)
  {% endtab %}

{% tab title="Power users" %}
**Entry point:** `sync/_mod_JELLYFIN.py`

### Provider surface

* `health()`
* `build_index(feature)`
* `add(feature, items)`
* `remove(feature, items)`

### Features

* `watchlist` → `providers/jellyfin/_watchlist.py`
* `history` → `providers/jellyfin/_history.py`

### Capabilities

* `bidirectional: true`
* `provides_ids: false`
* `index_semantics: "present"`

### Config

Config block name:

* `Jellyfin` or `jellyfin`

Common keys:

* `server`, `access_token`, `user_id`
* `verify_ssl` (default `true`)
* `watchlist_mode` (`favorites` or playlist)
* `history_libraries` (optional whitelist)
* `timeout`, `max_retries`

### Gotchas

GUID selection affects matching.

Tune `*_guid_priority` if matches look off.

<details>

<summary>Runtime call flow</summary>

```
Orchestrator
  └─ OPS.build_index(cfg, feature)
       └─ JELLYFINModule.build_index(feature)
            └─ providers/jellyfin/_{feature}.py : build_index(adapter, ...)
```

Writes are symmetric:

```
Orchestrator plan → OPS.add/remove(...)
  └─ JELLYFINModule.add/remove(feature, items, dry_run=...)
       └─ providers/jellyfin/_{feature}.py : add/remove(adapter, items)
```

</details>

<details>

<summary>OPS contract</summary>

* `name()`
* `label()`
* `features()`
* `capabilities()`
* `is_configured(cfg)`
* `build_index(cfg, feature=...)`
* `add(cfg, items, feature=..., dry_run=False)`
* `remove(cfg, items, feature=..., dry_run=False)`
* `health(cfg)`

</details>

<details>

<summary>Full config reference</summary>

Config namespace:

* `cfg["jellyfin"]` (fallback: `cfg["auth"]["jellyfin"]`)

Fields:

* `server`, `access_token`, `user_id`
* `device_id` (default: `crosswatch`)
* `verify_ssl` (default: `true`)
* `timeout` (default: `15.0`)
* `max_retries` (default: `3`)
* `watchlist_mode` (default: `favorites`)
* `watchlist_playlist_name` (default: `Watchlist`)
* `watchlist_query_limit` (default: `25`)
* `watchlist_write_delay_ms` (default: `0`)
* `watchlist_guid_priority` (list)
* `history_query_limit` (default: `25`)
* `history_write_delay_ms` (default: `0`)
* `history_guid_priority` (list)
* `history_libraries` (list)

Dependencies:

* `requires: ['requests']`

</details>
{% 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/sync/_mod_jellyfin.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.
