mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
Reuse existing Track object
This commit is contained in:
@@ -139,13 +139,12 @@ DatabaseCommand_AllTracks::exec( DatabaseImpl* dbi )
|
|||||||
url = QString( "servent://%1\t%2" ).arg( s->nodeId() ).arg( url );
|
url = QString( "servent://%1\t%2" ).arg( s->nodeId() ).arg( url );
|
||||||
|
|
||||||
Tomahawk::result_ptr result = Tomahawk::Result::get( 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,
|
Tomahawk::track_ptr t = Tomahawk::Track::get( trackId,
|
||||||
artist, track, album,
|
artist, track, album,
|
||||||
duration, composer,
|
duration, composer,
|
||||||
albumpos, discnumber );
|
albumpos, discnumber );
|
||||||
|
Tomahawk::query_ptr qry = Tomahawk::Query::get( t );
|
||||||
|
|
||||||
if ( m_album || m_artist ) {
|
if ( m_album || m_artist ) {
|
||||||
t->loadAttributes();
|
t->loadAttributes();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user