Opened 17 years ago
Closed 17 years ago
Last modified 17 years ago
#3201 closed defect (fixed)
Nuvexport error when running with arguments from cli
Reported by: | anonymous | Owned by: | xris |
---|---|---|---|
Priority: | minor | Milestone: | 0.21 |
Component: | perl / nuvexport | Version: | head |
Severity: | medium | Keywords: | nuvexport |
Cc: | Ticket locked: | no |
Description
When running nuvexport with --infile argument from cli I am getting this error: "Can't call method "prepare" on an undefined value at /usr/local/share/nuvexport/nuv_export/ui.pm line 63" Perl bindings need a protocol bump too. (32!=33).
Change History (6)
comment:1 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 17 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
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;
comment:3 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Note: See
TracTickets for help on using
tickets.
(In [13030]) Replace all db calls with the proper MythTV object parameter/methods. This closes #3201