Using steps to reproduce, I get following in Amarok debugging log: amarok: BEGIN: void EngineController::playUrl(const KUrl&, uint) amarok: [EngineController] URL: KUrl("http://mp1.somafm.com:8800") "http://mp1.somafm.com:8800" amarok: [EngineController] Offset: 0 amarok: [EngineController] track pos after play: 0 amarok: END__: void EngineController::playUrl(const KUrl&, uint) [Took: 0.001s] (...) amarok: BEGIN: void EngineController::slotNewTrackPlaying(const Phonon::MediaSource&) amarok: END__: void EngineController::slotNewTrackPlaying(const Phonon::MediaSource&) [Took: 0.047s] amarok: [EngineController] slotMetaDataChanged(): new meta-data: QMap(("xesam:album", QVariant(QString, "") ) ( "xesam:author" , QVariant(QString, "") ) ( "xesam:comment" , QVariant(QString, "") ) ( "xesam:genre" , QVariant(QString, "") ) ( "xesam:title" , QVariant(QString, "http://mp1.somafm.com:8800") ) ( "xesam:trackNumber" , QVariant(QString, "") ) ( "xesam:url" , QVariant(QUrl, QUrl("http://mp1.somafm.com:8800") ) ) ) amarok: BEGIN: virtual void Playlist::Model::metadataChanged(Meta::TrackPtr) ^^^^ correct (...) amarok: [EngineController] slotMetaDataChanged(): new meta-data: QMap(("xesam:album", QVariant(QString, "") ) ( "xesam:author" , QVariant(QString, "") ) ( "xesam:comment" , QVariant(QString, "") ) ( "xesam:genre" , QVariant(QString, "Female Vocal Electronica") ) ( "xesam:title" , QVariant(QString, "Lush: Mostly female vocals with an electronic influence. [SomaFM]") ) ( "xesam:trackNumber" , QVariant(QString, "") ) ( "xesam:url" , QVariant(QUrl, QUrl("http://mp1.somafm.com:8800") ) ) ) ^^^^ correct (...) amarok: BEGIN: void EngineController::slotAboutToFinish() amarok: BEGIN: void EngineController::setNextTrack(Meta::TrackPtr) amarok: END__: void EngineController::setNextTrack(Meta::TrackPtr) [Took: 0s] amarok: END__: void EngineController::slotAboutToFinish() [Took: 0s] ^^^^ aboutToFinish() signal emitted prematurely, the stream continues to play just fine, but this is handled gracefully on Amarok side. Note that setNextTrack() calls phononMediaObject->enqueue( "path/to/next/track.mp3" ) (...) amarok: [EngineController] slotMetaDataChanged(): new meta-data: QMap(("xesam:album", QVariant(QString, "Lush: Mostly female vocals with an electronic influence. [SomaFM]") ) ( "xesam:author" , QVariant(QString, "") ) ( "xesam:comment" , QVariant(QString, "") ) ( "xesam:genre" , QVariant(QString, "Female Vocal Electronica") ) ( "xesam:title" , QVariant(QString, "Vanessa Daou - Somafm Announcer 2") ) ( "xesam:trackNumber" , QVariant(QString, "") ) ( "xesam:url" , QVariant(QUrl, QUrl("file:///home/strohel/music/mp3/Marvin Gaye/1971 What's Going On/01 What's Going On.mp3") ) ) ) ^^^^ WRONG: metadata from the currently playing stream (correct) got from signal metadataChanged(), but incorrect url got from phononMediaObject->currentSource()->url() Reproducible: Always Steps to Reproduce: 1. Open Amarok (amarok --debug --nofork 2>&1 | grep -C3 EngineController), clear playlist 2. Add a stream to playlist (SomaFM in my case) and a normal track after it (Marvin Gaye in my case) 3. Play the stream Actual Results: phonon-vlc reports incorrect currentSource() which breaks metadata updating of the stream in Amarok. - currentSource() reports the next song from Marvin Gaye while the stream is still playing. Expected Results: currentSource() should report the stream url. This may be a side-effect of premature aboutToFinish() signal being emitted.
Git commit 324d7d92c97036f9c877c5e8c76c66651bbd8517 by Harald Sitter. Committed on 22/08/2012 at 12:54. Pushed by sitter into branch 'master'. fix aboutToFinish thresh calculation for continuous streams we get a length of 0, so we need to exclude <= 0 from delta calculation, otherwise aboutToFinish gets immediately emitted for streams triggering a bogus source change in a consumer M +5 -1 src/mediaobject.cpp http://commits.kde.org/phonon-vlc/324d7d92c97036f9c877c5e8c76c66651bbd8517
Git commit 271761a8510bc2a62405e77fc9e5e13dc22155de by Harald Sitter. Committed on 22/08/2012 at 12:54. Pushed by sitter into branch '0.6'. fix aboutToFinish thresh calculation for continuous streams we get a length of 0, so we need to exclude <= 0 from delta calculation, otherwise aboutToFinish gets immediately emitted for streams triggering a bogus source change in a consumer M +5 -1 src/mediaobject.cpp http://commits.kde.org/phonon-vlc/271761a8510bc2a62405e77fc9e5e13dc22155de
I confirm this fixes the symptoms in Amarok, yay!
*** Bug 306660 has been marked as a duplicate of this bug. ***