Havard03 / spotr

Spotr - A spotify cli
MIT License
39 stars 2 forks source link

"fix for search function. If track names were the same name but diffe… #5

Closed RWayne93 closed 1 year ago

RWayne93 commented 1 year ago

Was playing around with your library i liked that it didn't use spotipy and noticed that if i was using search and had songs with the same name but different artists it would just play the first song with that name so if it was in index 1 and i selected song that was at index 4 it would just play song 1.

after some testing this change seems to have fixed it i think.

Havard03 commented 1 year ago

Hey @RWayne93!

Good catch, i didnt think of the cases where tracks had the same name.

I modified your change to use the "parse_tracks" helper function so that we get the seperator gap for the tracks and artists

I think in the future when i have time i will implement a more "Bulletproof" solution here. But for now, this works fine :)

Thank you for your contribution, and keep up the good work!

RWayne93 commented 1 year ago

Yeah no problem i liked your library. I forgot about your helper function from helpers.py. I was in a rush to get it working that day.