[mythtv-users] tmdb.pl issues

Yan Seiner yan at seiner.com
Sat Dec 12 19:03:35 UTC 2009


Yan Seiner wrote:
> Yan Seiner wrote:
>> I'm trying to get tmbd.pl working. First off, I have to go through a 
>> proxy server, and I can't figure out how to do that.
>>
>> I've tried the standard
>>
>> export http_proxy="http://user:password@selene.seiner.lan:3128/"
>> selene:/var/lib/mythtv# 
>> /usr/local/share/mythtv/mythvideo/scripts/tmdb.pl -d -D 
>> The_Bucket_List# looking for movie id: 'The_Bucket_List'
>> # request: 
>> 'http://api.themoviedb.org/2.0/Movie.imdbLookup?imdb_id=ttThe_Bucket_List&api_key=xxx' 
>>
>> Unable to contact themoviedb.org while retrieving movie data, stopped 
>> at /usr/local/share/mythtv/mythvideo/scripts/tmdb.pl line 123.
>>
>> Second, even if I cut-and-paste the queries into my browser, 
>> themoviedb.org never, ever finds the movie.
>>
>>
>> How do I get tmdb.pl to work?
>>
> OK, I figured out the correct query:
>
> /usr/local/share/mythtv/mythvideo/scripts/tmdb.pl -d -M "The Bucket List"
>
> which results in the URL
>
> http://api.themoviedb.org/2.0/Movie.search?title=The%2520Bucket%2520List&api_key=xxx 
>
>
> But I still don't know how to get that through the proxy.....
>
OK, this trivial patch fixes it.

--- mythplugins/mythvideo/mythvideo/scripts/MythTV/MythVideoCommon.pm    
2009-12-12 11:01:54.000000000 -0800
+++ 
/usr/local/share/mythtv/mythvideo/scripts/MythTV/MythVideoCommon.pm    
2009-12-12 10:51:17.000000000 -0800
@@ -27,6 +27,7 @@
     my @extras = (@URL_get_extras);
     my $agent_id = "MythTV/$mythtv_version (" . join('; ', @extras) . ")";
     my $agent = LWP::UserAgent->new(agent => $agent_id);
+    $agent->env_proxy;
     my $rc = $agent->get($url);
 
     if ($rc->is_success) {

Then add the http_proxy env var to your environment and you're golden.

-- 

   o__
   ,>/'_         o__
   (_)\(_)       ,>/'_          o__
A day may come  (_)\(_)         ,>/'_      o__
when the courage of men fails, (_)\(_)     ,>/'_ 
when we forsake our friends and break all (_)\(_)
bonds of fellowship, but it is not this day.
It is not this day!
This day we ride!



More information about the mythtv-users mailing list