mental32 / spotify.py

🌐 API wrapper for Spotify 🎶
https://spotifypy.readthedocs.io/en/latest/
MIT License
150 stars 38 forks source link

Patch play method #37

Closed winston-yallow closed 4 years ago

winston-yallow commented 4 years ago

fixes #36

mental32 commented 4 years ago

Thanks for opening this!

I think instead of using a kwarg to force a path being taken, it might be simpler to infer the case for not treating a single track as a context uri, this could be done by checking if the single uri element was a Track instance or, if it was a raw string uri, if "track" in uris[0]

mental32 commented 4 years ago

Looks good to me, have the changes been tested?

winston-yallow commented 4 years ago

I have update the PR according to your suggestion.

This works, but I think in the long term it could be better to separate playing context from playing tracks. This could lead to a cleaner interface/method signature. I will think about ways to do this and open an issue for discussion as soon as I have an idea how it could be done in a clean way.

winston-yallow commented 4 years ago

I think I tested all possible ways to use the method.

mental32 commented 4 years ago

Certainly, I always like to hear suggestions on improving the interface :)