@@ -40,7 +40,6 @@ package mythtv::recordings;
4040 add_arg(' date:s' , ' Date format used for human-readable dates.' );
4141
4242#
43- # load_recordings:
4443# Load all known recordings
4544#
4645 sub load_recordings {
@@ -63,7 +62,6 @@ package mythtv::recordings;
6362 # Try a basename file search
6463 my $rows ;
6564 $sh = $dbh -> prepare(' SELECT *, basename FROM recorded' );
66- die " nuvexport 0.3 requires MythTV 0.19\n " unless ($sh );
6765 $rows = $sh -> execute();
6866 if (defined $rows ) {
6967 while ($file = $sh -> fetchrow_hashref()) {
@@ -77,10 +75,9 @@ package mythtv::recordings;
7775 die " No valid recordings found!\n\n " unless (@files );
7876
7977 # Prepare a query to look up GOP info used to determine mpeg recording length
80- $q = ' SELECT MAX(mark) FROM recordedmarkup WHERE chanid=? AND starttime=?' ;
78+ $q = ' SELECT MAX(mark) FROM recordedseek WHERE chanid=? AND starttime=?' ;
8179 $sh = $dbh -> prepare($q );
82- $q2 = ' SELECT MAX(mark) FROM recordedseek WHERE chanid=? AND starttime=?' ;
83- $sh2 = $dbh -> prepare($q2 );
80+ die " nuvexport $VERSION requires MythTV 0.20\n " unless ($sh );
8481
8582 # Prepare a query to pull out cutlist information
8683 my $c_q = ' SELECT type, mark FROM recordedmarkup WHERE chanid=? AND starttime=? AND type IN (0,1) ORDER BY mark' ;
@@ -121,11 +118,6 @@ package mythtv::recordings;
121118 $sh -> execute($info {' chanid' }, $info {' starttime' })
122119 or die " Could not execute ($q ): $! \n\n " ;
123120 ($info {' last_frame' }) = $sh -> fetchrow_array();
124- if (!$info {' last_frame' } || $info {' last_frame' } < 1) {
125- $sh2 -> execute($info {' chanid' }, $info {' starttime' })
126- or die " Could not execute ($q ): $! \n\n " ;
127- ($info {' last_frame' }) = $sh2 -> fetchrow_array();
128- }
129121 # Cleanup
130122 $info {' starttime_sep' } = $info {' starttime' };
131123 $info {' starttime_sep' } =~ s /\D +/ -/ sg ;
@@ -186,7 +178,6 @@ package mythtv::recordings;
186178 }
187179
188180#
189- # generate_showtime:
190181# Returns a nicely-formatted timestamp from a specified time
191182#
192183 sub generate_showtime {
@@ -197,9 +188,7 @@ package mythtv::recordings;
197188 $day = int ($day );
198189 # Special datetime format?
199190 if ($showtime = arg(' date' )) {
200- # print "$year-$month-$day-$hour-$minute-$second -> ",ParseDate("$year-$month-$day $hour:$minute:$second"), "\n";
201191 $showtime = UnixDate(ParseDate(" $year -$month -$day $hour :$minute :$second " ), $showtime );
202- # print "$showtime\n";exit;
203192 }
204193 # Default to the standard
205194 else {
0 commit comments