From 9e77cbb9474d5dfd37d1f683de6e2c04666e6f6c Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Wed, 11 Jun 2008 18:18:11 +0000 Subject: show metadata for streams git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@403 90c681e8-e032-0410-971d-27865f9a5e38 --- src/ui/playlistmodel.cpp | 25 +++++++++++++++++++++---- 1 file 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 #include #include +#include #include @@ -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 songs; foreach(PlayListItem* item, m_items) - songs << item; + songs << item; ts << prs->encode(songs); file.close(); } -- cgit v1.2.3-13-gbd6f