Megabytemb / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

YouTube API: Can't access user's favorites when username contains the word "playlists" #560

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
http://www.google.com/codesearch#VETFb4oZYpw/clients/cs/src/youtube/youtubeservi
ce.cs&l=251

For example, when we try to access
https://gdata.youtube.com/feeds/api/users/dailyfilmplaylists/favorites

We expect a feed of videos, but instead get an Arg_NullReferenceException 
 when trying to access a video id (coming from Google.YouTube.Video.get_VideoId())

I believe the issue is here: 
http://www.google.com/codesearch#VETFb4oZYpw/clients/cs/src/youtube/youtubeservi
ce.cs&l=251

It sees "feeds/api/users" and "playlists", and as such doesn't create the 
correct kind of feed.  The same issue should happen with any user who's name 
contains one of the words "contacts", "subscriptions", "favorites", "inbox", 
"uploads", or "friendactivity".

Sidenote: comment on line 269 of that same file needs to say 
"users/username/uploads" and not "users/videoid/uploads".

Original issue reported on code.google.com by vpa...@google.com on 1 Dec 2011 at 5:39

GoogleCodeExporter commented 9 years ago
Thanks for reporting this bug, the switch statement used to return the correct 
feed type was not robust enough, so I replaced the string matching logic with 
regex.

This issue has been fixed in rev. 1143

Original comment by ccherub...@google.com on 6 Dec 2011 at 6:13