mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 22:56:42 +02:00
Some refactoring, and allow running scans on specific files only.
This commit is contained in:
@@ -72,19 +72,19 @@ DirLister::scanDir( QDir dir, int depth )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QFileInfoList dirs;
|
QFileInfoList filteredEntries;
|
||||||
|
|
||||||
dir.setFilter( QDir::Files | QDir::Readable | QDir::NoDotAndDotDot );
|
dir.setFilter( QDir::Files | QDir::Readable | QDir::NoDotAndDotDot );
|
||||||
dir.setSorting( QDir::Name );
|
dir.setSorting( QDir::Name );
|
||||||
dirs = dir.entryInfoList();
|
filteredEntries = dir.entryInfoList();
|
||||||
|
|
||||||
foreach ( const QFileInfo& di, dirs )
|
foreach ( const QFileInfo& di, filteredEntries )
|
||||||
emit fileToScan( di );
|
emit fileToScan( di );
|
||||||
|
|
||||||
dir.setFilter( QDir::Dirs | QDir::Readable | QDir::NoDotAndDotDot );
|
dir.setFilter( QDir::Dirs | QDir::Readable | QDir::NoDotAndDotDot );
|
||||||
dirs = dir.entryInfoList();
|
filteredEntries = dir.entryInfoList();
|
||||||
|
|
||||||
foreach ( const QFileInfo& di, dirs )
|
foreach ( const QFileInfo& di, filteredEntries )
|
||||||
{
|
{
|
||||||
const QString canonical = di.canonicalFilePath();
|
const QString canonical = di.canonicalFilePath();
|
||||||
m_opcount++;
|
m_opcount++;
|
||||||
@@ -100,9 +100,10 @@ DirLister::scanDir( QDir dir, int depth )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MusicScanner::MusicScanner( const QStringList& dirs, quint32 bs )
|
MusicScanner::MusicScanner( ScanManager::ScanMode scanMode, const QStringList& paths, quint32 bs )
|
||||||
: QObject()
|
: QObject()
|
||||||
, m_dirs( dirs )
|
, m_scanMode( scanMode )
|
||||||
|
, m_paths( paths )
|
||||||
, m_batchsize( bs )
|
, m_batchsize( bs )
|
||||||
, m_dirListerThreadController( 0 )
|
, m_dirListerThreadController( 0 )
|
||||||
{
|
{
|
||||||
@@ -175,9 +176,15 @@ MusicScanner::scan()
|
|||||||
connect( this, SIGNAL( batchReady( QVariantList, QVariantList ) ),
|
connect( this, SIGNAL( batchReady( QVariantList, QVariantList ) ),
|
||||||
SLOT( commitBatch( QVariantList, QVariantList ) ), Qt::DirectConnection );
|
SLOT( commitBatch( QVariantList, QVariantList ) ), Qt::DirectConnection );
|
||||||
|
|
||||||
|
if ( m_scanMode == ScanManager::FileScan )
|
||||||
|
{
|
||||||
|
scanFilePaths();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_dirListerThreadController = new QThread( this );
|
m_dirListerThreadController = new QThread( this );
|
||||||
|
|
||||||
m_dirLister = QWeakPointer< DirLister >( new DirLister( m_dirs ) );
|
m_dirLister = QWeakPointer< DirLister >( new DirLister( m_paths ) );
|
||||||
m_dirLister.data()->moveToThread( m_dirListerThreadController );
|
m_dirLister.data()->moveToThread( m_dirListerThreadController );
|
||||||
|
|
||||||
connect( m_dirLister.data(), SIGNAL( fileToScan( QFileInfo ) ),
|
connect( m_dirLister.data(), SIGNAL( fileToScan( QFileInfo ) ),
|
||||||
@@ -185,7 +192,7 @@ MusicScanner::scan()
|
|||||||
|
|
||||||
// queued, so will only fire after all dirs have been scanned:
|
// queued, so will only fire after all dirs have been scanned:
|
||||||
connect( m_dirLister.data(), SIGNAL( finished() ),
|
connect( m_dirLister.data(), SIGNAL( finished() ),
|
||||||
SLOT( listerFinished() ), Qt::QueuedConnection );
|
SLOT( postOps() ), Qt::QueuedConnection );
|
||||||
|
|
||||||
m_dirListerThreadController->start( QThread::IdlePriority );
|
m_dirListerThreadController->start( QThread::IdlePriority );
|
||||||
QMetaObject::invokeMethod( m_dirLister.data(), "go" );
|
QMetaObject::invokeMethod( m_dirLister.data(), "go" );
|
||||||
@@ -193,13 +200,30 @@ MusicScanner::scan()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MusicScanner::listerFinished()
|
MusicScanner::scanFilePaths()
|
||||||
|
{
|
||||||
|
tDebug( LOGVERBOSE ) << Q_FUNC_INFO;
|
||||||
|
foreach( QString path, m_paths )
|
||||||
|
{
|
||||||
|
QFileInfo fi( path );
|
||||||
|
if ( fi.exists() && fi.isReadable() )
|
||||||
|
scanFile( fi );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
MusicScanner::postOps()
|
||||||
{
|
{
|
||||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO;
|
tDebug( LOGVERBOSE ) << Q_FUNC_INFO;
|
||||||
|
|
||||||
// any remaining stuff that wasnt emitted as a batch:
|
if ( m_scanMode == ScanManager::DirScan )
|
||||||
foreach( const QString& key, m_filemtimes.keys() )
|
{
|
||||||
m_filesToDelete << m_filemtimes[ key ].keys().first();
|
// any remaining stuff that wasnt emitted as a batch:
|
||||||
|
foreach( const QString& key, m_filemtimes.keys() )
|
||||||
|
m_filesToDelete << m_filemtimes[ key ].keys().first();
|
||||||
|
}
|
||||||
|
|
||||||
tDebug( LOGINFO ) << "Scanning complete, saving to database. ( deleted" << m_filesToDelete.count() << "- scanned" << m_scanned << "- skipped" << m_skipped << ")";
|
tDebug( LOGINFO ) << "Scanning complete, saving to database. ( deleted" << m_filesToDelete.count() << "- scanned" << m_scanned << "- skipped" << m_skipped << ")";
|
||||||
tDebug( LOGEXTRA ) << "Skipped the following files (no tags / no valid audio):";
|
tDebug( LOGEXTRA ) << "Skipped the following files (no tags / no valid audio):";
|
||||||
|
@@ -23,6 +23,8 @@
|
|||||||
#include "TomahawkSettings.h"
|
#include "TomahawkSettings.h"
|
||||||
#include "database/DatabaseCommand.h"
|
#include "database/DatabaseCommand.h"
|
||||||
|
|
||||||
|
#include "ScanManager.h"
|
||||||
|
|
||||||
/* taglib */
|
/* taglib */
|
||||||
#include <taglib/fileref.h>
|
#include <taglib/fileref.h>
|
||||||
#include <taglib/tag.h>
|
#include <taglib/tag.h>
|
||||||
@@ -83,7 +85,7 @@ class MusicScanner : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MusicScanner( const QStringList& dirs, quint32 bs = 0 );
|
MusicScanner( ScanManager::ScanMode scanMode, const QStringList& paths, quint32 bs = 0 );
|
||||||
~MusicScanner();
|
~MusicScanner();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
@@ -96,7 +98,7 @@ private:
|
|||||||
void executeCommand( QSharedPointer< DatabaseCommand > cmd );
|
void executeCommand( QSharedPointer< DatabaseCommand > cmd );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void listerFinished();
|
void postOps();
|
||||||
void scanFile( const QFileInfo& fi );
|
void scanFile( const QFileInfo& fi );
|
||||||
void setFileMtimes( const QMap< QString, QMap< unsigned int, unsigned int > >& m );
|
void setFileMtimes( const QMap< QString, QMap< unsigned int, unsigned int > >& m );
|
||||||
void startScan();
|
void startScan();
|
||||||
@@ -106,7 +108,10 @@ private slots:
|
|||||||
void commandFinished();
|
void commandFinished();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QStringList m_dirs;
|
void scanFilePaths();
|
||||||
|
|
||||||
|
ScanManager::ScanMode m_scanMode;
|
||||||
|
QStringList m_paths;
|
||||||
QMap<QString, QString> m_ext2mime; // eg: mp3 -> audio/mpeg
|
QMap<QString, QString> m_ext2mime; // eg: mp3 -> audio/mpeg
|
||||||
unsigned int m_scanned;
|
unsigned int m_scanned;
|
||||||
unsigned int m_skipped;
|
unsigned int m_skipped;
|
||||||
|
@@ -48,6 +48,7 @@ ScanManager::ScanManager( QObject* parent )
|
|||||||
: QObject( parent )
|
: QObject( parent )
|
||||||
, m_musicScannerThreadController( 0 )
|
, m_musicScannerThreadController( 0 )
|
||||||
, m_currScannerPaths()
|
, m_currScannerPaths()
|
||||||
|
, m_cachedScannerDirs()
|
||||||
{
|
{
|
||||||
s_instance = this;
|
s_instance = this;
|
||||||
|
|
||||||
@@ -60,7 +61,7 @@ ScanManager::ScanManager( QObject* parent )
|
|||||||
|
|
||||||
if ( TomahawkSettings::instance()->hasScannerPaths() )
|
if ( TomahawkSettings::instance()->hasScannerPaths() )
|
||||||
{
|
{
|
||||||
m_currScannerPaths = TomahawkSettings::instance()->scannerPaths();
|
m_cachedScannerDirs = TomahawkSettings::instance()->scannerPaths();
|
||||||
m_scanTimer->start();
|
m_scanTimer->start();
|
||||||
if ( TomahawkSettings::instance()->watchForChanges() )
|
if ( TomahawkSettings::instance()->watchForChanges() )
|
||||||
QTimer::singleShot( 1000, this, SLOT( runStartupScan() ) );
|
QTimer::singleShot( 1000, this, SLOT( runStartupScan() ) );
|
||||||
@@ -94,10 +95,10 @@ ScanManager::onSettingsChanged()
|
|||||||
m_scanTimer->setInterval( TomahawkSettings::instance()->scannerTime() * 1000 );
|
m_scanTimer->setInterval( TomahawkSettings::instance()->scannerTime() * 1000 );
|
||||||
|
|
||||||
if ( TomahawkSettings::instance()->hasScannerPaths() &&
|
if ( TomahawkSettings::instance()->hasScannerPaths() &&
|
||||||
m_currScannerPaths != TomahawkSettings::instance()->scannerPaths() )
|
m_cachedScannerDirs != TomahawkSettings::instance()->scannerPaths() )
|
||||||
{
|
{
|
||||||
m_currScannerPaths = TomahawkSettings::instance()->scannerPaths();
|
m_cachedScannerDirs = TomahawkSettings::instance()->scannerPaths();
|
||||||
runScan();
|
runNormalScan();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( TomahawkSettings::instance()->watchForChanges() && !m_scanTimer->isActive() )
|
if ( TomahawkSettings::instance()->watchForChanges() && !m_scanTimer->isActive() )
|
||||||
@@ -112,7 +113,7 @@ ScanManager::runStartupScan()
|
|||||||
if ( !Database::instance() || ( Database::instance() && !Database::instance()->isReady() ) )
|
if ( !Database::instance() || ( Database::instance() && !Database::instance()->isReady() ) )
|
||||||
QTimer::singleShot( 1000, this, SLOT( runStartupScan() ) );
|
QTimer::singleShot( 1000, this, SLOT( runStartupScan() ) );
|
||||||
else
|
else
|
||||||
runScan();
|
runNormalScan();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -125,25 +126,42 @@ ScanManager::scanTimerTimeout()
|
|||||||
( Database::instance() && !Database::instance()->isReady() ) )
|
( Database::instance() && !Database::instance()->isReady() ) )
|
||||||
return;
|
return;
|
||||||
else
|
else
|
||||||
runScan();
|
runNormalScan();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ScanManager::runFullRescan()
|
||||||
|
{
|
||||||
|
runNormalScan( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
ScanManager::runScan( bool manualFull )
|
|
||||||
{
|
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
if ( !Database::instance() || ( Database::instance() && !Database::instance()->isReady() ) )
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ( !m_musicScannerThreadController && m_scanner.isNull() ) //still running if these are not zero
|
bool
|
||||||
|
ScanManager::runNormalScan( bool manualFull )
|
||||||
|
{
|
||||||
|
tDebug( LOGVERBOSE ) << Q_FUNC_INFO;
|
||||||
|
|
||||||
|
if ( !Database::instance() || ( Database::instance() && !Database::instance()->isReady() ) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ( m_musicScannerThreadController || !m_scanner.isNull() ) //still running if these are not zero
|
||||||
{
|
{
|
||||||
|
tDebug( LOGVERBOSE ) << "Could not run dir scan, old scan still running";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_scanTimer->stop();
|
||||||
|
m_musicScannerThreadController = new QThread( this );
|
||||||
|
m_currScanMode = DirScan;
|
||||||
|
|
||||||
if ( manualFull )
|
if ( manualFull )
|
||||||
{
|
{
|
||||||
DatabaseCommand_DeleteFiles *cmd = new DatabaseCommand_DeleteFiles( SourceList::instance()->getLocal() );
|
DatabaseCommand_DeleteFiles *cmd = new DatabaseCommand_DeleteFiles( SourceList::instance()->getLocal() );
|
||||||
connect( cmd, SIGNAL( finished() ), SLOT( filesDeleted() ) );
|
connect( cmd, SIGNAL( finished() ), SLOT( filesDeleted() ) );
|
||||||
Database::instance()->enqueue( QSharedPointer< DatabaseCommand >( cmd ) );
|
Database::instance()->enqueue( QSharedPointer< DatabaseCommand >( cmd ) );
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
DatabaseCommand_FileMtimes *cmd = new DatabaseCommand_FileMtimes( true );
|
DatabaseCommand_FileMtimes *cmd = new DatabaseCommand_FileMtimes( true );
|
||||||
@@ -152,18 +170,41 @@ ScanManager::runScan( bool manualFull )
|
|||||||
|
|
||||||
Database::instance()->enqueue( QSharedPointer< DatabaseCommand >( cmd ) );
|
Database::instance()->enqueue( QSharedPointer< DatabaseCommand >( cmd ) );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
return true;
|
||||||
qDebug() << "Could not run dir scan, old scan still running";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
ScanManager::runFileScan( const QStringList &paths )
|
||||||
|
{
|
||||||
|
tDebug( LOGVERBOSE ) << Q_FUNC_INFO;
|
||||||
|
|
||||||
|
if ( !Database::instance() || ( Database::instance() && !Database::instance()->isReady() ) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ( m_musicScannerThreadController || !m_scanner.isNull() ) //still running if these are not zero
|
||||||
|
{
|
||||||
|
tDebug( LOGVERBOSE ) << "Could not run file scan, old scan still running";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_scanTimer->stop();
|
||||||
|
m_musicScannerThreadController = new QThread( this );
|
||||||
|
m_currScannerPaths = paths;
|
||||||
|
m_currScanMode = FileScan;
|
||||||
|
|
||||||
|
QMetaObject::invokeMethod( this, "runScan", Qt::QueuedConnection );
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ScanManager::fileMtimesCheck( const QMap< QString, QMap< unsigned int, unsigned int > >& mtimes )
|
ScanManager::fileMtimesCheck( const QMap< QString, QMap< unsigned int, unsigned int > >& mtimes )
|
||||||
{
|
{
|
||||||
if ( !mtimes.isEmpty() && TomahawkSettings::instance()->scannerPaths().isEmpty() )
|
if ( !mtimes.isEmpty() && m_currScanMode == DirScan && TomahawkSettings::instance()->scannerPaths().isEmpty() )
|
||||||
{
|
{
|
||||||
DatabaseCommand_DeleteFiles *cmd = new DatabaseCommand_DeleteFiles( SourceList::instance()->getLocal() );
|
DatabaseCommand_DeleteFiles *cmd = new DatabaseCommand_DeleteFiles( SourceList::instance()->getLocal() );
|
||||||
connect( cmd, SIGNAL( finished() ), SLOT( filesDeleted() ) );
|
connect( cmd, SIGNAL( finished() ), SLOT( filesDeleted() ) );
|
||||||
@@ -171,7 +212,7 @@ ScanManager::fileMtimesCheck( const QMap< QString, QMap< unsigned int, unsigned
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
runDirScan();
|
QMetaObject::invokeMethod( this, "runScan", Qt::QueuedConnection );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -179,24 +220,22 @@ void
|
|||||||
ScanManager::filesDeleted()
|
ScanManager::filesDeleted()
|
||||||
{
|
{
|
||||||
if ( !TomahawkSettings::instance()->scannerPaths().isEmpty() )
|
if ( !TomahawkSettings::instance()->scannerPaths().isEmpty() )
|
||||||
runDirScan();
|
QMetaObject::invokeMethod( this, "runScan", Qt::QueuedConnection );
|
||||||
else
|
else
|
||||||
scannerFinished();
|
scannerFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ScanManager::runDirScan()
|
ScanManager::runScan()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
|
|
||||||
QStringList paths = TomahawkSettings::instance()->scannerPaths();
|
QStringList paths = m_currScannerPaths.empty() ? TomahawkSettings::instance()->scannerPaths() : m_currScannerPaths;
|
||||||
|
|
||||||
if ( !m_musicScannerThreadController && m_scanner.isNull() ) //still running if these are not zero
|
if ( !m_musicScannerThreadController && m_scanner.isNull() ) //still running if these are not zero
|
||||||
{
|
{
|
||||||
m_scanTimer->stop();
|
m_scanner = QWeakPointer< MusicScanner >( new MusicScanner( m_currScanMode, paths ) );
|
||||||
m_musicScannerThreadController = new QThread( this );
|
|
||||||
m_scanner = QWeakPointer< MusicScanner >( new MusicScanner( paths ) );
|
|
||||||
m_scanner.data()->moveToThread( m_musicScannerThreadController );
|
m_scanner.data()->moveToThread( m_musicScannerThreadController );
|
||||||
connect( m_scanner.data(), SIGNAL( finished() ), SLOT( scannerFinished() ) );
|
connect( m_scanner.data(), SIGNAL( finished() ), SLOT( scannerFinished() ) );
|
||||||
m_musicScannerThreadController->start( QThread::IdlePriority );
|
m_musicScannerThreadController->start( QThread::IdlePriority );
|
||||||
@@ -204,8 +243,7 @@ ScanManager::runDirScan()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << "Could not run dir scan, old scan still running";
|
QTimer::singleShot( 200, this, SLOT( runScan() ) );
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,6 +263,7 @@ ScanManager::scannerFinished()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_scanTimer->start();
|
m_scanTimer->start();
|
||||||
|
m_currScannerPaths = QStringList();
|
||||||
SourceList::instance()->getLocal()->scanningFinished( 0 );
|
SourceList::instance()->getLocal()->scanningFinished( 0 );
|
||||||
emit finished();
|
emit finished();
|
||||||
}
|
}
|
||||||
|
@@ -39,6 +39,8 @@ class ScanManager : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
enum ScanMode { DirScan, FileScan };
|
||||||
|
|
||||||
static ScanManager* instance();
|
static ScanManager* instance();
|
||||||
|
|
||||||
explicit ScanManager( QObject* parent = 0 );
|
explicit ScanManager( QObject* parent = 0 );
|
||||||
@@ -48,13 +50,15 @@ signals:
|
|||||||
void finished();
|
void finished();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void runScan( bool manualFull = false );
|
bool runFileScan( const QStringList &paths );
|
||||||
void runDirScan();
|
void runFullRescan();
|
||||||
|
bool runNormalScan( bool manualFull = false );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void scannerFinished();
|
|
||||||
|
|
||||||
void runStartupScan();
|
void runStartupScan();
|
||||||
|
void runScan();
|
||||||
|
|
||||||
|
void scannerFinished();
|
||||||
void scanTimerTimeout();
|
void scanTimerTimeout();
|
||||||
|
|
||||||
void onSettingsChanged();
|
void onSettingsChanged();
|
||||||
@@ -65,9 +69,11 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
static ScanManager* s_instance;
|
static ScanManager* s_instance;
|
||||||
|
|
||||||
|
ScanMode m_currScanMode;
|
||||||
QWeakPointer< MusicScanner > m_scanner;
|
QWeakPointer< MusicScanner > m_scanner;
|
||||||
QThread* m_musicScannerThreadController;
|
QThread* m_musicScannerThreadController;
|
||||||
QStringList m_currScannerPaths;
|
QStringList m_currScannerPaths;
|
||||||
|
QStringList m_cachedScannerDirs;
|
||||||
|
|
||||||
QTimer* m_scanTimer;
|
QTimer* m_scanTimer;
|
||||||
};
|
};
|
||||||
|
@@ -319,7 +319,7 @@ TomahawkApp::init()
|
|||||||
|
|
||||||
if ( arguments().contains( "--filescan" ) )
|
if ( arguments().contains( "--filescan" ) )
|
||||||
{
|
{
|
||||||
m_scanManager.data()->runScan( true );
|
m_scanManager.data()->runFullRescan();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set up echonest catalog synchronizer
|
// Set up echonest catalog synchronizer
|
||||||
|
@@ -533,7 +533,7 @@ void
|
|||||||
TomahawkWindow::updateCollectionManually()
|
TomahawkWindow::updateCollectionManually()
|
||||||
{
|
{
|
||||||
if ( TomahawkSettings::instance()->hasScannerPaths() )
|
if ( TomahawkSettings::instance()->hasScannerPaths() )
|
||||||
ScanManager::instance()->runScan();
|
ScanManager::instance()->runNormalScan();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -541,7 +541,7 @@ void
|
|||||||
TomahawkWindow::rescanCollectionManually()
|
TomahawkWindow::rescanCollectionManually()
|
||||||
{
|
{
|
||||||
if ( TomahawkSettings::instance()->hasScannerPaths() )
|
if ( TomahawkSettings::instance()->hasScannerPaths() )
|
||||||
ScanManager::instance()->runScan( true );
|
ScanManager::instance()->runFullRescan();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user