Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add podcast support #164

Merged
merged 2 commits into from Apr 4, 2020
Merged

Add podcast support #164

merged 2 commits into from Apr 4, 2020

Conversation

felix-hilden
Copy link
Owner

@felix-hilden felix-hilden commented Mar 23, 2020

Podcast support has been announced by Spotify! Let's implement it right away.

It has some quirks though, which I've addressed on an issue in spotify/web-api#1511. So let's wait a bit and see if they get addressed or changed. Also, some player and playlist endpoints provide a compatibility parameter additional_types. We could be better off without it, but I'm not quite sure yet.

  • Add proper documentation
  • Changelog
  • New podcast endpoints
  • Podcasts in player
  • Podcasts in playlists

It seems that playlist endpoints have some issues. The additional_types argument defaults to returning episodes as track-like objects. We could:

  • release our podcast support simply with the new endpoints and player changes
  • get rid of the argument entirely and enforce additional_types=['track','episode']
  • default to tracks and episodes, but parse to dicts if the argument is specified, much like fields

Then there are additional things which might be problematic as well.

  • show episodes can be None when getting multiple shows
  • episodes can be None in episode search

Side note, trying to implement the playlist functionality brought up a problem in our handling of the fields argument in playlist and playlist_tracks. It will be resolved here as well.

@felix-hilden
Copy link
Owner Author

felix-hilden commented Apr 3, 2020

The additional_types argument has this behavior:

  • None: tracks returned, episodes returned as tracks
  • ['track']: as above
  • ['episode']: tracks returned, episodes returned
  • ['track', 'episode']: tracks returned, episodes returned

So track has no effect, as it is the default accepted type. episode enables episode objects to be returned. We could modify things a bit. In effect it could be replaced by episodes_as_tracks: bool or something similar. The documentation mentions the possibility of new types in the future. But I can't imagine what they could be, so that probably is far in the future. If new types are added, we can then react by changing the argument. I think this is a better experience for users of this library as it makes the effect very clear.

Similarly for playback endpoints the parameter could be tracks_only: bool, as it returns None values if episode is not given.

@felix-hilden felix-hilden force-pushed the podcast branch 2 times, most recently from 8c9fa83 to 1d04118 Compare April 4, 2020 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant