Youtube: fix skip/count of queries to libgdata
Grl-youtube on search, does set gdata_query_set_max_results() for count and gdata_query_set_start_index() for skip in GDataQuery prior to call gdata_youtube_service_query_videos_async()
Problem is that with v3 of youtube service, only maxResults is set (here) and the 'start_index' value is ignored, which means that, to subsequent calls with skip=0,count=25 and skip=25,count=25 would return the exactly same thing because skip is ignored.
Seems a bug in libgdata but the following comment exists (here)
- With the transition to version 3 of the YouTube, the #GDataQuery:author and
- #GDataQuery:start-index properties are no longer supported, and their values
- will be ignored. Use gdata_query_next_page() instead of the
- #GDataQuery:start-index API.
So, if the above comment stands, grl-youtube should stop using gdata_query_set_start_index() and store instead the pageToken mentioned in the comment above and youtube's API about pagination. Some extra logic might be needed to handle, for example, calls with different values of skip/count...
Original bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1690434