Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

262 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI codecov Latest Release GHCR Image Docker Hub Made with Python Built with ytmusicapi Uses Last.fm API MIT License

Last.fm → YouTube Music

A self-hosted music dashboard that turns your Last.fm scrobbles into intelligently curated YouTube Music playlists - and keeps them that way.

YouTube Music's Replay Mix was my go-to for playing my current favorites - whatever I'd actually been listening to most lately. The problem is how little it really does: hit shuffle and you get one random track, then the rest drop straight back into their original order, there's no way to blacklist a song you're sick of, and there's no insight into how it picks anything. So I rebuilt it properly. This tool reads your Last.fm history, finds the right official upload on YouTube Music for each track (skipping live versions, remixes, nightcore, sped-up, 8D, etc.), weights the result by what you've actually been listening to lately, and keeps the playlist in sync on whatever schedule you set - with every step documented and fully configurable, a real blacklist to drop tracks for good, and a lot more than a single playlist.

On top of that you get weekly snapshot playlists that archive your listening habits, custom tag- and artist-based playlists auto-filled from your Last.fm history, and a full web dashboard with a first-launch setup wizard, built-in scheduler, sync console, history database, webhooks, encrypted backup/restore, and PWA install - so after the initial 5-minute install you never have to touch a terminal or config file again.

Dashboard Preview

Get started in ~5 minutes

The Docker setup includes a web dashboard, a setup wizard, and a built-in scheduler. No terminal needed after install.

Quick Start (Docker)

Prefer not to use Docker? There's a standalone CLI install too. It runs the same sync engine; you handle scheduling yourself with cron/systemd. The Docker path is recommended for almost everyone.

Highlights

  • Web dashboard to configure everything, browse your playlist, fix wrong matches, and watch syncs run live.
  • Smart matching that prefers official Songs over user uploads and rejects nightcore, sped-up, slowed, 8D, etc.
  • Recency + play-count weighting so the playlist reflects what you're actually listening to right now.
  • Weekly snapshot playlists so you build a long-term archive of how your taste evolves.
  • Custom playlists - tag-based (e.g. "Breakcore Mix", "Chill Electronic") auto-filled from your Last.fm tags, artist-based collecting every found song by chosen artists, discovery playlists that recommend songs you've never scrobbled based on your top artists/tracks, or template/filter playlists (top tracks in a window, forgotten favorites, seasonal, and more) built from composable history filters.
  • Export any playlist to M3U, CSV, or JSON straight from the dashboard for backups or importing elsewhere.
  • Built-in scheduler, webhooks, encrypted backup - and more in the full docs.

Documentation

Full documentation lives at locko2901.github.io/lastfm-to-ytm.

Roadmap

Ideas on the table:

  • ListenBrainz as an alternate scrobble source - a source abstraction behind the fetch layer so the same match/sync engine can run on ListenBrainz history, not just Last.fm. On hold until it can be properly tested (I only use Last.fm) - contributions welcome.
  • Spotify as an alternate playlist target - a target abstraction behind the sync layer so the same resolved, recency-weighted track set can be pushed to Spotify playlists, not just YouTube Music. Turns the tool from Last.fm→YTM into a general playlist engine. Contributions welcome.

Credits

  • ytmusicapi - YouTube Music API wrapper
  • Thanks to the Last.fm and YouTube Music communities.

License

MIT - see LICENSE for details.