Skip to content

Conversation

@powpow12
Copy link

Currently, CMS::listPlaylists() will return an array of Playlist objects but smart playlists are treated differently than manual ones. For smart playlists, the video property will be empty while manual playlists will have an array of video ids. This can cause issues downstream if developers expect them to behave the same.

The Drupal module https://cgit.drupalcode.org/brightcove/tree/?h=8.x-1.x, uses this API to save Playlist and videos into Drupal. For our use case, we would like the ability to save videos regardless of the type of playlist.

This is my first attempt and would love to hear feedback and concerns about this solution.

* @return array
* Video ids.
*/
protected function getSmartPlaylistVideos($endpoint) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a concern that the playlist being returned doesn't appear to be honoring the optional $limit parameter. I think it needs to be incorporated here somehow.

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.

2 participants