diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-10-10 08:42:15 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-10-10 08:42:15 +0000 |
| commit | 45117f6d2f2ccfb47af840d4416f43607d83d518 (patch) | |
| tree | ee3e2b99914fa6907ce7e1173e1fc87575fe8a37 /src/ui/playlistmodel.cpp | |
| parent | 0bb73fcbfda56e4cb064a7bc1ceda89312087f3d (diff) | |
| download | qmmp-45117f6d2f2ccfb47af840d4416f43607d83d518.tar.gz qmmp-45117f6d2f2ccfb47af840d4416f43607d83d518.tar.bz2 qmmp-45117f6d2f2ccfb47af840d4416f43607d83d518.zip | |
cue sheet support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@575 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/ui/playlistmodel.cpp')
| -rw-r--r-- | src/ui/playlistmodel.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/ui/playlistmodel.cpp b/src/ui/playlistmodel.cpp index 327b88598..1a92d0bc3 100644 --- a/src/ui/playlistmodel.cpp +++ b/src/ui/playlistmodel.cpp @@ -314,10 +314,10 @@ void PlayListModel::showDetails() str.append(tr("Album:") + " %4\n"); str.append(tr("Comment:") + " %5"); str = str.arg(item->path()) - .arg(item->title().isEmpty() ? item->text() : item->title()) - .arg(item->artist()) - .arg(item->album()) - .arg(item->comment()); + .arg(item->title().isEmpty() ? item->text() : item->title()) + .arg(item->artist()) + .arg(item->album()) + .arg(item->comment()); QMessageBox::information(0, m_items.at (i)->path(), str); return; } @@ -365,7 +365,8 @@ void PlayListModel::readSettings() for (int i = 0;i < preload;i++) { - load(new PlayListItem(files.takeAt(0))); + //TODO load tags from cache + load(new PlayListItem(Decoder::createPlayList(files.takeAt(0)).at(0))); } if (files.isEmpty()) @@ -398,10 +399,13 @@ void PlayListModel::addFile(const QString& path) { if (path.isEmpty ()) return; - if (path.startsWith("http://")) + /*if (path.startsWith("http://")) load(new PlayListItem(path)); else if (Decoder::supports(path)) - load(new PlayListItem(path)); + load(new PlayListItem(path));*/ + QList <FileInfo *> playList = Decoder::createPlayList(path); + foreach(FileInfo *info, playList) + emit load(new PlayListItem(info)); m_play_state->prepare(); } |
