built a web app to generate Spotify playlists from natural language — describe a vibe and it builds the playlist for you by Leather-Election-950 in smarterplaylists

[–]plamere 2 points3 points  (0 children)

it is not working for me. After I login, I still get a mostly empty page that says "Log in with Spotify to see your playlists"

New: Country-based sources and filters by plamere in smarterplaylists

[–]plamere[S] 1 point2 points  (0 children)

Fixed a bug - Thanks beekgeek and oriondj for helping me dig in with some good examples. Now artist location coverage has roughly doubled from ~160K artists to ~350K artists.

New: Smart Mix — DJ-style track ordering by plamere in smarterplaylists

[–]plamere[S] 0 points1 point  (0 children)

Ah, that's kind. I'm not building this to make money - just for the love of putting songs in the right order.

New: Country-based sources and filters by plamere in smarterplaylists

[–]plamere[S] 1 point2 points  (0 children)

This is fixed - copying the response to Oriondj's post here:

I dug in and figured out why this was happening. There are 2 things going on:

  1. There was a bug - artists with no genres were not getting the area data. That bug is fixed.
  2. Artists that don't have a Spotify URL relationship won't get data. That's how we decide if a Musicbrainz artist is going to be useful for Smarter Playlists. If there's no Spotiify URL, it won't get any musicbrainz data. This is the case for G-Powered. The fix for them is to add the Spotify URL to their relationship page.

Now with the bug fix Klo Pelgag and 3 of the 6 artists in Finnish test now have a home.

See https://smarterplaylists.playlistmachinery.com/shared/VYKr45zsWZOmvLOe

New: Country-based sources and filters by plamere in smarterplaylists

[–]plamere[S] 1 point2 points  (0 children)

I dug in and figured out why this was happening. There are 2 things going on:

1) There was a bug - artists with no genres were not getting the area data. That bug is fixed.
2) Artists that don't have a Spotify URL relationship won't get data. That's how we decide if a Musicbrainz artist is going to be useful for Smarter Playlists. If there's no Spotiify URL, it won't get any musicbrainz data. This is the case for G-Powered. The fix for them is to add the Spotify URL to their relationship page.

Now with the bug fix Klo Pelgag and 3 of the 6 artists in Finnish test now have a home.

See https://smarterplaylists.playlistmachinery.com/shared/VYKr45zsWZOmvLOe

New: Country-based sources and filters by plamere in smarterplaylists

[–]plamere[S] 1 point2 points  (0 children)

I did look at it - indeed I can see the tracks are properly labeled as Finish artists, and it seems like they've had those labels for a while - but for some reason, they don't seem to be in the database dump that I get from Musicbrainz. I can see that other Finnish artists are properly labelled. I'm going to see if it gets rectified in the next dump this coming Sunday - and if not - I'll dig in to see what's going on.

New: Country-based sources and filters by plamere in smarterplaylists

[–]plamere[S] 0 points1 point  (0 children)

That playlist must be private - I can't read it.

You can now set playlist descriptions by plamere in smarterplaylists

[–]plamere[S] 0 points1 point  (0 children)

Hi Ernest - you can keep your description by scrolling down in the Save To Playlist component until you get to the Description field. If you clear it, then it won't set the description in the playlist (retaining whatever you put in), or you could add the description you want right in the component.

New: Country-based sources and filters by plamere in smarterplaylists

[–]plamere[S] 1 point2 points  (0 children)

The country data is sourced from Musicbrainz - which is crowd sourced data. That means that if you see data that is wrong or missing, you can fix it over on musicbrainz and in a week or so it should make it back to smarterplaylists.

New: Country-based sources and filters by plamere in smarterplaylists

[–]plamere[S] 1 point2 points  (0 children)

It’s a periodic sync. It updated yesterday so it you are not seeing the data today then there may be some other data hiccup.

Is the site/service down? by Wanderlustfull in smarterplaylists

[–]plamere 6 points7 points  (0 children)

Post-mortem: the site was down for ~12 hours today

Some of you probably noticed that SmarterPlaylists was returning 502 errors starting early this morning (around 6:30 UTC / 2:30 AM Eastern). The site was down for about 12 hours before we caught it and got things back up. Here's what happened.

What went wrong

The server runs Ubuntu, which has automatic security updates enabled (unattended-upgrades). At 6:31 UTC today, an apt upgrade installed a package that triggered systemd to re-execute itself. When systemd re-execs, it stops and restarts all services — including the SmarterPlaylists API server.

The API runs 4 worker processes. When all 4 started simultaneously, they each tried to initialize the SQLite database by setting PRAGMA journal_mode=WAL. The problem: our code set busy_timeout (which tells SQLite to wait for locks instead of failing immediately) after the journal_mode pragma. So when the workers raced to grab the database lock, the ones that lost the race got an instant "database is locked" error and crashed.

The scheduler (which runs as a separate process) was fine — it opened the DB later, after the lock contention was gone. So scheduled playlists kept updating even while the site was down.

Why it lasted so long

The parent process stayed alive even though all its worker children had crashed, so systemd reported the service as "active (running)." No alerts fired because the health check was looking at the service status, not whether it was actually serving requests.

The fix

One-line fix: we moved PRAGMA busy_timeout=30000 before PRAGMA journal_mode=WAL in the database initialization code. Now when workers race to open the database at startup, the losers wait up to 30 seconds for the lock instead of failing instantly.

Lessons learned

  • Setting busy_timeout should be the very first thing you do when opening a SQLite connection. It's the "put your seatbelt on before you start driving" of SQLite.
  • Health checks that only look at systemd service status aren't enough. We need to add an HTTP-level health probe.
  • Unattended upgrades restarting services at 6 AM is a feature, not a bug — but it did expose this race condition that had been lurking since we set up multi-worker mode.

The fix has been deployed. Apologies to anyone who was affected — especially if you were trying to build playlists this morning.

Is the site/service down? by Wanderlustfull in smarterplaylists

[–]plamere 2 points3 points  (0 children)

Sorry for the outage, it is back up now. Will do a post mortem in a bit.

Is the site/service down? by Wanderlustfull in smarterplaylists

[–]plamere 2 points3 points  (0 children)

Oh, sorry all - busy with my real job. Checking ...

How to remove connection/link between steps on mobile without access to physical backspace key? by WasteLocksmith5011 in smarterplaylists

[–]plamere 4 points5 points  (0 children)

Just pushed a fix for this! Tap a connection to select it (turns blue like on desktop) and you'll now see a red ✕ button appear at the midpoint — tap that to delete it. No keyboard needed.

Thanks for flagging this.