Open tellessa opened 2 years ago
Since we know we're searching for tracks, we can use the type=track filter, e.g. q=abacab&type=track.
Found the descriptions of the audio features! https://developer.spotify.com/documentation/web-api/reference/#/operations/get-audio-features
Notes about spotify's web ui:
When you search tracks in the spotify web player, you see the top four results You get the track's icon which reveals a play button on hover, and a tool tip You see the artist name small below the track; the artist's name has a URL for the artist's page if you click on it. You can click a heart icon to add it to your library By default queries search all, but you can filter to song If we filter to songs, we see a tabular view- 4 cols: result #, title, album, and duration Title actually shows the artist and art as well
Netflix- recommended YouTube Geographical databases Instagram OpenAI- signed up already Pexels Imdb https://pypistats.org/api/
Plan: Build on the success of using the Spotify API.
[x] 3. display something from the resulting HTTP response in the UI. Hardcode to Fire on the Cathedral for Now. 21 fields.
[x] Show them all.
[x] Show a definition of each field in the UI, at least on hover.
[ ] Add icons to each feature.
[x] instead of ms, convert to min and sec. S = ms / 1000. Minutes = s // 60. Seconds leftover = s % 60. Formatted song length = f”{min}:{s_leftover}”
[x] There is a bug with the song duration: I saw 4:6 as the time. Needs to show as 4:06 maybe?
[x] Instead of an integer, display the actual key of the song, e.g. C#
[x] Need the ability to show text in a certain location.
[ ] For a consecutive search, make sure the UI clears before displaying the new results
[ ] A tree widget might be better for displaying tabular data like this, especially with alternating row colors
Discovered that I've been retrieving the track's audio features, whereas I can also make a GET request to retrieve a track object. This track object has more general information included.
Maybe the top ten results should populate into a QComboBox, with a QPushButton attached TODO: Connect to the song's audio Even though the goal is to help listeners understand audio features of songs, letting them hear the song's audio is super pertinent