Stardust Importer

by Sonophage
5
4
3
2
1
Score: 35/100
New Plugin

Description

Pulls watched movies (Trakt) and full-album listens (Last.fm) into reference notes via Templater. - This plugin has not been manually reviewed by Obsidian staff.

Reviews

No reviews yet.

Stats

stars
downloads
0
forks
0
days
NaN
days
NaN
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

Latest Version

Invalid date

Changelog

README file from

Github

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.