1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-13 09:34:53 +02:00

Use hostname of resulthint for display

This commit is contained in:
Leo Franchi
2012-09-21 15:31:01 -04:00
parent 451d25c42f
commit 405864d4d9

View File

@@ -623,11 +623,12 @@ DatabaseImpl::resultFromHint( const Tomahawk::query_ptr& origquery )
res = Tomahawk::Result::get( url );
res->setRID( uuid() );
res->setScore( 1.0 );
res->setArtist( Tomahawk::Artist::get( artistId( origquery->artist(), true ), origquery->artist() ) );
res->setAlbum( Tomahawk::Album::get( albumId( res->artist()->id(), origquery->album(), true ), origquery->album(), res->artist() ) );
res->setArtist( Tomahawk::Artist::get( artistId( origquery->artist(), false ), origquery->artist() ) );
res->setAlbum( Tomahawk::Album::get( albumId( res->artist()->id(), origquery->album(), false ), origquery->album(), res->artist() ) );
res->setTrack( origquery->track() );
res->setDuration( origquery->duration() );
res->setFriendlySource( url );
const QUrl u = QUrl::fromUserInput( url );
res->setFriendlySource( u.host() );
return res;
}