Scrobble vinyl tracks from Discogs to Last.fm with accurate timestamps and metadata.
(Example workflow: fetching release data and scrobbling tracks)
- Discogs Integration
Fetch tracklists and metadata automatically - Reverse Chronological Scrobbling
Tracks appear in correct order on Last.fm (newest first) - Duration Parsing
Supports MM:SS and HH:MM:SS formats - Dry Run Mode
Test without actually scrobbling - Session Logging
JSON logs of all scrobbled releases - Interactive Prompts
Confirm/edit metadata before scrobbling
-
Install Node.js (v14+ recommended):
https://nodejs.org/ -
Clone the repository:
git clone https://github.com/nesticle8bit/vinyl-scrobbler.git cd vinyl-scrobbler -
Create a
.envfile with your API credentials:LASTFM_API_KEY=your_api_key LASTFM_API_SECRET=your_api_secret LASTFM_USERNAME=your_username LASTFM_PASSWORD=your_password DISCOGS_USER_TOKEN=your_discogs_token
Basic Command:
node .\vinyl-scrobbler.js --album=DISCOGS_RELEASE_ID_OR_URLOptions:
| Flag | Description | Example |
|---|---|---|
--album |
Discogs release ID or URL | --album=24132131 |
--dry-run |
Test without scrobbling | --dry-run |
--delay=MS |
Delay between scrobbles (default: 1000ms) | --delay=2000 |
--help |
Show help | --help |
- Scrobble with release ID:
node vinyl-scrobbler.js --album=24132131- Dry run mode:
node vinyl-scrobbler.js --album=24132131 --dry-run- Interactive mode (prompt for URL):
node vinyl-scrobbler.jsScrobble sessions are saved to:
/logs/scrobbles_YYYY-MM-DD.json
Example log entry:
[
{
"timestamp": "2025-04-01T19:46:25.040Z",
"artist": "Wampyric Rites",
"album": "The Eternal Melancholy Of The Wampyre",
"url": "https://www.discogs.com/release/24132131",
"tracks": [
{
"position": 1,
"title": "Ancient Specters Of The Forlorn Forest",
"duration": "5:37"
},
{
"position": 2,
"title": "As Light Is Absorbed By Darkness",
"duration": "7:42"
},
{
"position": 3,
"title": "Tyrant's Blood",
"duration": "4:43"
},
{
"position": 4,
"title": "The Eternal Melancholy Of The Wampyre",
"duration": "8:12"
},
{
"position": 5,
"title": "Grim Funeral Inside The Dusty Dungeons Of Time",
"duration": "7:36"
},
{
"position": 6,
"title": "Under An Amethyst Sky",
"duration": "12:07"
}
]
}
]- Node.js 14+
- Last.fm API credentials
- Discogs API token
- A Discogs release URL for the vinyl you want to scrobble
Common Issues
- Chalk colors not working:
npm uninstall chalk && npm install chalk- Cannot use import error:
Ensure
package.jsoncontains:
{
"type": "module"
}Or rename file to .mjs extension
- Missing environment variables:
Verify .env file exists with all required keysContributions are welcome! Please open an issue or submit a pull request for any improvements.
MIT Β© Julio Poveda
Hi, I'm Julio Poveda β a fullstack developer who crafts robust web symphonies by day and vinyl-scrobbling tools by night.
Your coffee keeps my IDE open and my turntable spinning!