o1xhack355 downloadsSync your Trakt.tv watchlist, watch history, favorites, and ratings into Markdown notes — with metadata localization and detailed per-episode watch timestamps.
Turn your Trakt.tv watch history into a richly localized Markdown library — with per-episode timestamps, metadata in 15+ languages, and quiet incremental sync that doesn't churn your vault.
🌐 English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Français · Deutsch · Español · Italiano
*_original_* frontmatter fieldsAuto, TMDB only, or OMDb only. Auto keeps TMDB first and falls back to OMDb by IMDb ID when TMDB has no poster. OMDb is poster-only, so it never overrides Trakt/TMDB titles, translations, genres, or ratingsWhen Sync watch history (detailed) is enabled, the plugin queries Trakt's /sync/history endpoint and inlines per-episode (or per-movie) timestamps into the note body — and keeps that block updated as you watch new episodes:
## Watch History
- S1E1 — 2024-01-15 21:30, 2024-03-22 19:00
- S1E2 — 2024-01-16 22:00
- S1E3 — 2024-01-17 21:45
- S2E1 — 2024-04-02 20:00
Re-watches are listed comma-separated; episodes sort by season then episode number. The block is wrapped in %% trakt:watch-history %% markers — the plugin updates only what's between the markers, so any hand-written notes elsewhere in the body are never touched.
Set Metadata language to your preference and synced notes get title, overview, tagline, and genres translated via TMDB (with Trakt's translation endpoint as a fallback when no TMDB key is configured). English originals stay in trakt_original_* frontmatter fields:
trakt_title: 黑暗骑士
trakt_original_title: The Dark Knight
trakt_genres:
- 动作
- 犯罪
- 剧情
trakt_original_genres:
- Action
- Crime
- Drama
trakt_metadata_language: zh-CN
Tags and tag-note paths always stay in English — your existing Dataview queries keep working unchanged.
Metadata localization above is one axis; the plugin's own surfaces are separate axes:
Auto-inserts per-event lines into your Daily Note for every sync — chronologically sorted, in your chosen template language. Covers watched episodes, watchlist additions, favorites, and ratings:
%% trakt:daily:start %%
10:00 — 看了 低智商犯罪 (2026) S1E16, S1E17
14:30 — 加入想看 黑暗骑士 (2008)
21:30 — 打分 9/10 重生 (2020)
%% trakt:daily:end %%
Each event type is gated by its corresponding sync source toggle — if Sync favorites is off, favorite events won't appear in Daily Notes either. Verbs (watched / 看了 / 視聴 / 시청 / a regardé…) follow your template language setting across all 11 bundled languages.
Safety contract: the marker region is fully isolated — content outside it is never modified. Past days are add-only by default (existing markers preserved); today is overwritten so newer events appear on later syncs. An incremental mode opt-in changes today's behavior to append-only too, so any annotations you write inside the marker block survive every sync.
Manual backfill uses a date-range picker with quick presets (Last 7 days / Last 30 days / This month / Last month). Live count shows how many Daily Notes actually exist in the picked range before you confirm. Configure folder + filename format (Moment.js syntax like YYYY-MM-DD or YYYY/YYYY.MM.DD) in Settings → Daily Notes. See spec 0006.
Daily Notes-only auto-sync can be enabled separately from full media auto-sync. It refreshes the Trakt/TMDB data needed for Daily Notes and updates existing Daily Note files, but it does not create, rename, delete, or rewrite media notes. The Daily-only timer and the full sync timer share one lock, so if they fire together, one run skips instead of writing concurrently.
Auth state — Trakt tokens, TMDB/OMDb keys, all settings — lives in <vault>/.obsidian/plugins/sync-trakt/data.json and follows your vault-sync layer. Configure auth once on Mac, share with iPhone via Obsidian Sync (with Plugin data enabled), Syncthing, iCloud + Advanced Data Protection, or Cryptomator. The plugin doesn't store anything on a server.
Large rebuildable runtime caches, including TMDB metadata, OMDb posters, and detailed watch-history aggregates, live outside the vault in each device's local Obsidian app storage. They are not uploaded to Obsidian Sync, and each device can rebuild them from Trakt/TMDB/OMDb if cleared. A small synced full-refresh coordinator keeps devices from writing detailed history from an older local cache after another device has detected Trakt-side deletions.
Any individual setting can opt out of cross-device sync via a small cloud icon next to it (currently exposed for Sync on startup / Auto-sync / Auto-sync interval / Daily Notes auto-sync / Daily Notes auto-sync interval / Plugin UI language). Useful when, e.g., you want media-note sync every few hours on Mac, Daily Notes every 15 minutes on Mac, and no automatic timers on iPhone.
The trakt_poster_url frontmatter field works out-of-the-box with Obsidian Bases (Obsidian 1.9.3+). Build a database view of your sync folder and display posters as thumbnails:
trakt_poster_urlimage(note.trakt_poster_url)Filter by trakt_type = "movie" / "show", sort by trakt_year / trakt_rating / trakt_my_rating, group by trakt_genres. The same frontmatter properties that power Dataview queries also power Bases views — no extra setup.
The plugin connects to three services. Trakt is mandatory — without it, the plugin can't sync anything. TMDB is optional and provides richer localization plus the primary poster source. OMDb is also optional and is used only for poster lookup by IMDb ID.
| Feature | Trakt API (required) |
TMDB API (recommended) |
OMDb API (optional) |
|---|---|---|---|
| Sync your Trakt library (watchlist, watched, favorites, ratings) | ✅ | — | — |
| Per-episode watch timestamps | ✅ | — | — |
| Title / overview / tagline in your language | ✅ basic | ✅ higher quality | — |
| Genres in your language | ❌ | ✅ | — |
| Poster images embedded in notes | ❌ | ✅ | ✅ |
If you only want English content and no posters, Trakt alone is enough. Add a TMDB key for localized genres and TMDB posters. Add an OMDb key when you want poster-only fallback or posters without TMDB. The OMDb free key is limited to 1,000 requests per day, and Daily Notes-only sync deliberately never spends that quota.
→ Full walkthrough for all keys
Directory page: https://community.obsidian.md/plugins/sync-trakt
git clone https://github.com/o1xhack/obsidian-sync-trakt.git
cd obsidian-sync-trakt
npm install
npm run build # produces main.js
npm run lint
npm run test:i18n # smoke tests
Then copy main.js, manifest.json, styles.css to <vault>/.obsidian/plugins/sync-trakt/.
main.js, manifest.json, styles.css from the latest release<your-vault>/.obsidian/plugins/sync-trakt/| Doc | Purpose |
|---|---|
| SETUP | Trakt + optional TMDB / OMDb API key creation, first-time configuration, troubleshooting |
| MANUAL | Full settings reference, frontmatter fields, template variables, sync behavior |
| DEVELOPER | Architecture overview, data flow, how to extend (English only) |
| docs/i18n/ | Translations of README / SETUP / MANUAL into 8 additional languages |
Major versions since the fork (chronological):
obsidian-sync-trakt → sync-trakt (Obsidian directory bot rejects ids containing "obsidian"), minAppVersion tightened to 1.6.6, and transparent automatic data migration from the legacy folder on first launch. → spec 0004data.json small for Obsidian Sync while preserving multi-device rebuild behavior. → spec 0010This plugin was originally inspired by sarimabbas/traktr (MIT licensed), which provided the initial Trakt OAuth scaffolding. Substantial subsequent work — detailed watch-history aggregation, metadata localization with translation-fallback chains, bilingual UI, bounded-concurrency fetching with live progress reporting, machine-managed body sections, the translation-aware template renderer, multi-language docs — has reshaped most of the codebase into a fundamentally different architecture.
Thanks to Sarim Abbas for the starting point. The original work's MIT copyright notice is preserved verbatim in LICENSE alongside this project's own.
MIT — see LICENSE.
Author: o1xhack