summaryrefslogtreecommitdiffstats
path: root/playerwidget.cpp
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2017-08-27 04:15:57 +0200
committerArno <arno@disconnect.de>2017-08-27 04:15:57 +0200
commit2ee1c0424161f9279e343d1fa142fdc3f4055820 (patch)
treeb6b4d100724f1eace1ea91c231a759e8f2c8642c /playerwidget.cpp
parentec326f96ce40efb8cac4195b088803253c2eb588 (diff)
downloadBeetPlayer-2ee1c0424161f9279e343d1fa142fdc3f4055820.tar.gz
BeetPlayer-2ee1c0424161f9279e343d1fa142fdc3f4055820.tar.bz2
BeetPlayer-2ee1c0424161f9279e343d1fa142fdc3f4055820.zip
Revert "Remove useless disconnect from playUrl"
This reverts commit c687253b9526ee9dda6b26a0fe47655b3778ffa3. As it turns out, the disconnect is actually needed. When selecting another stream, we have multiple connections otherwise.
Diffstat (limited to 'playerwidget.cpp')
-rw-r--r--playerwidget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/playerwidget.cpp b/playerwidget.cpp
index 89fc8d1..b11d6ca 100644
--- a/playerwidget.cpp
+++ b/playerwidget.cpp
@@ -1454,6 +1454,7 @@ void PlayerWidget::play(const QString &fullPath){
}
void PlayerWidget::playUrl(const QString &url){
+ disconnect(mPlayer, static_cast<void(QMediaObject::*)(const QString &, const QVariant &)>(&QMediaObject::metaDataChanged), this, &PlayerWidget::doMetadataChange);
connect(mPlayer, static_cast<void(QMediaObject::*)(const QString &, const QVariant &)>(&QMediaObject::metaDataChanged), this, &PlayerWidget::doMetadataChange);
mPlayer->setMedia(QUrl(url));
mPlayer->play();