[mythtv-commits] Ticket #3201: Nuvexport error when running with arguments from cli

MythTV mythtv at cvs.mythtv.org
Mon Jul 9 18:45:44 UTC 2007


#3201: Nuvexport error when running with arguments from cli
------------------------------+---------------------------------------------
 Reporter:  anonymous         |        Owner:  xris    
     Type:  defect            |       Status:  reopened
 Priority:  minor             |    Milestone:  0.21    
Component:  perl / nuvexport  |      Version:  head    
 Severity:  medium            |   Resolution:          
  Mlocked:  0                 |  
------------------------------+---------------------------------------------
Changes (by anonymous):

  * status:  closed => reopened
  * resolution:  fixed =>


Comment:

 I still have the problem. I am invoking nuvexport with --infile
 /path/to/recordings/recording.extension following patch works:


 {{{
 Index: ui.pm
 ===================================================================
 --- ui.pm       (revision 13775)
 +++ ui.pm       (working copy)
 @@ -11,6 +11,7 @@
  package nuv_export::ui;

      use File::Path;
 +    use File::Basename;
      use English;

  # Load the myth and nuv utilities, and make sure we're connected to the
 database
 @@ -60,11 +61,11 @@
          # Filename specified on the command line -- extract the chanid
 and starttime
              if (arg('infile')) {
              # Try to pick out the chanid and starttime from the database
 -                my $sh = $Myth->{'dbh'}->prepare('SELECT chanid,
 UNIX_TIMESTAMP(starttime) FROM recorded WHERE basename=?');
 +                my $sh = $Main::Myth->{'dbh'}->prepare('SELECT chanid,
 UNIX_TIMESTAMP(starttime) FROM recorded WHERE basename=?');
                  if ($sh) {
                  # Stip off the video directory so the basename will
 actually match
                      my $infile = arg('infile');
 -                    $infile =~ s/^$video_dir\/*//;
 +                    $infile = basename($infile);
                  # Look up the file
                      $rows = $sh->execute($infile);
                      if (defined $rows) {
 @@ -86,7 +87,7 @@
              # Make sure the requested show exists
                  foreach my $show (sort keys %Shows) {
                      foreach my $episode (@{$Shows{$show}}) {
 -                        next unless ($chanid == $episode->{'channel'} &&
 $starttime == $episode->{'starttime'});
 +                        next unless ($chanid == $episode->{'chanid'} &&
 $starttime == $episode->{'starttime'});
                          load_finfo($episode);
                          push @matches, $episode;
                          last;
 }}}

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/3201#comment:2>
MythTV <http://svn.mythtv.org/trac>
MythTV


More information about the mythtv-commits mailing list