a minimal CLI toolkit for working with last.fm scrobbles
0

Configure Feed

Select the types of activity you want to include in your feed.

feat(scrobbler-log): ignore tracks rated S (`skipped`) during sync

Lívia (May 17, 2026, 9:41 AM -0300) 4e010deb b3cf07f3

+13 -1
+2
.gitignore
··· 1 + data.csv 2 + .scrobbler.log
+11 -1
cli/scrobbler-log-runner.ts
··· 1 1 import { PendingEntry, PipelineOptions, PipelineSummary, resolveTimestamp, runPipeline } from "~/cli/pipeline.ts"; 2 2 import { ScrobblerLogTrack } from "~/lib/format/scrobbler-log/mod.ts"; 3 3 import { deleteLog, readScrobblerLog } from "~/lib/format/scrobbler-log/io.ts"; 4 + import { symbols } from "~/cli/formatter.ts"; 5 + import { dim } from "@std/fmt/colors"; 4 6 5 7 type ScrobblerLogContext = Record<PropertyKey, never>; 6 8 ··· 23 25 const log = await readScrobblerLog(path); 24 26 if (!log.ok) throw new Error(log.error.message); 25 27 26 - const pending = log.value.tracks.map(toPendingEntry); 28 + const tracks = log.value.tracks.filter((track) => { 29 + if (track.rating === "S") { 30 + console.warn(`${symbols.forbid} Ignored by .scrobbler.log: ${dim(`"${track.artist} - ${track.title}"`)}`); 31 + return false; 32 + } 33 + return true; 34 + }); 35 + 36 + const pending = tracks.map(toPendingEntry); 27 37 const summary = await runPipeline<ScrobblerLogContext>(pending, { ...opts }); 28 38 29 39 if (summary.failed === 0 && !opts.dryRun) {