Unable to remove a video from playlist

6 views
Skip to first unread message

pillowwalk

unread,
Aug 10, 2011, 1:14:09 AM8/10/11
to gdata-java-client
Hi,

I am using 1.45 gdata java library.

In the last couple of days I am getting the following error when we
try to remove a video from a playlist.

com.google.gdata.util.ServiceForbiddenException: Not an owner of the
playlist.
<errors xmlns='http://schemas.google.com/g/2005'><error><domain>GData</
domain><code>ServiceForbiddenException</code><internalReason>Not an
owner of the playlist.</internalReason></error></errors>

The code which does this:

// fetch all videos in the playlist, iterate and delete from playlist
String youtubePlaylistId = "the-playlist-id";
String feedUrl = "http://gdata.youtube.com/feeds/api/playlists/" +
youtubePlaylistId;
YouTubeQuery q = new YouTubeQuery(new URL(feedUrl));
PlaylistFeed playListFeed = service.getFeed(q, PlaylistFeed.class);
if (playListFeed != null) {
List<PlaylistEntry> entries = playListFeed.getEntries();
for (PlaylistEntry entry : entries) {
String id = entry.getMediaGroup().getVideoId();
if (id.compareTo(videoId) == 0) {
entry.delete(); // error is thrown here
}
}
}

The same code was working fine before. Has anything changed in the
APIs causing this?

Thanks
Sunny


PACIFIC22

unread,
Aug 11, 2011, 7:16:19 AM8/11/11
to gdata-ja...@googlegroups.com
Does this use of gdata doesn't compells you always to redirect you to google domain always or are you able to make a seperate host for urself for saving data ??
Reply all
Reply to author
Forward
0 new messages