aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ui/listwidget.cpp1
-rw-r--r--src/ui/mainwindow.cpp1
-rw-r--r--src/ui/playlistmodel.cpp11
-rw-r--r--src/ui/qmmp.desktop2
4 files changed, 10 insertions, 5 deletions
diff --git a/src/ui/listwidget.cpp b/src/ui/listwidget.cpp
index c4dea03dd..7238cb00f 100644
--- a/src/ui/listwidget.cpp
+++ b/src/ui/listwidget.cpp
@@ -398,6 +398,7 @@ void ListWidget::processFileInfo(const QFileInfo& info)
else
{
m_model->addFile(info.absoluteFilePath());
+ m_model->loadPlaylist(info.absoluteFilePath());
}
}
diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp
index 1cd0a26d3..eb4d2c118 100644
--- a/src/ui/mainwindow.cpp
+++ b/src/ui/mainwindow.cpp
@@ -592,6 +592,7 @@ void MainWindow::loadPlaylist()
QString f_name = FileDialog::getOpenFileName(this,tr("Open Playlist"),m_lastDir,mask);
if (!f_name.isEmpty())
{
+ m_playListModel->clear();
m_playListModel->loadPlaylist(f_name);
m_playlistName = QFileInfo(f_name).baseName();
m_lastDir = QFileInfo(f_name).absoluteDir().path();
diff --git a/src/ui/playlistmodel.cpp b/src/ui/playlistmodel.cpp
index d891fe02c..b155114ec 100644
--- a/src/ui/playlistmodel.cpp
+++ b/src/ui/playlistmodel.cpp
@@ -1,11 +1,11 @@
/***************************************************************************
- * Copyright(C) 2006-2008 by Ilya Kotov *
+ * Copyright(C) 2006-2008 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
+ * (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
@@ -487,7 +487,10 @@ bool PlayListModel::setFileList(const QStringList & l)
if (f_info.isDir())
addDirectory(str);
else
+ {
addFile(str);
+ loadPlaylist(str);
+ }
}
// Do processing the rest of events to avoid GUI freezing
QApplication::processEvents(QEventLoop::AllEvents,10);
@@ -845,7 +848,7 @@ void PlayListModel::setUpdatesEnabled(bool yes)
}
}
-void PlayListModel::loadPlaylist(const QString & f_name)
+void PlayListModel::loadPlaylist(const QString &f_name)
{
PlaylistFormat* prs = PlaylistParser::instance()->findByPath(f_name);
if (prs)
@@ -853,7 +856,7 @@ void PlayListModel::loadPlaylist(const QString & f_name)
QFile file(f_name);
if (file.open(QIODevice::ReadOnly))
{
- clear();
+ //clear();
addFiles(prs->decode(QTextStream(&file).readAll()));
file.close();
}
diff --git a/src/ui/qmmp.desktop b/src/ui/qmmp.desktop
index 86e052351..f3eab418d 100644
--- a/src/ui/qmmp.desktop
+++ b/src/ui/qmmp.desktop
@@ -21,4 +21,4 @@ Icon=qmmp
Terminal=false
Type=Application
Categories=AudioVideo;Player;Audio;Qt
-MimeType=application/x-ogg;audio/mp3;audio/mpeg;audio/x-flac;audio/x-mp3;audio/x-mpeg;audio/x-ms-wma;audio/x-musepack;application/ogg;audio/x-vorbis+ogg
+MimeType=application/x-ogg;audio/mp3;audio/mpeg;audio/x-flac;audio/x-mp3;audio/x-mpeg;audio/x-ms-wma;audio/x-musepack;application/ogg;audio/x-vorbis+ogg;audio/x-scpls;audio/x-mpegurl;audio/x-it;audio/x-mod;