I use the Zend GData library to control YouTube videos from my application. The app gives the user the ability to add the downloaded video to one of their previously existing YouTube playlists, if they so wish. One of the problems is that if a video is subsequently deleted from our application, it seems to leave the βlostβ remote video object in the playlist to which it was added.
I tried to figure out how our app deletes videos from any playlists before deleting it from YouTube, but it's hard for me to figure out how to determine if a particular YouTube video is contained in playlists.
I wrote a function that iterates over each entry in each playlist pertaining to a registered user and tries to compare the identifier of the video in the playlist with the identifier of the video that was passed as an argument. However, I cannot get the value for the video ID for any of the videos in the playlists.
Here's the function:
function remove_video_from_playlists($yt,$hash){ $playlistListFeed = $yt->getPlaylistListFeed("default"); foreach ($playlistListFeed as $playlistListEntry) { $playlistVideoFeed = $yt->getPlaylistVideoFeed($playlistListEntry->getPlaylistVideoFeedUrl()); foreach ($playlistVideoFeed as $playlistVideoEntry) {
Any help would be greatly appreciated. How to get a basic video image of each video in playlists?
source share