UNPKG

@rocksky/cli

Version:

Command-line interface for Rocksky – scrobble tracks, view stats, and manage your listening history

23 lines (17 loc) 411 B
import { matchTrack } from "lib/matchTrack"; import { publishScrobble } from "scrobble"; export async function scrobble( track: string, artist: string, { timestamp, dryRun }, ) { const match = await matchTrack(track, artist); if (!match) { process.exit(1); } const success = await publishScrobble(match, timestamp, dryRun); if (!success) { process.exit(1); } process.exit(0); }