aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-06-11 18:18:11 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-06-11 18:18:11 +0000
commit9e77cbb9474d5dfd37d1f683de6e2c04666e6f6c (patch)
treeecafdd0250eb436d83070e75d6ca937a8a30e239 /src
parentd4bdda57d3380d1b939f440fe93e7a71f31ad53b (diff)
downloadqmmp-9e77cbb9474d5dfd37d1f683de6e2c04666e6f6c.tar.gz
qmmp-9e77cbb9474d5dfd37d1f683de6e2c04666e6f6c.tar.bz2
qmmp-9e77cbb9474d5dfd37d1f683de6e2c04666e6f6c.zip
show metadata for streams
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@403 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
-rw-r--r--src/ui/playlistmodel.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/ui/playlistmodel.cpp b/src/ui/playlistmodel.cpp
index f26f843d1..9b1a68155 100644
--- a/src/ui/playlistmodel.cpp
+++ b/src/ui/playlistmodel.cpp
@@ -27,6 +27,7 @@
#include <QApplication>
#include <QTimer>
#include <QSettings>
+#include <QMessageBox>
#include <time.h>
@@ -303,10 +304,28 @@ void PlayListModel::showDetails()
{
if ( m_items.at ( i )->isSelected() )
{
+ if (m_items.at (i)->path().startsWith("http://"))
+ {
+ PlayListItem *item = m_items.at (i);
+ QString str;
+ str.append(tr("Url:") + " %1\n");
+ str.append(tr("Title:") + " %2\n");
+ str.append(tr("Artist:") + " %3\n");
+ 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());
+ QMessageBox::information(0, m_items.at (i)->path(), str);
+ return;
+ }
+
DecoderFactory *fact = Decoder::findByPath ( m_items.at ( i )->path() );
if ( fact )
{
- QObject* o = fact->showDetails ( 0, m_items.at ( i )->path() );
+ QObject* o = fact->showDetails ( 0, m_items.at (i)->path());
if (o)
{
TagUpdater *updater = new TagUpdater(o,m_items.at(i));
@@ -314,11 +333,9 @@ void PlayListModel::showDetails()
connect (updater, SIGNAL(destroyed (QObject * )),SIGNAL(listChanged()));
}
}
-
return;
}
}
-
}
void PlayListModel::readSettings()
@@ -834,7 +851,7 @@ void PlayListModel::savePlaylist(const QString & f_name)
QTextStream ts(&file);
QList <SongInfo *> songs;
foreach(PlayListItem* item, m_items)
- songs << item;
+ songs << item;
ts << prs->encode(songs);
file.close();
}