Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

Problems with imdb.pl

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


tamiral at alush

Mar 24, 2007, 4:52 AM

Post #1 of 6 (2128 views)
Permalink
Problems with imdb.pl

Hi,
I've had two problems with the IMDB script:

Running the IMDB script on a movie name which has more than one word in
its title,
gives out no results. I have to add a backslash (\) before the second
and third words in order
to get the IMDB title number in return.
For example: "imdb.pl -M Running Scared" returns nothing, but if I type
"imdb.pl -M Running\ Scared" I get the
correct IMDB title number.
When running the IMDB script from MythTV, I run "ps aux | grep imdb" and
find that this is the way MythTV tries to retrieve
movie information from IMDB using this script (my first example, that
is...)
I'm no coder, so I couldn't find the actual code in the script I should
change in order to
add a backslash to all second and third words. Is there a fix for that
problem?

Another problem I have is that I'm trying to find a way to run the IMDB
script on my whole database automatically
instead of a title-by-title method. Is there a solution for this?

Thanks,
Tamir.
Attachments: smime.p7s (1.90 KB)


dave at cpfc

Mar 24, 2007, 9:08 AM

Post #2 of 6 (2107 views)
Permalink
Re: Problems with imdb.pl [In reply to]

Tamir Alush wrote:
> Another problem I have is that I'm trying to find a way to run the IMDB
> script on my whole database automatically
> instead of a title-by-title method. Is there a solution for this?

something like this- untested

#!/bin/bash
#
# path to movies
MOVIEDIR="/movies"

cd $MOVIEDIR
for movie in `find . -name \*.avi | cut -d / -f 2 | sed -e 's/.avi//g'`
do
/usr/share/mythtv/mythvideo/scripts/imdb.pl -M $movie
done


Dave



_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


dave at cpfc

Mar 24, 2007, 10:48 AM

Post #3 of 6 (2085 views)
Permalink
Re: Problems with imdb.pl [In reply to]

David Campbell wrote:
> Tamir Alush wrote:
>> Another problem I have is that I'm trying to find a way to run the IMDB
>> script on my whole database automatically
>> instead of a title-by-title method. Is there a solution for this?
>
> something like this- untested
>
> #!/bin/bash
> #
> # path to movies
> MOVIEDIR="/movies"
>
> cd $MOVIEDIR
> for movie in `find . -name \*.avi | cut -d / -f 2 | sed -e 's/.avi//g'`
> do
> /usr/share/mythtv/mythvideo/scripts/imdb.pl -M $movie
> done

Actually - this doesn't do what we want does it? It just queries IMDB
and doesn't update the database.

There would be a a bit of work to get that functionality working but it
would be doable.

Dave
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


linux.luser at myrealbox

Mar 24, 2007, 6:20 PM

Post #4 of 6 (2095 views)
Permalink
Re: Problems with imdb.pl [In reply to]

Tamir Alush wrote:
> Running the IMDB script on a movie name which has more than one
> word in its title, gives out no results. I have to add a backslash
> (\) before the second and third words in order to get the IMDB
> title number in return. For example: "imdb.pl -M Running Scared"
> returns nothing, but if I type "imdb.pl -M Running\ Scared" I get
> the correct IMDB title number.

Hi there,

You're putting quotes around the command you tried when posting here
- have you tried using quotes in the command?

Does:

imdb.pl -M "Running Scared"

work?

This should tell the shell to pass "Running Scared" to imdb.pl as a
single parameter, rather than two separate ones.

Stroller



PS: When posting questions & answers to mailing lists I usually like
to use `single quotes` to indicate short commands. In longer output I
use a dollar or hash, like you'd see a shell offer if you started it
with the most simple environment.

EG:
$ whoami
stroller
$ su -
Password:
# whoami
root
#

I believe this is clearer because it's the same quotation syntax you
would use with the shell itself. For instance:
$ for foo in `cat movies.txt` ; do imdb.pl -M "$foo" ; done

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Mar 24, 2007, 7:54 PM

Post #5 of 6 (2068 views)
Permalink
Re: Problems with imdb.pl [In reply to]

On 03/24/2007 07:52 AM, Tamir Alush wrote:
> Running the IMDB script on a movie name which has more than one word
> in its title,
> gives out no results. I have to add a backslash (\) before the second
> and third words in order
> to get the IMDB title number in return.
> For example: "imdb.pl -M Running Scared" returns nothing, but if I
> type "imdb.pl -M Running\ Scared" I get the
> correct IMDB title number.
> When running the IMDB script from MythTV, I run "ps aux | grep imdb"
> and find that this is the way MythTV tries to retrieve
> movie information from IMDB using this script (my first example, that
> is...)
> I'm no coder, so I couldn't find the actual code in the script I
> should change in order to
> add a backslash to all second and third words. Is there a fix for that
> problem?

Backslash is only one way to prevent the shell from eating the space
(and using it to break words in the command line). They way MythVideo
runs the script works.

> Another problem I have is that I'm trying to find a way to run the
> IMDB script on my whole database automatically
> instead of a title-by-title method. Is there a solution for this?

http://svn.mythtv.org/trac/ticket/2734

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


tamiral at alush

Mar 25, 2007, 8:02 AM

Post #6 of 6 (2077 views)
Permalink
Problems with imdb.pl [In reply to]

OK,
Thanks for the quick response.

David Campbell, your'e right, your solution will do nothing more than
query IMDB
for my whole database. It won't add the query results to the database
itself.

Mike - thanks for the link, I will try that soon and update here.

In regards to my initial problem;

Stroller, the script works find your way, just like with the backslash
option, but it doesn't help me at all,
since I have to get MythTV itself to start searching IMDB titles that
way.

Again, I have no problem fetching IMDB titles manually, using either:
$imdb.pl -M "Running Scared" #(Stroller, good advice with the $... much
more readable), or:
$imdb.pl -M Running\ Scared
but that's not the way MythTV searches for IMDB titles using imdb.pl
I guess I have to change the script's code itself.

What I can't understand is how come this works for the rest of you...
Has anyone encountered that problem before and fixed it?

Thanks again,
Tamir.
Attachments: smime.p7s (1.90 KB)

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.