mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 13:47:26 +02:00
Only print every scanned file in the musicscan tool
This commit is contained in:
@@ -139,6 +139,7 @@ MusicScanner::MusicScanner( MusicScanner::ScanMode scanMode, const QStringList&
|
|||||||
, m_scanned( 0 )
|
, m_scanned( 0 )
|
||||||
, m_showProgress( true )
|
, m_showProgress( true )
|
||||||
, m_updateIndex( true )
|
, m_updateIndex( true )
|
||||||
|
, m_verbose( false )
|
||||||
, m_cmdQueue( 0 )
|
, m_cmdQueue( 0 )
|
||||||
, m_batchsize( bs )
|
, m_batchsize( bs )
|
||||||
, m_dirListerThreadController( 0 )
|
, m_dirListerThreadController( 0 )
|
||||||
@@ -189,6 +190,20 @@ MusicScanner::updatingIndex()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
MusicScanner::setVerbose( bool _verbose )
|
||||||
|
{
|
||||||
|
m_verbose = _verbose;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
MusicScanner::verbose()
|
||||||
|
{
|
||||||
|
return m_verbose;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MusicScanner::startScan()
|
MusicScanner::startScan()
|
||||||
{
|
{
|
||||||
@@ -452,6 +467,7 @@ MusicScanner::readFile( const QFileInfo& fi )
|
|||||||
if ( m_scanned )
|
if ( m_scanned )
|
||||||
if ( m_scanned % 3 == 0 && m_showProgress )
|
if ( m_scanned % 3 == 0 && m_showProgress )
|
||||||
SourceList::instance()->getLocal()->scanningProgress( m_scanned );
|
SourceList::instance()->getLocal()->scanningProgress( m_scanned );
|
||||||
|
if ( m_scanned % 100 == 0 || m_verbose )
|
||||||
tDebug( LOGINFO ) << "Scanning file:" << m_scanned << fi.canonicalFilePath();
|
tDebug( LOGINFO ) << "Scanning file:" << m_scanned << fi.canonicalFilePath();
|
||||||
|
|
||||||
if ( m.toMap().isEmpty() )
|
if ( m.toMap().isEmpty() )
|
||||||
|
@@ -116,6 +116,14 @@ public:
|
|||||||
void updateIndex( bool _updateIndex );
|
void updateIndex( bool _updateIndex );
|
||||||
bool updatingIndex();
|
bool updatingIndex();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adjust the verbosity of logging.
|
||||||
|
*
|
||||||
|
* For example in verbose mode we will log each file we have scanned.
|
||||||
|
*/
|
||||||
|
void setVerbose( bool _verbose );
|
||||||
|
bool verbose();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
//void fileScanned( QVariantMap );
|
//void fileScanned( QVariantMap );
|
||||||
void finished();
|
void finished();
|
||||||
@@ -144,6 +152,7 @@ private:
|
|||||||
unsigned int m_skipped;
|
unsigned int m_skipped;
|
||||||
bool m_showProgress;
|
bool m_showProgress;
|
||||||
bool m_updateIndex;
|
bool m_updateIndex;
|
||||||
|
bool m_verbose;
|
||||||
|
|
||||||
QList<QString> m_skippedFiles;
|
QList<QString> m_skippedFiles;
|
||||||
QMap<QString, QMap< unsigned int, unsigned int > > m_filemtimes;
|
QMap<QString, QMap< unsigned int, unsigned int > > m_filemtimes;
|
||||||
|
@@ -49,6 +49,7 @@ main( int argc, char* argv[] )
|
|||||||
// We want a dry-run of the scanner and not update any internal data.
|
// We want a dry-run of the scanner and not update any internal data.
|
||||||
scanner.showProgress( false );
|
scanner.showProgress( false );
|
||||||
scanner.updateIndex( false );
|
scanner.updateIndex( false );
|
||||||
|
scanner.setVerbose( true );
|
||||||
|
|
||||||
// Start the MusicScanner in its own thread
|
// Start the MusicScanner in its own thread
|
||||||
QThread scannerThread( 0 );
|
QThread scannerThread( 0 );
|
||||||
|
Reference in New Issue
Block a user