1
0
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:
Leo Franchi 2011-09-28 19:36:02 -04:00
parent cfa5c9932e
commit 757f1c6175
2 changed files with 2 additions and 21 deletions

View File

@ -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");

View File

@ -349,8 +349,8 @@ SourceTreeView::latchOnOrCatchUp()
if ( m_latchManager->isLatched( source ) )
emit catchUpRequest();
emit latchRequest( source );
else
emit latchRequest( source );
}
void