diff options
author | Yorhel <git@yorhel.nl> | 2010-12-06 19:34:39 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-12-06 19:34:39 +0100 |
commit | 72dd32c56b944d207dc70cbe4fc37f8298bd4366 (patch) | |
tree | c025254730acbf15eb502277902e8f0b2eb39973 /lib/Multi/API.pm | |
parent | 1c3df5b1f154cb1a7f5f3ae8d3e4cffcd7043a7e (diff) |
API: Check against the proper "results" value when determining "more"
Otherwise we're likely to miss an item from the results. :-(
Diffstat (limited to 'lib/Multi/API.pm')
-rw-r--r-- | lib/Multi/API.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Multi/API.pm b/lib/Multi/API.pm index 67002701..4872acf9 100644 --- a/lib/Multi/API.pm +++ b/lib/Multi/API.pm @@ -521,7 +521,7 @@ sub get_vn_res { $_->{image} = $_->{image} ? sprintf '%s/cv/%02d/%d.jpg', $VNDB::S{url_static}, $_->{image}%100, $_->{image} : undef; } } - $get->{more} = pop(@$res)&&1 if @$res > $get->{results}; + $get->{more} = pop(@$res)&&1 if @$res > $get->{opt}{results}; $get->{list} = $res; } @@ -653,7 +653,7 @@ sub get_release_res { $_->{catalog} ||= undef; } } - $get->{more} = pop(@$res)&&1 if @$res > $get->{results}; + $get->{more} = pop(@$res)&&1 if @$res > $get->{opt}{results}; $get->{list} = $res; } elsif($get->{type} eq 'languages') { @@ -799,7 +799,7 @@ sub get_producer_res { $_->{aliases} ||= undef; } } - $get->{more} = pop(@$res)&&1 if @$res > $get->{results}; + $get->{more} = pop(@$res)&&1 if @$res > $get->{opt}{results}; $get->{list} = $res; } elsif($get->{type} eq 'relations') { |