diff options
author | Yorhel <git@yorhel.nl> | 2009-11-14 11:58:07 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-11-14 11:58:07 +0100 |
commit | 848cae8e13d6ab8110caff39acf671822659de08 (patch) | |
tree | bb83d30f8fbbbbcf6345238859a5b01cc5dd3dca /lib/Multi | |
parent | 537bba22c0ed0c0fe52ba067f136b30e7f95d968 (diff) |
API: Changed 'website' member of get producer to a links object
Which also covers the wikipedia link, and possibly more in the future.
Diffstat (limited to 'lib/Multi')
-rw-r--r-- | lib/Multi/API.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Multi/API.pm b/lib/Multi/API.pm index 8da59de6..8014f9be 100644 --- a/lib/Multi/API.pm +++ b/lib/Multi/API.pm @@ -719,7 +719,7 @@ sub get_producer { my $select = 'p.id, p.latest'; $select .= ', pr.type, pr.name, pr.original, pr.lang AS language' if grep /basic/, @{$get->{info}}; - $select .= ', pr.website, pr.desc AS description, pr.alias AS aliases' if grep /details/, @{$get->{info}}; + $select .= ', pr.website, pr.l_wp, pr.desc AS description, pr.alias AS aliases' if grep /details/, @{$get->{info}}; my @placeholders; my $where = encode_filters $get->{filters}, \&filtertosql, $get->{c}, \@placeholders, [ @@ -767,7 +767,10 @@ sub get_producer_res { $_->{id}*=1; $_->{original} ||= undef if grep /basic/, @{$get->{info}}; if(grep /details/, @{$get->{info}}) { - $_->{website} ||= undef; + $_->{links} = { + homepage => delete($_->{website})||undef, + wikipedia => delete $_->{l_wp}, + }; $_->{description} ||= undef; $_->{aliases} ||= undef; } |