andrewrjones / perl5-WebService-TVDB

A Perl interface to http://thetvdb.com/
https://metacpan.org/module/WebService::TVDB
4 stars 6 forks source link

Can't search a serie in all language at once #16

Closed Quadc0re closed 11 years ago

Quadc0re commented 11 years ago

As described on http://thetvdb.com/wiki/index.php/API:GetSeries I wanted to search a tv series in all language at once but it doesn't seem to work.

I get an error : Can't use an undefined value as a HASH reference at /root/perl5/lib/perl5/WebService/TVDB/Series.pm line 175.

maybe because it doesn't get the language in the result

Is it possible to implement such kind of search ?

Thanks

timdp commented 11 years ago

The API allows this by passing language=all (see http://thetvdb.com/wiki/index.php?title=API:GetSeries) but TVDB.pm currently doesn't use that parameter.

I implemented multi-language search in commit 933d39e of my fork. You'll need to re-run tools/generate-languages.pl to add the dummy language called "ALL".

Andrew can probably think of a slightly more elegant solution.

andrewrjones commented 11 years ago

Thanks Tim. I think the solution is good. You can now use 'ALL' to search all languages.

A new version has been released to the CPAN with this fix.