1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-08 07:07:05 +02:00

* Prevent DatabaseWorker from executing commands for offline sources.

This commit is contained in:
Christian Muehlhaeuser
2011-02-16 05:16:49 +01:00
parent 6b8a427602
commit 89b1936b6e
2 changed files with 49 additions and 45 deletions

View File

@@ -86,6 +86,8 @@ DatabaseWorker::doWork()
Q_UNUSED( transok ); Q_UNUSED( transok );
} }
try try
{
if ( !cmd->source().isNull() && !cmd->source()->collection().isNull() )
{ {
cmd->_exec( m_dbimpl ); // runs actual SQL stuff cmd->_exec( m_dbimpl ); // runs actual SQL stuff
@@ -146,6 +148,7 @@ DatabaseWorker::doWork()
cmd->postCommit(); cmd->postCommit();
//qDebug() << "Post commit finished for"<< cmd->commandname(); //qDebug() << "Post commit finished for"<< cmd->commandname();
} }
}
catch( const char * msg ) catch( const char * msg )
{ {
qDebug() << endl qDebug() << endl

View File

@@ -48,6 +48,7 @@ FuzzyIndex::beginIndexing()
try try
{ {
qDebug() << Q_FUNC_INFO << "Starting indexing.";
if ( m_luceneReader != 0 ) if ( m_luceneReader != 0 )
{ {
qDebug() << "Deleting old lucene stuff."; qDebug() << "Deleting old lucene stuff.";