mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 23:57:34 +02:00
Add id() to playlistinterface for comparison
This commit is contained in:
@@ -26,6 +26,7 @@ PlaylistInterface::PlaylistInterface ()
|
|||||||
: QObject()
|
: QObject()
|
||||||
, m_latchMode( StayOnSong )
|
, m_latchMode( StayOnSong )
|
||||||
{
|
{
|
||||||
|
m_id = uuid();
|
||||||
qRegisterMetaType<Tomahawk::PlaylistInterface::RepeatMode>( "Tomahawk::PlaylistInterface::RepeatMode" );
|
qRegisterMetaType<Tomahawk::PlaylistInterface::RepeatMode>( "Tomahawk::PlaylistInterface::RepeatMode" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -44,6 +44,8 @@ public:
|
|||||||
explicit PlaylistInterface();
|
explicit PlaylistInterface();
|
||||||
virtual ~PlaylistInterface();
|
virtual ~PlaylistInterface();
|
||||||
|
|
||||||
|
const QString id() { return m_id; }
|
||||||
|
|
||||||
virtual QList< Tomahawk::query_ptr > tracks() = 0;
|
virtual QList< Tomahawk::query_ptr > tracks() = 0;
|
||||||
|
|
||||||
virtual int unfilteredTrackCount() const = 0;
|
virtual int unfilteredTrackCount() const = 0;
|
||||||
@@ -98,6 +100,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY( PlaylistInterface )
|
Q_DISABLE_COPY( PlaylistInterface )
|
||||||
|
|
||||||
|
QString m_id;
|
||||||
QString m_filter;
|
QString m_filter;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -158,10 +158,13 @@ AlbumInfoWidget::onLoadingFinished()
|
|||||||
bool
|
bool
|
||||||
AlbumInfoWidget::isBeingPlayed() const
|
AlbumInfoWidget::isBeingPlayed() const
|
||||||
{
|
{
|
||||||
if ( ui->albumsView->playlistInterface() == AudioEngine::instance()->currentTrackPlaylist() )
|
//tDebug() << Q_FUNC_INFO << "audioengine playlistInterface = " << AudioEngine::instance()->currentTrackPlaylist()->id();
|
||||||
|
//tDebug() << Q_FUNC_INFO << "albumsView playlistInterface = " << ui->albumsView->playlistInterface()->id();
|
||||||
|
//tDebug() << Q_FUNC_INFO << "tracksView playlistInterface = " << ui->tracksView->playlistInterface()->id();
|
||||||
|
if ( ui->albumsView->playlistInterface()->id() == AudioEngine::instance()->currentTrackPlaylist()->id() )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if ( ui->tracksView->playlistInterface() == AudioEngine::instance()->currentTrackPlaylist() )
|
if ( ui->tracksView->playlistInterface()->id() == AudioEngine::instance()->currentTrackPlaylist()->id() )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user