outleradam Wrote:currently thetvdb.com is down.....
Code:
adam@adam-desktop:~$ /home/adam/Desktop/hdpvrcutter.pl "South Park" "Here Comes the Neighborhood"
Original airdate: 2001-11-28
Recorded Date: 2009-12-01
Searching THE-TV-DB for series 'South Park'
About to call GET HTTP url: 'http://www.thetvdb.com/api/GetSeries.php?seriesname=South Park'
Failed to get response! Status '500 Can't connect to www.thetvdb.com:80 (connect: timeout)'
Can not locate series 'South Park' in THE-TV-DB.
About to call GET HTTP url: 'http://www.thetvdb.com/api/GetEpisodeByAirDate.php?apikey=259FD33BA7C03A14&seriesid=&airdate=2001-11-28'
Failed to get response! Status '500 Can't connect to www.thetvdb.com:80 (connect: timeout)'
Use of uninitialized value $E in concatenation (.) or string at /home/adam/Desktop/hdpvrcutter.pl line 327.
2009-12-02 23:15:39.138 Illegal option: '--getcutlist-avidemux' (use --help)
mkvmerge v2.9.8 ('C'est le bon') built on Aug 19 2009 16:59:31
Error: The source file '/var/lib/mythtv/recordings/organized/South Park.SE.Here Comes the Neighborhood.avi' could not be opened successfully, or retrieving its size by seeking to the end did not work.
rm: cannot remove `/var/lib/mythtv/recordings1056_20091201200000.mpg.idx': No such file or directory
rm: cannot remove `/var/lib/mythtv/recordings/temp.proj': No such file or directory
rm: cannot remove `/var/lib/mythtv/recordings/organized/South Park.SE.Here Comes the Neighborhood.avi': No such file or directory
The reason the script is bailing on you (even when TVDB is up) is that you didn't patch mythcommflag, which the wiki lists as the first requirement. Since that's needed for transcoding and you're not going for that, you can just change the script and ignore that.
So go to the end and look at the last few lines:
Code:
exec "mythcommflag --getcutlist-avidemux -f \"$filename\" --outputfile \"$recordings_dir\"/temp.proj;
nice -n 9 avidemux2_cli --force-alt-h264 --autoindex --rebuild-index --nogui --force-smart --load \"$filename\" --run \"$recordings_dir\"/temp.proj --save \"$output_dir\"/\"$outfile\.avi\" --quit 2> /dev/null;
# Move the AVI file into a Matroska.
# Failure to do this will result in broken seeking.
mkvmerge -o \"$output_dir\"/\"$outfile\.mkv\" \"$output_dir\"/\"$outfile\.avi\";
# Do a little cleanup.
rm \"$filename\".idx \"$recordings_dir\"/temp.proj \"$output_dir\"/\"$outfile\.avi\""
This is the part that actually performs the file operation. For testing purposes, go ahead and remove these lines entirely and replace them with this:
Code:
exec "echo I would create a new file called: \"$output_dir\"/\"$outfile\.mpg\""
You can change the "mpg" to whatever file extension your source files are. This won't do anything to the filesystem, just tell you what it thinks the output file should be called. If this works (it should now that TVDB is back up), then you just need to decide whether you want to symlink to the original file, or actually change the name of the source file and use mythrename.pl to update the MythTV database with the new filename. Either method will require an extra line or two, but should be pretty easy.
One observation: my original application did not include modifying the mythconverg database, so the limitation regarding episodes that aired on the same day becomes more problematic in that case. If you simply symlinked the new file to the original, it would be trivial to manually change the filename in the case of an error. If you used mythrename.pl to change the Myth database, you'd also have to manually change the DB if/when this happens.