mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 23:26:40 +02:00
* Don't remove current index when restarting a track by activating it directly.
* Don't create new playlist revisions for a list that doesn't belong to you.
This commit is contained in:
@@ -401,7 +401,7 @@ PlaylistModel::endPlaylistChanges()
|
|||||||
Q_ASSERT( false );
|
Q_ASSERT( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_playlist.isNull() )
|
if ( m_playlist.isNull() || !m_playlist->author()->isLocal() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QList<plentry_ptr> l = playlistEntries();
|
QList<plentry_ptr> l = playlistEntries();
|
||||||
|
@@ -39,16 +39,13 @@ TrackModel::TrackModel( QObject* parent )
|
|||||||
, m_readOnly( true )
|
, m_readOnly( true )
|
||||||
, m_style( Detailed )
|
, m_style( Detailed )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
|
|
||||||
connect( AudioEngine::instance(), SIGNAL( finished( Tomahawk::result_ptr ) ), SLOT( onPlaybackFinished( Tomahawk::result_ptr ) ), Qt::DirectConnection );
|
|
||||||
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onPlaybackStopped() ), Qt::DirectConnection );
|
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onPlaybackStopped() ), Qt::DirectConnection );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TrackModel::~TrackModel()
|
TrackModel::~TrackModel()
|
||||||
{
|
{
|
||||||
// delete m_rootItem;
|
delete m_rootItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -478,17 +475,6 @@ TrackModel::itemFromIndex( const QModelIndex& index ) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
TrackModel::onPlaybackFinished( const Tomahawk::result_ptr& result )
|
|
||||||
{
|
|
||||||
TrackModelItem* oldEntry = itemFromIndex( m_currentIndex );
|
|
||||||
if ( oldEntry && !oldEntry->query().isNull() && oldEntry->query()->results().contains( result ) )
|
|
||||||
{
|
|
||||||
oldEntry->setIsPlaying( false );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TrackModel::onPlaybackStopped()
|
TrackModel::onPlaybackStopped()
|
||||||
{
|
{
|
||||||
|
@@ -126,7 +126,6 @@ public slots:
|
|||||||
virtual void setShuffled( bool /*shuffled*/ ) {}
|
virtual void setShuffled( bool /*shuffled*/ ) {}
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onPlaybackFinished( const Tomahawk::result_ptr& result );
|
|
||||||
void onPlaybackStopped();
|
void onPlaybackStopped();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user