mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-14 18:14:50 +02:00
Use the query that was used to play the track in AudioEngine
This commit is contained in:
@@ -575,7 +575,7 @@ AudioEngine::loadNextTrack()
|
|||||||
|
|
||||||
|
|
||||||
void
|
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() );
|
tDebug( LOGEXTRA ) << Q_FUNC_INFO << ( result.isNull() ? QString() : result->url() );
|
||||||
|
|
||||||
@@ -584,8 +584,8 @@ AudioEngine::playItem( Tomahawk::playlistinterface_ptr playlist, const Tomahawk:
|
|||||||
|
|
||||||
setPlaylist( playlist );
|
setPlaylist( playlist );
|
||||||
|
|
||||||
if ( playlist.isNull() )
|
if ( playlist.isNull() && !fromQuery.isNull() )
|
||||||
m_currentTrackPlaylist = playlistinterface_ptr( new SingleTrackPlaylistInterface( result->toQuery() ) );
|
m_currentTrackPlaylist = playlistinterface_ptr( new SingleTrackPlaylistInterface( fromQuery ) );
|
||||||
else
|
else
|
||||||
m_currentTrackPlaylist = playlist;
|
m_currentTrackPlaylist = playlist;
|
||||||
|
|
||||||
@@ -611,7 +611,7 @@ AudioEngine::playItem( Tomahawk::playlistinterface_ptr playlist, const Tomahawk:
|
|||||||
{
|
{
|
||||||
if ( query->numResults() && query->results().first()->isOnline() )
|
if ( query->numResults() && query->results().first()->isOnline() )
|
||||||
{
|
{
|
||||||
playItem( playlist, query->results().first() );
|
playItem( playlist, query->results().first(), query );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -86,11 +86,11 @@ public slots:
|
|||||||
void seek( qint64 ms );
|
void seek( qint64 ms );
|
||||||
void seek( int ms ); // for compatibility with seekbar in audiocontrols
|
void seek( int ms ); // for compatibility with seekbar in audiocontrols
|
||||||
void setVolume( int percentage );
|
void setVolume( int percentage );
|
||||||
void lowerVolume();
|
void lowerVolume();
|
||||||
void raiseVolume();
|
void raiseVolume();
|
||||||
void mute();
|
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( Tomahawk::playlistinterface_ptr playlist, const Tomahawk::query_ptr& query );
|
||||||
void playItem( const Tomahawk::artist_ptr& artist );
|
void playItem( const Tomahawk::artist_ptr& artist );
|
||||||
void playItem( const Tomahawk::album_ptr& album );
|
void playItem( const Tomahawk::album_ptr& album );
|
||||||
|
Reference in New Issue
Block a user