You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Unwatched events contain ALL possible IDs for the content
363
+
// Unwatched events contain the history IDs marked as deleted
368
364
console.log(`Unmarked as watched: ${unwatched.type} with IDs: ${unwatched.ids.join(', ')}`);
369
365
}
370
366
});
@@ -574,14 +570,14 @@ Search endpoints support SSE streaming so clients receive results progressively
574
570
575
571
Each SSE event has event type `results`. The data is a JSON object with a single key: the provider name, and the value is an array of results from that provider.
576
572
577
-
Results arrive one provider at a time. For series and movies, Trakt results are sent first, followed by each plugin (e.g., Anilist). For books, only plugin results are sent (no Trakt).
573
+
Results arrive one metadata plugin at a time.
578
574
579
575
### Event Format
580
576
581
577
Each `results` event contains one provider's results:
@@ -651,22 +647,16 @@ When a client falls behind and misses events (lag), the server will skip the mis
651
647
652
648
### Understanding the ID Format
653
649
654
-
The `watched` and `unwatched` events use **external IDs** (from providers like IMDb, Trakt, TMDb) rather than local database IDs. This allows watch history to be portable across different servers and sync with external services.
650
+
History IDs include the media type so IDsfrom different domains cannot collide.
655
651
656
-
**ID Format**: `provider:value`
652
+
| Content | Format | Example |
653
+
|---------|--------|---------|
654
+
| Movie with IMDb ID |`movie:imdb/<imdbId>`|`movie:imdb/tt1234567`|
655
+
| Movie without IMDb ID |`movie:redseat/<movieId>`|`movie:redseat/abc123`|
656
+
| Series progress parent |`series:redseat/<seriesId>`|`series:redseat/series123`|
|`trakt`|`trakt:123456`| Movies, Episodes, Series |
662
-
|`tmdb`|`tmdb:550`| Movies, Episodes, Series |
663
-
|`tvdb`|`tvdb:78901`| Episodes, Series |
664
-
|`slug`|`slug:the-matrix`| Movies, Series |
665
-
|`redseat`|`redseat:abc123`| Local fallback (episodes only) |
666
-
667
-
**ID Selection Priority**:
668
-
-**Movies**: Uses the best external ID (priority: imdb > trakt > tmdb > slug)
669
-
-**Episodes**: Uses external IDs, or falls back to local `redseat:` ID if no external IDs exist
659
+
Episode IDs deliberately use the immutable local series ID and numeric season/episode tuple. Plugin metadata refreshes therefore cannot change watched state or progress IDs.
670
660
671
661
### REST API Endpoints
672
662
@@ -682,30 +672,32 @@ The `watched` and `unwatched` events use **external IDs** (from providers like I
682
672
{ "date": 1705766400000 }
683
673
```
684
674
685
-
**Direct History** (requires knowing the external ID): `POST /users/me/history`
675
+
**Direct History**: `POST /users/me/history`
686
676
```json
687
677
{
688
678
"type": "movie",
689
-
"id": "imdb:tt1234567",
679
+
"id": "movie:imdb/tt1234567",
690
680
"date": 1705766400000
691
681
}
692
682
```
693
683
684
+
For movie compatibility, `imdb:tt1234567` is also accepted and normalized to the typed form. Other media should send the typed history ID returned by the history API or SSE event.
The delete endpoints accept multiple IDs because the watched entry could have been created with any of the available external IDs. The server will try to delete entries matching any of the provided IDs.
700
+
The delete endpoint accepts an array so clients can delete more than one known history ID in one request.
0 commit comments