diff --git a/lib/WebService/MusicBrainz.pm b/lib/WebService/MusicBrainz.pm index 425d11b..407f670 100644 --- a/lib/WebService/MusicBrainz.pm +++ b/lib/WebService/MusicBrainz.pm @@ -46,7 +46,7 @@ has search_fields_by_resource => sub { $search_fields{artist} = [ 'area', 'beginarea', 'endarea', 'arid', 'artist', 'artistaccent', 'alias', 'begin', 'comment', 'country', 'end', 'ended', - 'gender', 'ipi', 'sortname', 'tag', 'type' + 'gender', 'ipi', 'sortname', 'status', 'tag', 'type' ]; $search_fields{discid} = ['discid']; $search_fields{label} = [ diff --git a/lib/WebService/MusicBrainz/Request.pm b/lib/WebService/MusicBrainz/Request.pm index 2e64d37..7237a00 100644 --- a/lib/WebService/MusicBrainz/Request.pm +++ b/lib/WebService/MusicBrainz/Request.pm @@ -34,6 +34,10 @@ our $VERSION = '1.0'; binmode STDOUT, ":encoding(UTF-8)"; +my @not_in_query = (qw( + status type +)); + sub make_url { my $self = shift; @@ -48,7 +52,7 @@ sub make_url { $url_str .= '?fmt=' . $self->format; - if(scalar(@{ $self->inc }) > 0) { + if(scalar(@{ $self->inc }) > 0) { my $inc_query = join '+', @{ $self->inc }; $url_str .= '&inc=' . $inc_query; @@ -57,7 +61,11 @@ sub make_url { my @extra_params; foreach my $key (keys %{ $self->query_params }) { + if (grep($_ eq $key, @not_in_query) > 0) { + $url_str .= '&' . $key . '=' . $self->query_params->{$key}; + } else { push @extra_params, $key . ':"' . $self->query_params->{$key} . '"'; + } } if(scalar(@extra_params) > 0) {