[% END %]
[% END %]
Index: server/scanner.pl
===================================================================
--- server/scanner.pl (revision 23121)
+++ server/scanner.pl (working copy)
@@ -160,8 +160,17 @@
# Take the db out of autocommit mode - this makes for a much faster scan.
Slim::Schema->storage->dbh->{'AutoCommit'} = 0;
+ my $scanType = 'SETUP_STANDARDRESCAN';
+
+ if ($wipe) {
+ $scanType = 'SETUP_WIPEDB';
+
+ } elsif ($playlists) {
+ $scanType = 'SETUP_PLAYLISTRESCAN';
+ }
+
# Flag the database as being scanned.
- Slim::Music::Import->setIsScanning(1);
+ Slim::Music::Import->setIsScanning($scanType);
if ($cleanup) {
Slim::Music::Import->cleanupDatabase(1);
Index: server/Slim/Music/Import.pm
===================================================================
--- server/Slim/Music/Import.pm (revision 23121)
+++ server/Slim/Music/Import.pm (working copy)
@@ -162,8 +162,17 @@
# Clear progress info so scan progress displays are blank
$class->clearProgressInfo;
+ my $scanType = 'SETUP_STANDARDRESCAN';
+
+ if ($args->{"wipe"}) {
+ $scanType = 'SETUP_WIPEDB';
+
+ } elsif ($args->{"playlists"}) {
+ $scanType = 'SETUP_PLAYLISTRESCAN';
+ }
+
# Update a DB flag, so the server knows we're scanning.
- $class->setIsScanning(1);
+ $class->setIsScanning($scanType);
# Set a timer to check on the scanning process.
Slim::Utils::Timers::setTimer(undef, (Time::HiRes::time() + 5), \&checkScanningStatus);
@@ -594,7 +603,7 @@
=head2 stillScanning( )
-Returns true if the server is still scanning your library. False otherwise.
+Returns scan type string token if the server is still scanning your library. False otherwise.
=cut
@@ -617,7 +626,7 @@
my $running = blessed($class->scanningProcess) && $class->scanningProcess->alive ? 1 : 0;
if ($running && $scanning) {
- return 1;
+ return $scanning;
}
return 0;