Ticket #3426: mythtv-mythrename-use_recording_start_time.patch
| File mythtv-mythrename-use_recording_start_time.patch, 1.2 KB (added by , 19 years ago) |
|---|
-
contrib/mythrename.pl
273 273 } 274 274 $name .= $suffix; 275 275 # Update the database 276 my $rows = $sh->execute($name, $show->{'chanid'}, $show->{' starttime'});276 my $rows = $sh->execute($name, $show->{'chanid'}, $show->{'recstartts'}); 277 277 die "Couldn't update basename in database for ".$show->{'basename'}.": ($q)\n" unless ($rows == 1); 278 278 my $ret = rename $show->{'local_path'}, "$video_dir/$name"; 279 279 # Rename failed -- Move the database back to how it was (man, do I miss transactions) 280 280 if (!$ret) { 281 $rows = $sh->execute($show->{'basename'}, $show->{'chanid'}, $show->{' starttime'});281 $rows = $sh->execute($show->{'basename'}, $show->{'chanid'}, $show->{'recstartts'}); 282 282 die "Couldn't restore original basename in database for ".$show->{'basename'}.": ($q)\n" unless ($rows == 1); 283 283 } 284 284 vprint($show->{'basename'}."\t-> $name");
