1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

Fix catch-up functionality

This commit is contained in:
Jeff Mitchell
2011-06-19 16:28:50 -04:00
parent 989a16db7d
commit 8f69b9b680
3 changed files with 3 additions and 2 deletions

View File

@@ -188,7 +188,7 @@ AudioEngine::next()
{ {
//it's a catch-up -- if they're trying to catch-up in the same track, don't do anything //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 //so that you don't repeat the track and/or cause the retry timer to fire
if ( !m_currentTrack.isNull() && if ( !m_currentTrack.isNull() && !sourcepi->hasNextSong() &&
m_currentTrack->id() == sourcepi->currentItem()->id() ) m_currentTrack->id() == sourcepi->currentItem()->id() )
return; return;
} }

View File

@@ -58,6 +58,7 @@ public:
virtual Tomahawk::source_ptr source() const { return m_source; } virtual Tomahawk::source_ptr source() const { return m_source; }
virtual bool hasNextSong() { return m_gotNextSong; }
virtual void reset(); virtual void reset();
public slots: public slots:

View File

@@ -353,7 +353,7 @@ SourceTreeView::latchOn()
{ {
//it's a catch-up -- if they're trying to catch-up in the same track, don't do anything //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 //so that you don't repeat the track and/or cause the retry timer to fire
if ( !AudioEngine::instance()->currentTrack().isNull() && if ( !AudioEngine::instance()->currentTrack().isNull() && !sourcepi->hasNextSong() &&
AudioEngine::instance()->currentTrack()->id() == sourcepi->currentItem()->id() ) AudioEngine::instance()->currentTrack()->id() == sourcepi->currentItem()->id() )
return; return;
} }