Skip to content

nesticle8bit/vinyl-scrobbler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎡 Vinyl Scrobbler CLI

Buy Me A Coffee

Scrobble vinyl tracks from Discogs to Last.fm with accurate timestamps and metadata.

MIT NodeJS JavaScript JSON

vinyl_scrobbler__50d22573538ab3 (Example workflow: fetching release data and scrobbling tracks)

✨ Features

  • 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

πŸ›  Installation

  1. Install Node.js (v14+ recommended):
    https://nodejs.org/

  2. Clone the repository:

    git clone https://github.com/nesticle8bit/vinyl-scrobbler.git
    cd vinyl-scrobbler
  3. Create a .env file 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

πŸš€ Usage

Basic Command:

node .\vinyl-scrobbler.js --album=DISCOGS_RELEASE_ID_OR_URL

Options:

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

πŸ§‘πŸ»β€πŸ« Examples

  1. Scrobble with release ID:
node vinyl-scrobbler.js --album=24132131
  1. Dry run mode:
node vinyl-scrobbler.js --album=24132131 --dry-run
  1. Interactive mode (prompt for URL):
node vinyl-scrobbler.js

πŸ“ Logs

Scrobble 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"
      }
    ]
  }
]

βœ… Requirements

  1. Node.js 14+
  2. Last.fm API credentials
  3. Discogs API token
  4. A Discogs release URL for the vinyl you want to scrobble

⚠️ Troubleshooting

Common Issues

  1. Chalk colors not working:
npm uninstall chalk && npm install chalk
  1. Cannot use import error: Ensure package.json contains:
{
  "type": "module"
}

Or rename file to .mjs extension

  1. Missing environment variables:
Verify .env file exists with all required keys

🫢 Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements.

πŸ“œ License

MIT Β© Julio Poveda


β˜• Support the Project

Hi, I'm Julio Poveda – a fullstack developer who crafts robust web symphonies by day and vinyl-scrobbling tools by night.

Buy Me A Coffee

Your coffee keeps my IDE open and my turntable spinning!

About

🎡 A Node.js CLI tool that bridges your vinyl collection to Last.fm. Automatically scrobble vinyl records from Discogs to your Last.fm profile with accurate timestamps and track information. Perfect for audiophiles who want to track their vinyl listening habits.

Topics

Resources

Stars

Watchers

Forks

Contributors