After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794849 - Lua sources not handling GRL_COUNT_INFINITY
Lua sources not handling GRL_COUNT_INFINITY
Status: RESOLVED OBSOLETE
Product: grilo
Classification: Other
Component: plugins
unspecified
Other All
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2018-03-30 22:32 UTC by Jean Felder
Modified: 2018-09-24 09:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
itunes-podcast: Handle GRL_COUNT_INFINITY (3.01 KB, patch)
2018-03-30 22:32 UTC, Jean Felder
committed Details | Review
guardianvideos: Handle GRL_COUNT_INFINITY (906 bytes, patch)
2018-04-01 11:56 UTC, Jean Felder
none Details | Review

Description Jean Felder 2018-03-30 22:32:25 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.
Comment 1 Jean Felder 2018-03-30 22:32:28 UTC
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.
Comment 2 Bastien Nocera 2018-03-30 23:26:15 UTC
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?
Comment 3 Victor Toso 2018-03-31 11:11:43 UTC
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);
Comment 4 Victor Toso 2018-03-31 19:46:29 UTC
Review of attachment 370361 [details] [review]:

Pushed as b3b8a98bdfe884fd7060e06244bd107e1544ec26
Keeping the bug open for the three other sources that need work
Comment 5 Jean Felder 2018-04-01 11:55:00 UTC
I have not been able to reproduce any problem with grl-appletrailers.lua or grl-pocket.lua.
Comment 6 Jean Felder 2018-04-01 11:56:47 UTC
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.
Comment 7 GNOME Infrastructure Team 2018-09-24 09:57:10 UTC
-- 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.