From 488bb662f6d144d42376b3d14e9b1e438e00e6f8 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Fri, 28 Jan 2011 20:05:52 +0100 Subject: [PATCH] added dvd_nr to archive_backup_parts --- bin/BackupPC_ASA_BurnArchiveMedia | 3 +-- bin/BackupPC_ASA_SearchUpdate | 1 + lib/BackupPC/CGI/BurnMedia.pm | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/BackupPC_ASA_BurnArchiveMedia b/bin/BackupPC_ASA_BurnArchiveMedia index 24107cc..86f20e1 100755 --- a/bin/BackupPC_ASA_BurnArchiveMedia +++ b/bin/BackupPC_ASA_BurnArchiveMedia @@ -324,7 +324,7 @@ my $sth_archive_backup_parts = $dbh->prepare( qq{ items, filename FROM archive_backup_parts - WHERE archive.dvd_nr = ? + WHERE dvd_nr = ? ORDER BY backup_id, part_nr }); @@ -530,7 +530,6 @@ print "Recoding finished, exiting...\n"; $sth->finish; $sth_archive_backup_parts->finish; $sth_archive_burned->finish; -$sth_archive_backup_check->finish; $sth_archive_burned->finish; $dbh->disconnect; diff --git a/bin/BackupPC_ASA_SearchUpdate b/bin/BackupPC_ASA_SearchUpdate index 316b335..cb2dcd1 100755 --- a/bin/BackupPC_ASA_SearchUpdate +++ b/bin/BackupPC_ASA_SearchUpdate @@ -722,6 +722,7 @@ CREATE VIEW archive_backup_parts AS SELECT backup_parts.backup_id, archive_id, + dvd_nr, backup_part_id, hosts.name as host, shares.name as share, diff --git a/lib/BackupPC/CGI/BurnMedia.pm b/lib/BackupPC/CGI/BurnMedia.pm index c24a530..6b2870b 100644 --- a/lib/BackupPC/CGI/BurnMedia.pm +++ b/lib/BackupPC/CGI/BurnMedia.pm @@ -106,10 +106,9 @@ EOF select filename, part_nr, - TIMESTAMP 'epoch' + a.date * INTERVAL '1 second' as date, + TIMESTAMP 'epoch' + date * INTERVAL '1 second' as date, size - from archive_backup_parts a - join archive on archive_id = archive.id + from archive_backup_parts where dvd_nr = ? order by backup_part_id }); -- 2.20.1