Ticket #3426: mythtv-mythrename-use_recording_start_time.patch

File mythtv-mythrename-use_recording_start_time.patch, 1.2 KB (added by sphery <mtdean@…>, 13 years ago)
  • contrib/mythrename.pl

     
    273273                }
    274274                $name .= $suffix;
    275275            # Update the database
    276                 my $rows = $sh->execute($name, $show->{'chanid'}, $show->{'starttime'});
     276                my $rows = $sh->execute($name, $show->{'chanid'}, $show->{'recstartts'});
    277277                die "Couldn't update basename in database for ".$show->{'basename'}.":  ($q)\n" unless ($rows == 1);
    278278                my $ret = rename $show->{'local_path'}, "$video_dir/$name";
    279279            # Rename failed -- Move the database back to how it was (man, do I miss transactions)
    280280                if (!$ret) {
    281                     $rows = $sh->execute($show->{'basename'}, $show->{'chanid'}, $show->{'starttime'});
     281                    $rows = $sh->execute($show->{'basename'}, $show->{'chanid'}, $show->{'recstartts'});
    282282                    die "Couldn't restore original basename in database for ".$show->{'basename'}.":  ($q)\n" unless ($rows == 1);
    283283                }
    284284                vprint($show->{'basename'}."\t-> $name");