From dbcead0fd3f3b7090a8f5b0fe07e9345620324e6 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 19 Oct 2008 17:53:31 +0000 Subject: fixed playlist parsing git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@593 90c681e8-e032-0410-971d-27865f9a5e38 --- src/ui/playlistmodel.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/ui/playlistmodel.cpp') diff --git a/src/ui/playlistmodel.cpp b/src/ui/playlistmodel.cpp index b155114ec..f0e1643b8 100644 --- a/src/ui/playlistmodel.cpp +++ b/src/ui/playlistmodel.cpp @@ -109,7 +109,7 @@ void PlayListModel::load(PlayListItem *item) emit firstAdded(); //if (!m_block_update_signals) - emit listChanged(); + emit listChanged(); } int PlayListModel::count() @@ -857,7 +857,13 @@ void PlayListModel::loadPlaylist(const QString &f_name) if (file.open(QIODevice::ReadOnly)) { //clear(); - addFiles(prs->decode(QTextStream(&file).readAll())); + QStringList list = prs->decode(QTextStream(&file).readAll()); + for (int i = 0; i < list.size(); ++i) + { + if (QFileInfo(list.at(i)).isRelative() && !list.at(i).contains("://")) + QString path = list[i].prepend(QFileInfo(f_name).canonicalPath () + QDir::separator ()); + } + addFiles(list); file.close(); } else -- cgit v1.2.3-13-gbd6f