From 176523a606494a1d8cfe7a692ee564785d1b2101 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sat, 18 Oct 2014 08:00:28 +0000 Subject: playlist: added feature to find track by number git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4585 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/mpris/mpris1/tracklistobject.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/plugins/General/mpris/mpris1/tracklistobject.cpp') diff --git a/src/plugins/General/mpris/mpris1/tracklistobject.cpp b/src/plugins/General/mpris/mpris1/tracklistobject.cpp index 23740ff81..2cef4a8c7 100644 --- a/src/plugins/General/mpris/mpris1/tracklistobject.cpp +++ b/src/plugins/General/mpris/mpris1/tracklistobject.cpp @@ -57,9 +57,6 @@ int TrackListObject::AddTrack(const QString &in0, bool in1) m_pl_manager->selectPlayList(m_model); m_player->stop(); connect(m_model, SIGNAL(trackAdded(PlayListTrack*)), SLOT(playTrack(PlayListTrack*))); - /*m_prev_count = m_model->count(); - connect(m_model, SIGNAL(listChanged()), this, SLOT(checkNewItem())); - connect(m_model, SIGNAL(loaderFinished()), this, SLOT(disconnectPl()));*/ } m_model->add(path); return 0; @@ -83,20 +80,7 @@ int TrackListObject::GetLength() QVariantMap TrackListObject::GetMetadata(int in0) { QVariantMap map; - PlayListTrack *track = 0; - int track_counter = 0; - for(int i = 0; i count(); i++) - { - if(m_model->isTrack(i)) - track_counter++; - else - continue; - if(track_counter - 1 == in0) - { - track = m_model->track(i); - break; - } - } + PlayListTrack *track = m_model->findTrack(in0); if (track) { -- cgit v1.2.3-13-gbd6f