No description
Find a file
Sonophage e69b68cc26 fix: clear remaining Obsidian reviewer findings; release 0.1.2
- Rename banned "General" settings heading to "Import"
- Simplify AlbumInfoResponse track type (unknown, not unknown | unknown[])
- Use optional catch binding to drop the unused error var
- Attach build provenance attestations to release assets in the workflow

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 15:47:51 -07:00
.github/workflows fix: clear remaining Obsidian reviewer findings; release 0.1.2 2026-06-15 15:47:51 -07:00
src fix: clear remaining Obsidian reviewer findings; release 0.1.2 2026-06-15 15:47:51 -07:00
.gitignore feat: initial commit — Stardust Importer 2026-06-15 13:25:52 -07:00
esbuild.config.mjs chore: align esbuild banner with plugin name 2026-06-15 15:17:07 -07:00
LICENSE feat: initial commit — Stardust Importer 2026-06-15 13:25:52 -07:00
main.ts fix: address Obsidian plugin reviewer findings 2026-06-15 15:14:27 -07:00
manifest.json fix: clear remaining Obsidian reviewer findings; release 0.1.2 2026-06-15 15:47:51 -07:00
package-lock.json feat: initial commit — Stardust Importer 2026-06-15 13:25:52 -07:00
package.json fix: clear remaining Obsidian reviewer findings; release 0.1.2 2026-06-15 15:47:51 -07:00
README.md feat: initial commit — Stardust Importer 2026-06-15 13:25:52 -07:00
styles.css fix: address Obsidian plugin reviewer findings 2026-06-15 15:14:27 -07:00
tsconfig.json feat: initial commit — Stardust Importer 2026-06-15 13:25:52 -07:00
versions.json fix: clear remaining Obsidian reviewer findings; release 0.1.2 2026-06-15 15:47:51 -07:00

Stardust Importer

An Obsidian plugin that pulls watched movies (Trakt) and full-album listens (Last.fm) into notes in your vault, rendered through your own Movie/Album Templater templates. Named for Ziggy Stardust — the guise of Media, the New God of the screen.

What it does

  • Movies — on launch (after a delay), fetches new entries from Trakt's /users/me/history/movies (movies only — TV never leaks in) and creates Movies - <title> notes. Re-watches update last: + rewatched: true instead of duplicating.
  • Albums — reconstructs full-album listens from Last.fm scrobbles using a session detector: a sitting counts as an album listen when one album dominates a gap-bounded session and ≥ a coverage threshold of its tracklist was played. Creates Albums - <title> notes. Re-listens set relistened_14d: true.

How notes are created

The plugin doesn't reproduce the note schema — it hands data to the existing templates via a filename-keyed handshake. Each template's top <%* %> block reads:

const __P = app.plugins.plugins["stardust-importer"]?.pending?.[tp.file.title];

If a payload is present it skips the interactive prompts and fills from it; otherwise the template behaves exactly as before for manual note creation.

  • Movie template — payload { tmdbId, title, watchedAt }; reuses all TMDB enrichment, just skips the search/suggester/date prompts.
  • Album template — payload { artist, album, year, trackCount, listenedAt }; auto-selects the best MusicBrainz release-group (artist + title + closest year). On a low-confidence match it still attaches the best guess, sets needs_review: true, and adds a warning callout (option b).

Setup

  1. npm install && npm run build
  2. Symlink into the vault: .obsidian/plugins/stardust-importer → this repo, enable the plugin.
  3. In settings: add Trakt client ID/secret, Connect Trakt (device auth), add Last.fm API key + username.
  4. Backfill now (Trakt only) for movie history. Last.fm starts watching from first run forward — no history sweep.

Notes

  • Uses Templater's internal write_template_to_file — fine for a pinned personal install; a future Templater rewrite could rename it.
  • State (tokens, lastScanned watermarks, seen movies/albums) lives in this plugin's data.json.