mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-28 16:20:01 +02:00
* Fixed using resolv-hints for offline sources.
This commit is contained in:
@@ -37,14 +37,21 @@ DatabaseCommand_Resolve::exec( DatabaseImpl* lib )
|
||||
if ( !m.isEmpty() )
|
||||
{
|
||||
if ( m.value( "srcid" ).toUInt() > 0 )
|
||||
coll = SourceList::instance()->get( m.value( "srcid" ).toUInt() )->collection();
|
||||
{
|
||||
source_ptr s = SourceList::instance()->get( m.value( "srcid" ).toUInt() );
|
||||
if ( !s.isNull() )
|
||||
coll = s->collection();
|
||||
}
|
||||
else
|
||||
coll = SourceList::instance()->getLocal()->collection();
|
||||
|
||||
res << Tomahawk::result_ptr( new Tomahawk::Result( m, coll ) );
|
||||
emit results( qid, res );
|
||||
if ( !coll.isNull() )
|
||||
{
|
||||
res << Tomahawk::result_ptr( new Tomahawk::Result( m, coll ) );
|
||||
emit results( qid, res );
|
||||
|
||||
return;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -477,6 +477,7 @@ DatabaseImpl::result( const QString& url )
|
||||
{
|
||||
TomahawkSqlQuery query = newquery();
|
||||
Tomahawk::source_ptr s;
|
||||
QVariantMap m;
|
||||
QString fileUrl;
|
||||
|
||||
if ( url.contains( "servent://" ) )
|
||||
@@ -484,6 +485,9 @@ DatabaseImpl::result( const QString& url )
|
||||
QStringList parts = url.mid( QString( "servent://" ).length() ).split( "\t" );
|
||||
s = SourceList::instance()->get( parts.at( 0 ) );
|
||||
fileUrl = parts.at( 1 );
|
||||
|
||||
if ( s.isNull() )
|
||||
return m;
|
||||
}
|
||||
else if ( url.contains( "file://" ) )
|
||||
{
|
||||
@@ -518,7 +522,6 @@ DatabaseImpl::result( const QString& url )
|
||||
query.bindValue( 0, fileUrl );
|
||||
query.exec();
|
||||
|
||||
QVariantMap m;
|
||||
if( query.next() )
|
||||
{
|
||||
const QString url_str = query.value( 0 ).toString();
|
||||
|
Reference in New Issue
Block a user