GNOME Bugzilla – Bug 794849
Lua sources not handling GRL_COUNT_INFINITY
Last modified: 2018-09-24 09:57:10 UTC
Itunes podcast api does not handle limit equal to -1: it always returns a number of results lower than MAX_ITEMS. This also resolves a bug inside fetch_search_results_cb and fetch_browse_results_cb. These functions expect count to be positive.
Created attachment 370361 [details] [review] itunes-podcast: Handle GRL_COUNT_INFINITY Itunes podcast api does not handle limit equal to -1: it always returns a number of results lower than MAX_ITEMS. This also resolves a bug inside fetch_search_results_cb and fetch_browse_results_cb. These functions expect count to be positive.
Review of attachment 370361 [details] [review]: This is a good first pass, but there are other places where this isn't handled, including: grl-appletrailers.lua grl-guardianvideos.lua grl-pocket.lua Would you be able to work on those as well?
As a side note, for the future, we could consider an extra argument to grl.get_options("count") to define some max value... e.g: grl.get_options("count", MAX_ITEMS);
Review of attachment 370361 [details] [review]: Pushed as b3b8a98bdfe884fd7060e06244bd107e1544ec26 Keeping the bug open for the three other sources that need work
I have not been able to reproduce any problem with grl-appletrailers.lua or grl-pocket.lua.
Created attachment 370408 [details] [review] guardianvideos: Handle GRL_COUNT_INFINITY This resolves a bug inside guardianvideos_fetch_cb which expects count to be positive. This change mimicks appletrailers behavior.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/grilo/issues/131.