micro-nova / AmpliPi

Whole House Audio System 🔊
https://amplipi.com
GNU General Public License v3.0
289 stars 23 forks source link

Spotify demands at least 2 chars in name, name field description is inaccurate #948

Open SteveMicroNova opened 1 month ago

SteveMicroNova commented 1 month ago

image The text underneath the name textbox says "This can be anything you like!" but that isn't strictly true; Spotify demands at least two non-special chars (so "1" is invalid, "11" is valid, "1-" is invalid, "1-1" is valid again due to two of the chars being non-special)

I would've whipped up a quick fix for this by doing something like this:

const NAME_DESC = ( 
  streamType == "spotify"
  ?
  "This name requires a minimum of two non-special characters - it will be used to select this stream from the source selection dropdown" 
  :
  "This name can be anything - it will be used to select this stream from the source selection dropdown"
);

In StreamModal.jsx, but that file doesn't seem to be aware of the stream type being created

SteveMicroNova commented 1 month ago

I'm also finding that some chars are outright illegal, will need proper testing but I think that underscores and slashes are both illegal for spotify

SteveMicroNova commented 3 weeks ago

This deserves to be two issues, making another now