trakt-tools 1.9.1 → 1.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
  "id": "trakt-tools",
3
3
  "name": "Trakt",
4
4
  "description": "Track movies and TV shows using trakt.tv",
5
- "version": "1.9.1",
5
+ "version": "1.9.5",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trakt-tools",
3
- "version": "1.9.1",
3
+ "version": "1.9.5",
4
4
  "description": "OpenClaw plugin for Trakt.tv - track movies and TV shows",
5
5
  "type": "module",
6
6
  "openclaw": {
@@ -51,13 +51,21 @@
51
51
  "node": ">=22.19.0"
52
52
  },
53
53
  "dependencies": {
54
- "@sinclair/typebox": "^0.34.49",
55
- "openclaw": "^2026.6.5"
54
+ "@sinclair/typebox": "^0.34.49"
55
+ },
56
+ "peerDependencies": {
57
+ "openclaw": ">=2026.6.5"
58
+ },
59
+ "peerDependenciesMeta": {
60
+ "openclaw": {
61
+ "optional": true
62
+ }
56
63
  },
57
64
  "devDependencies": {
58
65
  "@types/node": "^25.5.0",
59
66
  "typescript": "^5.9.3",
60
- "tsup": "^8.5.0"
67
+ "tsup": "^8.5.0",
68
+ "openclaw": ">=2026.6.5"
61
69
  },
62
70
  "scripts": {
63
71
  "plugin:check": "npx --yes @openclaw/plugin-inspector inspect --no-openclaw",
@@ -66,13 +66,37 @@ trakt-cli history add "Pluribus" --json
66
66
  trakt-cli history add "The Sopranos" "The Wire" --json
67
67
  trakt-cli history add --type movie "The Godfather" --json
68
68
  trakt-cli history add --watched-at 2025-06-15 "Dark" --json
69
+ trakt-cli history add --rewatch "Severance" --json
69
70
  ```
70
71
 
71
72
  - Searches by name, prefers exact title matches
73
+ - For shows, only episodes that have aired **and** are not yet in your
74
+ history are added: catching up on a partially watched show never creates
75
+ duplicate plays, and a fully caught-up show adds nothing
76
+ - Season 0 (specials) is never marked watched, so this agrees with what
77
+ `progress` reports
78
+ - `--rewatch` deliberately records another play for every aired episode,
79
+ including ones already watched. Use it only when the user actually means
80
+ a rewatch; without it a finished show is a no-op
81
+ - Repeated titles (or aliases resolving to the same show) are handled once
82
+ per call — later matches add nothing and come back with a
83
+ `duplicate_of` field in `queries` (text output: `duplicate of "<query>"`)
84
+ - Every requested title gets a `queries` entry in JSON output, show or
85
+ movie alike (`query`, `type`): matched titles carry `matched` (shows
86
+ also `new_episodes` / `already_watched_episodes`), titles that match
87
+ nothing have no `matched` field, and a title whose Trakt search failed
88
+ carries `search_error` — so a failed lookup is distinguishable from
89
+ "not found"
72
90
  - `--type show` (default) or `--type movie`
73
91
  - `--watched-at`: RFC3339 or YYYY-MM-DD (defaults to now)
74
92
  - Accepts multiple titles in one call
75
- - JSON output: `{ "added_episodes": N, "added_movies": N, "not_found_movies": N, "not_found_shows": N }`
93
+ - JSON output: `{ "added_episodes": N, "added_movies": N, "not_found_movies": N, "not_found_shows": N, "not_found_seasons": N, "not_found_episodes": N, "queries": [{ "query", "type", "matched", "new_episodes", "already_watched_episodes", "duplicate_of", "search_error" }] }`
94
+ - A show whose pending-episode lookup fails is skipped and reported in an
95
+ additive `skipped_shows` array; if every lookup fails, nothing is written
96
+ and the command exits 1 with `{"error": "pending episode lookup failed", "skipped_shows": [...]}`
97
+ - On a Trakt rate limit (429) the command stops immediately, syncs nothing,
98
+ and exits 1 with `{"error": ..., "retry_after": N}` (marker also on
99
+ stderr) — wait out `retry_after` before calling any trakt tool again
76
100
 
77
101
  ### Search
78
102