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