mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
Fix some moer stuff
This commit is contained in:
parent
cfa5c9932e
commit
757f1c6175
@ -88,29 +88,10 @@ LatchManager::playlistChanged( PlaylistInterface* )
|
||||
}
|
||||
|
||||
// We're current latched, and the user changed playlist, so stop
|
||||
const PlaylistInterface* pi = AudioEngine::instance()->playlist();
|
||||
bool listeningAlong = false;
|
||||
source_ptr newSource;
|
||||
|
||||
if ( pi && dynamic_cast< const SourcePlaylistInterface* >( pi ) )
|
||||
{
|
||||
// Check if we're listening along to someone, to make sure it's not the same person
|
||||
const SourcePlaylistInterface* sourcepi = dynamic_cast< const SourcePlaylistInterface* >( pi );
|
||||
if ( !AudioEngine::instance()->state() == AudioEngine::Stopped )
|
||||
{
|
||||
listeningAlong = true;
|
||||
newSource = sourcepi->source();
|
||||
}
|
||||
}
|
||||
|
||||
SourcePlaylistInterface* origsourcepi = dynamic_cast< SourcePlaylistInterface* >( m_latchedInterface.data() );
|
||||
Q_ASSERT( origsourcepi );
|
||||
const source_ptr source = origsourcepi->source();
|
||||
|
||||
// if we're currently listening along to the same source, no change
|
||||
if ( listeningAlong && ( !origsourcepi->source().isNull() && origsourcepi->source()->id() == newSource->id() ) )
|
||||
return;
|
||||
|
||||
DatabaseCommand_SocialAction* cmd = new DatabaseCommand_SocialAction();
|
||||
cmd->setSource( SourceList::instance()->getLocal() );
|
||||
cmd->setAction( "latchOff");
|
||||
|
@ -349,8 +349,8 @@ SourceTreeView::latchOnOrCatchUp()
|
||||
|
||||
if ( m_latchManager->isLatched( source ) )
|
||||
emit catchUpRequest();
|
||||
|
||||
emit latchRequest( source );
|
||||
else
|
||||
emit latchRequest( source );
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user