Closed marcderbauer closed 1 year ago
Also fails when querying playlists?
python3 main.py spotify:playlist:37i9dQZF1EUMDoJuT8yJsl
-> This isn't my playlist, but Spotify's, which is why it fails
When calling album.save() the songs are empty. Seems like they're not passed along correctly.
Turns out it really is related to #17
Passing a list instead of a string creates some issues further down the line which are hard to trace back. Need to figure out how best to handle that inconsistency.
IDEA would be best if there's some function which handles this before self.query is set. Will need to use self.query or something unambiguous after. Don't want to create situations where you're unsure of the variable type
This is handled within the request class now. If it's a the query is a one item list it gets converted to a single element (string/int).
Need to figure out where to go from here. There are two main cases when you wouldn't want to query a URI or geniusID:
Currently case 1 needs two elements as a list. Case 2 is a single string with multiple words
Case 2 is already differentiated by --get_ids
, so maybe I could adjust case 1 to be similar to case 2?
I could make it something like "All My Friends; LCD Soundsystem" maybe?
-> The difficulty is making the seperator unique. There are a handful of songs that have ;
in their name. Should these just be edge cases? Calling it something like "All My Friends by LCD Soundsystem" won't work as by
is too common of a word. |
doesn't work either (see the entire untitled album by Kendrick or Taboo by Denzel Curry).
Honestly, the safest option seems to be keeping case 1 seperate as "songname" "artist"
Need to think through how to integrate this best in the existing structures. Will probably do this tomorrow morning.
Maybe there's a way to set the request type to get_ids?
would be nice if you could still call --get_idson case one ("songname" "artist") -> should rename to
--get_id`
By typing "songname" "artist" you would think that the id would be unique, but different songs by the same artist can have the same name. Prime example: "The 1975" s/t. Also different versions of the same song could exist.
Not using any of the improvements I made here. Instead will focus on implementing feature #34. This will make the search described here obsolete.
Priority is fixing the missing lyrics and/or then reverting the nargs="+"
argument
Fixed in Branch #34
To reproduce:
python3 main.py spotify:track:300JhxYyoIHfs9qjAFw8ck
I would assume it's related to issue #17 as this is where the get_lyrics function is modified.