1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-18 23:09:42 +01:00

Reuse existing Track object

This commit is contained in:
Uwe L. Korn 2014-07-16 07:43:50 +01:00
parent 61381647df
commit d7abf8ec5b

View File

@ -139,13 +139,12 @@ DatabaseCommand_AllTracks::exec( DatabaseImpl* dbi )
url = QString( "servent://%1\t%2" ).arg( s->nodeId() ).arg( url );
Tomahawk::result_ptr result = Tomahawk::Result::get( url );
// This possibly creates a Track object and a Track Id worker, we all know this already!
Tomahawk::query_ptr qry = Tomahawk::Query::get( artist, track, album );
Tomahawk::track_ptr t = Tomahawk::Track::get( trackId,
artist, track, album,
duration, composer,
albumpos, discnumber );
Tomahawk::query_ptr qry = Tomahawk::Query::get( t );
if ( m_album || m_artist ) {
t->loadAttributes();
}