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

Feature/set videos for smart playlists #38

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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