mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-11 11:32:22 +02:00
Port logic from STV to audioengine regarding next track when listening along
This commit is contained in:
parent
a687ca635f
commit
989a16db7d
@ -21,6 +21,7 @@
|
||||
#include <QUrl>
|
||||
|
||||
#include "playlistinterface.h"
|
||||
#include "sourceplaylistinterface.h"
|
||||
|
||||
#include "database/database.h"
|
||||
#include "database/databasecommand_logplayback.h"
|
||||
@ -180,6 +181,19 @@ AudioEngine::next()
|
||||
m_playlist->skipRestrictions() == PlaylistInterface::NoSkipForwards )
|
||||
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();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user