[mythtv] mythmkmovie 0.9
Christopher Maahs
cmaahs at eatenbygrue.com
Thu Jun 12 15:16:58 EDT 2003
On Thu, 12 Jun 2003, Michael Pedersen wrote:
> | I made a few modifications in which I insert into the videometadata table
> | information about the show being mkmovie'ized, so that it was there
> | when I pulled up MythVideo.
>
> Really? I'm not sure I follow what you mean. Would you mind explaining
> that better? I might be able to throw that info into the table for you
> from within mkmovie, if desired.
Yes, I did it withing mkmovie, actually for my quick fix, I just wrote it
to the database during the 'O' filename assignment operation, of course a
better bet would be to loop through all the ones flagged for re-encoding
when the 'E' begin option was selected.
Here is the quick patch:
+++ mkmovie 2003-06-12 07:08:07.000000000 -0500
@@ -949,7 +954,7 @@
$substh->finish();
$sth->finish();
$sth = $dbh->prepare("select chanid, starttime, endtime, title, "
.
- "subtitle, cutlist from recorded order by title, chanid,
starttime");
+ "subtitle, cutlist, description from recorded order by
title, chanid, starttime");
$substh = $dbh->prepare("select chanid, starttime, endtime, " .
"output, vbr, abr, keyint, transcode from archival where
chanid=? and " .
"starttime=? and endtime=?");
@@ -959,7 +964,7 @@
@temp = ($substh->rows) ? $substh->fetchrow_array() : ();
@shows[$#shows+1] = join("|||", $vals[0], $vals[1],
$vals[2],
$vals[3], $vals[4], ($vals[5] ? "C" : ""),
- $temp[3], $temp[4], $temp[5], $temp[6], $temp[7]);
+ $temp[3], $temp[4], $temp[5], $temp[6], $temp[7],
$vals[6]);
}
return(@shows);
}
@@ -1132,6 +1137,13 @@
$changed = 0;
if (($key eq 'O') or ($key eq 'o')) {
$vals[6] = getinput ($LINES-1, 0, "Enter Output
Filename:", $vals[6], '[A-Za-z0-9\-_/\.]+');
+#Database Stuff
+ $dbh->do('delete from videometadata where
filename="' . $vals[6] . '"');
+ $sth = $dbh->prepare("insert into videometadata
(title, plot, rating, filename) values (?, ?, ?, ?)");
+ my($show_title) = "$vals[3] ($vals[4])";
+ $sth->execute($show_title, $vals[11], 1,
$vals[6]);
+ $sth->finish();
+#Database Stuff
$changed = 1;
}
if (($key eq 'V') or ($key eq 'v')) {
More information about the mythtv-dev
mailing list