Skip to content

A small application checking a subsonic server and suggests albums to buy based on a last.fm profile

License

Notifications You must be signed in to change notification settings

syeo66/album2buy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Album2Buy

A Go utility that identifies top Last.fm albums missing from your Subsonic library.

My reasoning: I’ve been shifting away from Spotify because the platform feels increasingly cluttered with AI-generated content, pays artists poorly, and aligns with business practices I no longer wish to support. Instead, I’ve returned to purchasing downloadable music. Thanks to my past scrobbling history, I can now identify gaps in my offline collection—essentially pinpointing which albums I streamed on Spotify but haven’t yet acquired. Put simply: it’s a way to systematically decide, “What should I buy next based on my listening habits?”

Features

  • Last.fm Integration: Fetches your top 50 albums from the last year
  • Subsonic Compatibility: Checks against your Subsonic music library
  • Smart Recommendations: Identifies up to 5 missing albums
  • Retry Logic: Robust error handling with 3 retry attempts

Installation

Requires Go 1.21+

git clone https://github.com/syeo66/album2buy.git
cd album2buy
go build -o album2buy *.go

Install dotenvx for environment management

curl -fsS https://dotenvx.sh | sh

Configuration

Create .env file:

LASTFM_API_KEY=your_api_key_here
LASTFM_USER=your_lastfm_username
SUBSONIC_SERVER=https://your.subsonic.server
SUBSONIC_USER=your_subsonic_user
SUBSONIC_PASSWORD=your_subsonic_password

Usage

./run.sh # Uses dotenvx to load environment variables

Sample output:

RECOMMENDED ALBUMS
================================================================================
1. Dream Theater - Parasomnia (24-bit HD audio)
   Last.fm URL:  https://www.last.fm/music/Dream+Theater/Parasomnia+(24-bit+HD+audio)
--------------------------------------------------------------------------------
2. Chris Haigh - Massive Rocktronica - Gothic Storm
   Last.fm URL:  https://www.last.fm/music/Chris+Haigh/Massive+Rocktronica+-+Gothic+Storm
--------------------------------------------------------------------------------
3. Jeremy Soule - The Elder Scrolls V: Skyrim (Original Game Soundtrack)
   Last.fm URL:  https://www.last.fm/music/Jeremy+Soule/The+Elder+Scrolls+V:+Skyrim+(Original+Game+Soundtrack)
--------------------------------------------------------------------------------
4. Poppy - New Way Out
   Last.fm URL:  https://www.last.fm/music/Poppy/New+Way+Out
--------------------------------------------------------------------------------
5. Blue Stahli - Obsidian
   Last.fm URL:  https://www.last.fm/music/Blue+Stahli/Obsidian
--------------------------------------------------------------------------------

Environment Variables

Variable Description
LASTFM_API_KEY Last.fm API key
LASTFM_USER Last.fm username
SUBSONIC_SERVER Subsonic server URL (include protocol)
SUBSONIC_USER Subsonic account username
SUBSONIC_PASSWORD Subsonic account password
IGNORE_FILE Path to a list of ignored Last.fm URL's

Requirements

  • Go 1.21+
  • dotenvx (go install github.com/dotenvx/dotenvx@latest)
  • Valid Last.fm API credentials
  • Subsonic server (1.16.1+ recommended)

License

MIT © Red Ochsenbein 2025

About

A small application checking a subsonic server and suggests albums to buy based on a last.fm profile

Resources

License

Stars

Watchers

Forks