diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-08-07 11:34:42 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-08-07 11:34:42 +0000 |
| commit | 1fb94978d0f60a91d9712fad25bbc47797979688 (patch) | |
| tree | 3cb28247f8a0fdff2e2a1a6da5a0325ec5e577a6 /src/plugins/General/mpris/mpris1/tracklistobject.cpp | |
| parent | 1daf8cdc97096b6235a404acb563bec0f3f23c58 (diff) | |
| download | qmmp-1fb94978d0f60a91d9712fad25bbc47797979688.tar.gz qmmp-1fb94978d0f60a91d9712fad25bbc47797979688.tar.bz2 qmmp-1fb94978d0f60a91d9712fad25bbc47797979688.zip | |
enabled most general plugins
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3576 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/mpris/mpris1/tracklistobject.cpp')
| -rw-r--r-- | src/plugins/General/mpris/mpris1/tracklistobject.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/plugins/General/mpris/mpris1/tracklistobject.cpp b/src/plugins/General/mpris/mpris1/tracklistobject.cpp index e75900439..0fb498788 100644 --- a/src/plugins/General/mpris/mpris1/tracklistobject.cpp +++ b/src/plugins/General/mpris/mpris1/tracklistobject.cpp @@ -66,7 +66,7 @@ int TrackListObject::AddTrack(const QString &in0, bool in1) void TrackListObject::DelTrack(int in0) { - m_model->removeAt(in0); + m_model->removeTrack(in0); } int TrackListObject::GetCurrentTrack() @@ -82,22 +82,22 @@ int TrackListObject::GetLength() QVariantMap TrackListObject::GetMetadata(int in0) { QVariantMap map; - PlayListTrack *item = m_model->item(in0); - if (item) + PlayListTrack *track = m_model->track(in0); + if (track) { - if (QFile::exists(item->url())) - map.insert("location", "file://" + item->url()); + if (QFile::exists(track->url())) + map.insert("location", "file://" + track->url()); else - map.insert("location", item->url()); - map.insert("title", item->value(Qmmp::TITLE)); - map.insert("artist", item->value(Qmmp::ARTIST)); - map.insert("album", item->value(Qmmp::ALBUM)); - map.insert("tracknumber", item->value(Qmmp::TRACK)); - map.insert("time", (quint32)item->length()); - map.insert("mtime", (quint32)item->length() * 1000); - map.insert("genre", item->value(Qmmp::GENRE)); - map.insert("comment", item->value(Qmmp::COMMENT)); - map.insert("year", item->value(Qmmp::YEAR).toUInt()); + map.insert("location", track->url()); + map.insert("title", track->value(Qmmp::TITLE)); + map.insert("artist", track->value(Qmmp::ARTIST)); + map.insert("album", track->value(Qmmp::ALBUM)); + map.insert("tracknumber", track->value(Qmmp::TRACK)); + map.insert("time", (quint32)track->length()); + map.insert("mtime", (quint32)track->length() * 1000); + map.insert("genre", track->value(Qmmp::GENRE)); + map.insert("comment", track->value(Qmmp::COMMENT)); + map.insert("year", track->value(Qmmp::YEAR).toUInt()); } return map; } |
