Skip to content

Commit fb7a62f

Browse files
committed
Replace all db calls with the proper MythTV object parameter/methods. This closes #3201
1 parent 6051567 commit fb7a62f

File tree

22 files changed

+12
-169
lines changed

22 files changed

+12
-169
lines changed

nuvexport/export/NUV_SQL.pm

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package export::NUV_SQL;
1919
use nuv_export::shared_utils;
2020
use nuv_export::cli;
2121
use nuv_export::ui;
22-
use mythtv::db;
2322
use mythtv::recordings;
2423

2524
sub new {
@@ -109,7 +108,7 @@ package export::NUV_SQL;
109108
print DATA "USE mythconverg;\n\n";
110109
foreach $table ('recorded', 'oldrecorded', 'recordedmarkup', 'recordedseek') {
111110
$q = "SELECT * FROM $table WHERE chanid=? AND starttime=FROM_UNIXTIME(?)";
112-
$sh = $dbh->prepare($q);
111+
$sh = $Myth->{'dbh'}->prepare($q);
113112
$sh->execute($episode->{'chanid'}, $episode->{'starttime'})
114113
or die "Count not execute ($q): $!\n\n";
115114
my $count = 0;
@@ -146,17 +145,17 @@ package export::NUV_SQL;
146145
#
147146
# Remove the entry from recordedmarkup
148147
$q = 'DELETE FROM recordedmarkup WHERE chanid=? AND starttime=FROM_UNIXTIME(?)';
149-
$sh = $dbh->prepare($q);
148+
$sh = $Myth->{'dbh'}->prepare($q);
150149
$sh->execute($episode->{'chanid'}, $episode->{'starttime'})
151150
or die "Could not execute ($q): $!\n\n";
152151
# Remove this entry from the database
153152
$q = 'DELETE FROM recorded WHERE chanid=? AND starttime=FROM_UNIXTIME(?)';
154-
$sh = $dbh->prepare($q);
153+
$sh = $Myth->{'dbh'}->prepare($q);
155154
$sh->execute($episode->{'chanid'}, $episode->{'starttime'})
156155
or die "Could not execute ($q): $!\n\n";
157156
# Tell the other nodes that changes have been made
158157
$q = 'UPDATE settings SET data="yes" WHERE value="RecordChanged"';
159-
$sh = $dbh->prepare($q);
158+
$sh = $Myth->{'dbh'}->prepare($q);
160159
$sh->execute()
161160
or die "Could not execute ($q): $!\n\n";
162161
}

nuvexport/export/ffmpeg/ASF.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ package export::ffmpeg::ASF;
1414
use nuv_export::shared_utils;
1515
use nuv_export::cli;
1616
use nuv_export::ui;
17-
use mythtv::db;
1817
use mythtv::recordings;
1918

2019
# Load the following extra parameters from the commandline

nuvexport/export/ffmpeg/DVCD.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ package export::ffmpeg::DVCD;
1414
use nuv_export::shared_utils;
1515
use nuv_export::cli;
1616
use nuv_export::ui;
17-
use mythtv::db;
1817
use mythtv::recordings;
1918

2019
# Load the following extra parameters from the commandline

nuvexport/export/ffmpeg/DVD.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ package export::ffmpeg::DVD;
1414
use nuv_export::shared_utils;
1515
use nuv_export::cli;
1616
use nuv_export::ui;
17-
use mythtv::db;
1817
use mythtv::recordings;
1918

2019
# Load the following extra parameters from the commandline

nuvexport/export/ffmpeg/DivX.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ package export::ffmpeg::DivX;
1414
use nuv_export::shared_utils;
1515
use nuv_export::cli;
1616
use nuv_export::ui;
17-
use mythtv::db;
1817
use mythtv::recordings;
1918

2019
# Load the following extra parameters from the commandline

nuvexport/export/ffmpeg/MP3.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ package export::ffmpeg::MP3;
1414
use nuv_export::shared_utils;
1515
use nuv_export::cli;
1616
use nuv_export::ui;
17-
use mythtv::db;
1817
use mythtv::recordings;
1918

2019
# Load the following extra parameters from the commandline

nuvexport/export/ffmpeg/MP4.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ package export::ffmpeg::MP4;
2020
use nuv_export::shared_utils;
2121
use nuv_export::cli;
2222
use nuv_export::ui;
23-
use mythtv::db;
2423
use mythtv::recordings;
2524

2625
# Load the following extra parameters from the commandline

nuvexport/export/ffmpeg/PSP.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ package export::ffmpeg::PSP;
1515
use nuv_export::shared_utils;
1616
use nuv_export::cli;
1717
use nuv_export::ui;
18-
use mythtv::db;
1918
use mythtv::recordings;
2019

2120
# Load the following extra parameters from the commandline

nuvexport/export/ffmpeg/SVCD.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ package export::ffmpeg::SVCD;
1414
use nuv_export::shared_utils;
1515
use nuv_export::cli;
1616
use nuv_export::ui;
17-
use mythtv::db;
1817
use mythtv::recordings;
1918

2019
# Load the following extra parameters from the commandline

nuvexport/export/ffmpeg/VCD.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ package export::ffmpeg::VCD;
1414
use nuv_export::shared_utils;
1515
use nuv_export::cli;
1616
use nuv_export::ui;
17-
use mythtv::db;
1817
use mythtv::recordings;
1918

2019
# Load the following extra parameters from the commandline

0 commit comments

Comments
 (0)