mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
Port logic from STV to audioengine regarding next track when listening along
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
#include "playlistinterface.h"
|
#include "playlistinterface.h"
|
||||||
|
#include "sourceplaylistinterface.h"
|
||||||
|
|
||||||
#include "database/database.h"
|
#include "database/database.h"
|
||||||
#include "database/databasecommand_logplayback.h"
|
#include "database/databasecommand_logplayback.h"
|
||||||
@@ -180,6 +181,19 @@ AudioEngine::next()
|
|||||||
m_playlist->skipRestrictions() == PlaylistInterface::NoSkipForwards )
|
m_playlist->skipRestrictions() == PlaylistInterface::NoSkipForwards )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if ( dynamic_cast< SourcePlaylistInterface* >( m_playlist ) )
|
||||||
|
{
|
||||||
|
SourcePlaylistInterface* sourcepi = dynamic_cast< SourcePlaylistInterface* >( m_playlist );
|
||||||
|
if ( !sourcepi->source().isNull() )
|
||||||
|
{
|
||||||
|
//it's a catch-up -- if they're trying to catch-up in the same track, don't do anything
|
||||||
|
//so that you don't repeat the track and/or cause the retry timer to fire
|
||||||
|
if ( !m_currentTrack.isNull() &&
|
||||||
|
m_currentTrack->id() == sourcepi->currentItem()->id() )
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
loadNextTrack();
|
loadNextTrack();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user