[mythtv] [mythtv-commits] Ticket #3117: Rewrite Mythweb's Mythvideo Module

Rob Smith kormoc at gmail.com
Sat Feb 24 18:49:44 UTC 2007


On 2/24/07, raptor jr <raptorjr at hotmail.com> wrote:
> Now i don't get that "error" message. Now i get No matches instead.
> I dont know much about php, but i tried to see if anything went wrong in
> imdb.php.
>
> This row gives me no matches:
> $output = shell_exec($imdb.' -M tv=both "'.$title.'"');
>
> But if i do this i get 3 matches:
> $output =
> shell_exec('/usr/local/mythtv/share/mythtv/mythvideo/scripts/imdb.pl -M
> tv=both "Equilibrium"');

Did you try setting the debug var? it outputs via an alert what it
tried running, so you can double check to make sure it's doing what it
should.

> But they should be the same thing. I got the imdb.pl location from $imdb.
> And just made the string myself and tried. Dont have any clue why the first
> one gives me no matches and the other one gives med 3 matches.

That's strange. It's really nutty, as I get the matches fine...

> Also, i left the other line just to try if it was possible to get the
> information from IMDB.
> It seems that in line 89 of imdb.php you have  if ($posterjpg === FALSE) i
> guess it should be
> if ($posterjpg == FALSE)?

actually not. PHP will automatically cast certain vars into a bool if
it's only == (0, or '' would both be false). We actually are only
testing for a returned error value which is an absolute FALSE, and so
we ask php not to cast via the ===.

> Anyway, what i get is a "Video: Warning: Artwork: Download" and then the
> name of my video gets erased, but the IMDB number gets saved. Maybe this has
> something to do with error handling?

That comes up when the download from imdb fails for some reason, but
it's a non-fatal error and it should grab the rest of the data just
fine...

> So then i tried to enter the right information by hand like i did above in
> the imdb.php file. And then i got the information about the movie, and the
> poster got saved, but it didn't get associated with my movie. So even if i
> got the poster in my poster directory, the videofile still shows Missing
> cover.

Did you set the proper id when you requested it?

> It seemd to me that there is some problem with shell_exec when you have
> variables in the argument. But if i enter the string by hand it works??

Yeah, that's really strange. I'll commit a change to switch them all
over to exec, so perhaps that will work better...

~Rob


More information about the mythtv-dev mailing list