Sign Up!
Login

Welcome to Monopedilos
Sunday, September 05 2010 @ 01:00 AM CDT

 

Differences

This shows you the differences between two versions of the page.

hdpvrcutter.pl [2009/05/16 18:09]
theophile
hdpvrcutter.pl [2009/05/30 10:51] (current)
theophile
Line 78: Line 78:
#    hdpvrcutter %TITLE% %SUBTITLE% #    hdpvrcutter %TITLE% %SUBTITLE%
# #
 +
 +### Version 0.2 - 5/30/09
 +#  - Strip apostrophes when querying TVDB
 +
 +### VERSION 0.1
 +#  - Initial release
use LWP::UserAgent; use LWP::UserAgent;
Line 88: Line 94:
$mysql_host = 'localhost'; $mysql_host = 'localhost';
$mysql_db = 'mythconverg'; $mysql_db = 'mythconverg';
-$mysql_user = 'mythtv'; +$mysql_user = 'USER'; 
-$mysql_password = 'mythtv';+$mysql_password = 'PASSWORD';
## Leave everything below this line alone unless you know what you are doing! ## Leave everything below this line alone unless you know what you are doing!
Line 99: Line 105:
$subtitle = $ARGV[1]; $subtitle = $ARGV[1];
$progname =~ s/\'/\\'/g; # SQL doesn't like apostrophes $progname =~ s/\'/\\'/g; # SQL doesn't like apostrophes
-$subtitle =~ s/\'/\\'/g;+$subtitle =~ s /\'/\\'/g
 + 
 +#print "$progname\n";
$fileinfo = `mysql -h $mysql_host -D $mysql_db -u $mysql_user --password=$mysql_password -r -s --skip-column-names -e \"select chanid,starttime,endtime,originalairdate from recorded where title like \'$progname\' and subtitle like \'$subtitle\'\" | head -n 1`; $fileinfo = `mysql -h $mysql_host -D $mysql_db -u $mysql_user --password=$mysql_password -r -s --skip-column-names -e \"select chanid,starttime,endtime,originalairdate from recorded where title like \'$progname\' and subtitle like \'$subtitle\'\" | head -n 1`;
 +
 +$progname =~ s/\\'//g; # TVDB doesn't like apostrophes either
 +$subtitle =~ s/\\'//g;
 +
 +#print "$progname\n";
 +#exit;
@infoparts = split(/\t/, $fileinfo); @infoparts = split(/\t/, $fileinfo);
 
Logged in as: Guest (Guest)
hdpvrcutter.pl.txt · Last modified: 2009/05/30 10:51 by theophile
 
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2