mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 21:57:41 +02:00
* Fixed two bugs I introduced with my last commit.
This commit is contained in:
@@ -173,7 +173,7 @@ DatabaseCommand_Resolve::resolve( DatabaseImpl* lib )
|
|||||||
|
|
||||||
float score = how_similar( m_query, result );
|
float score = how_similar( m_query, result );
|
||||||
result->setScore( score );
|
result->setScore( score );
|
||||||
if ( m_query->fullTextQuery().isEmpty() && score < MINSCORE )
|
if ( score < MINSCORE )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
result->setCollection( s->collection() );
|
result->setCollection( s->collection() );
|
||||||
|
@@ -50,7 +50,7 @@ DatabaseImpl::DatabaseImpl( const QString& dbname, Database* parent )
|
|||||||
bool schemaUpdated = false;
|
bool schemaUpdated = false;
|
||||||
int version = getDatabaseVersion( dbname );
|
int version = getDatabaseVersion( dbname );
|
||||||
|
|
||||||
if ( version != CURRENT_SCHEMA_VERSION )
|
if ( version > 0 && version != CURRENT_SCHEMA_VERSION )
|
||||||
{
|
{
|
||||||
QString newname = QString( "%1.v%2" ).arg( dbname ).arg( version );
|
QString newname = QString( "%1.v%2" ).arg( dbname ).arg( version );
|
||||||
qDebug() << endl << "****************************" << endl;
|
qDebug() << endl << "****************************" << endl;
|
||||||
@@ -87,6 +87,7 @@ DatabaseImpl::DatabaseImpl( const QString& dbname, Database* parent )
|
|||||||
throw "failed to open db"; // TODO
|
throw "failed to open db"; // TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( version < 0 )
|
||||||
schemaUpdated = updateSchema( 0 );
|
schemaUpdated = updateSchema( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user