1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-13 20:39:57 +01:00

Use the query that was used to play the track in AudioEngine

This commit is contained in:
Leo Franchi 2012-07-29 22:44:57 -04:00
parent bfb10e385f
commit 8e7c9d8130
2 changed files with 6 additions and 6 deletions

View File

@ -575,7 +575,7 @@ AudioEngine::loadNextTrack()
void
AudioEngine::playItem( Tomahawk::playlistinterface_ptr playlist, const Tomahawk::result_ptr& result )
AudioEngine::playItem( Tomahawk::playlistinterface_ptr playlist, const Tomahawk::result_ptr& result, const Tomahawk::query_ptr& fromQuery )
{
tDebug( LOGEXTRA ) << Q_FUNC_INFO << ( result.isNull() ? QString() : result->url() );
@ -584,8 +584,8 @@ AudioEngine::playItem( Tomahawk::playlistinterface_ptr playlist, const Tomahawk:
setPlaylist( playlist );
if ( playlist.isNull() )
m_currentTrackPlaylist = playlistinterface_ptr( new SingleTrackPlaylistInterface( result->toQuery() ) );
if ( playlist.isNull() && !fromQuery.isNull() )
m_currentTrackPlaylist = playlistinterface_ptr( new SingleTrackPlaylistInterface( fromQuery ) );
else
m_currentTrackPlaylist = playlist;
@ -611,7 +611,7 @@ AudioEngine::playItem( Tomahawk::playlistinterface_ptr playlist, const Tomahawk:
{
if ( query->numResults() && query->results().first()->isOnline() )
{
playItem( playlist, query->results().first() );
playItem( playlist, query->results().first(), query );
return;
}

View File

@ -86,11 +86,11 @@ public slots:
void seek( qint64 ms );
void seek( int ms ); // for compatibility with seekbar in audiocontrols
void setVolume( int percentage );
void lowerVolume();
void lowerVolume();
void raiseVolume();
void mute();
void playItem( Tomahawk::playlistinterface_ptr playlist, const Tomahawk::result_ptr& result );
void playItem( Tomahawk::playlistinterface_ptr playlist, const Tomahawk::result_ptr& result, const Tomahawk::query_ptr& fromQuery = Tomahawk::query_ptr() );
void playItem( Tomahawk::playlistinterface_ptr playlist, const Tomahawk::query_ptr& query );
void playItem( const Tomahawk::artist_ptr& artist );
void playItem( const Tomahawk::album_ptr& album );