Opened 21 years ago
Closed 21 years ago
#857 closed patch (fixed)
Patch to mythrename.pl to work correctly with slave backends
| Reported by: | Owned by: | Isaac Richards | |
|---|---|---|---|
| Priority: | minor | Milestone: | unknown |
| Component: | mythtv | Version: | head |
| Severity: | low | Keywords: | |
| Cc: | Ticket locked: | no |
Description
This small patch updates mythrename.pl to use the hostname when deciding what records to process. I only use the --link option, so further testing may be required.
--- /usr/local/src/mythtv/contrib/mythrename.pl 2005-12-22 18:39:06.000000000 -0500
+++ mythrename.pl 2005-12-22 18:39:34.000000000 -0500
@@ -230,9 +230,9 @@
}
# Prepare a database queries
- $q = 'SELECT * FROM recorded';
+ $q = 'SELECT * FROM recorded WHERE hostname=?';
$sh = $dbh->prepare($q);
- $sh->execute() or die "Couldn't execute $q: $!\n";
+ $sh->execute($hostname) or die "Couldn't execute $q: $!\n";
# Only if we're renaming files
unless ($dest) {
I hope I formatted it correctly.
Tom
Attachments (1)
Change History (5)
comment:1 by , 21 years ago
by , 21 years ago
| Attachment: | mythrename-locally_accessible_files.patch added |
|---|
Attached patch for ease of access. Same as the patch Tom posted in his second comment.
comment:2 by , 21 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
Better (larger) patch to come.
comment:3 by , 21 years ago
| Resolution: | invalid |
|---|---|
| Status: | closed → reopened |
Reopening, and splitting up other patches for easier application. Please use the patch attached to this ticket by mtdean@….
Sorry for the flipping back and forth, it's my first patch.
Tom
Note:
See TracTickets
for help on using tickets.

A better patch from Mike Dean on the mailing list, that actually does what was intended. This supercedes my patch above.
Index: contrib/mythrename.pl =================================================================== --- contrib/mythrename.pl (revision 8364) +++ contrib/mythrename.pl (working copy) @@ -244,6 +244,7 @@ while (my $ref = $sh->fetchrow_hashref()) { my %info = %{$ref}; die "This script requires mythtv >= 0.19\n" unless ($info{'basename'}); + next unless (-e "$video_dir/".$info{'basename'}); # Default times my ($syear, $smonth, $sday, $shour, $sminute, $ssecond) = $info{'starttime'} =~ /(\d+)-(\d+)-(\d+)\s+(\d+):(\d+):(\d+)/; my ($eyear, $emonth, $eday, $ehour, $eminute, $esecond) = $info{'endtime'} =~ /(\d+)-(\d+)-(\d+)\s+(\d+):(\d+):(\d+)/;