Version: (using Devel) OS: Linux Installed from: Compiled sources I just noticed that neither Amarok nor Dragonplayer can play files with # in the filename. I have Phonon from trunk with Xine backend: xine-lib-1.1.16.3 No pulseaudio or such. This is the output of amarok (it stops playing) when it tries to play a file with # in the filename: amarok: BEGIN: void EngineController::slotAboutToFinish() amarok: [EngineController] Track finished completely, updating statistics amarok: BEGIN: virtual void LyricsEngine::metadataChanged(Meta::TrackPtr) amarok: END__: virtual void LyricsEngine::metadataChanged(Meta::TrackPtr) - Took 0.00017s amarok: BEGIN: virtual void Amarok::OSD::metadataChanged(Meta::TrackPtr) amarok: BEGIN: void OSDWidget::show(const QString&, QImage) amarok: END__: void OSDWidget::show(const QString&, QImage) - Took 0.00013s amarok: END__: virtual void Amarok::OSD::metadataChanged(Meta::TrackPtr) - Took 0.0016s amarok: BEGIN: virtual void LyricsEngine::metadataChanged(Meta::TrackPtr) amarok: END__: virtual void LyricsEngine::metadataChanged(Meta::TrackPtr) - Took 0.00017s amarok: BEGIN: virtual void Amarok::OSD::metadataChanged(Meta::TrackPtr) amarok: BEGIN: void OSDWidget::show(const QString&, QImage) amarok: END__: void OSDWidget::show(const QString&, QImage) - Took 0.00012s amarok: END__: virtual void Amarok::OSD::metadataChanged(Meta::TrackPtr) - Took 0.0016s amarok: BEGIN: void Playlist::Actions::play(quint64, bool) amarok: END__: void Playlist::Actions::play(quint64, bool) - Took 0.00017s amarok: END__: void EngineController::slotAboutToFinish() - Took 0.055s xine_open for gapless playback failed! amarok: BEGIN: void EngineController::slotNewTrackPlaying(const Phonon::MediaSource&) amarok: [EngineController] Using gain of 0 with relative peak of 0 amarok: BEGIN: void EngineSubject::stateChangedNotify(Phonon::State, Phonon::State) amarok: BEGIN: virtual void Amarok::PlayPauseAction::engineStateChanged(Phonon::State, Phonon::State) amarok: NEWSTATE: 2 OLDSTATE: 2 amarok: END__: virtual void Amarok::PlayPauseAction::engineStateChanged(Phonon::State, Phonon::State) - Took 0.00019s amarok: returning bookmarkcurrenttrack action amarok: BEGIN: virtual void Context::ContextView::engineStateChanged(Phonon::State, Phonon::State) amarok: BEGIN: virtual void LyricsEngine::message(const Context::ContextState&) amarok: BEGIN: void LyricsEngine::update() amarok: BEGIN: void ScriptManager::notifyFetchLyrics(const QString&, const QString&) amarok: SCRIPT "Lyricwiki" : "request URL: http://lyricwiki.org/api.php?func=getSong&artist=Air&song=Radio #1&fmt=xml" amarok: BEGIN: static QScriptValue Downloader::init(QScriptContext*, QScriptEngine*, bool) amarok: END__: static QScriptValue Downloader::init(QScriptContext*, QScriptEngine*, bool) - Took 0.0005s amarok: END__: void ScriptManager::notifyFetchLyrics(const QString&, const QString&) - Took 0.014s amarok: END__: void LyricsEngine::update() - Took 0.017s amarok: END__: virtual void LyricsEngine::message(const Context::ContextState&) - Took 0.017s amarok: BEGIN: virtual void CurrentEngine::message(const Context::ContextState&) amarok: BEGIN: void CurrentEngine::update() amarok: END__: void CurrentEngine::update() - Took 0.015s amarok: END__: virtual void CurrentEngine::message(const Context::ContextState&) - Took 0.015s amarok: END__: virtual void Context::ContextView::engineStateChanged(Phonon::State, Phonon::State) - Took 0.033s amarok: returning bookmarkcurrenttrack action amarok: BEGIN: virtual void StatusBar::engineStateChanged(Phonon::State, Phonon::State) amarok: PlayingState: clear text amarok: END__: virtual void StatusBar::engineStateChanged(Phonon::State, Phonon::State) - Took 0.00042s amarok: BEGIN: virtual void MainWindow::engineStateChanged(Phonon::State, Phonon::State) amarok: [MainWindow] Phonon state: 2 amarok: END__: virtual void MainWindow::engineStateChanged(Phonon::State, Phonon::State) - Took 0.00015s amarok: BEGIN: virtual void ProgressWidget::engineStateChanged(Phonon::State, Phonon::State) amarok: END__: virtual void ProgressWidget::engineStateChanged(Phonon::State, Phonon::State) - Took 5.2e-05s amarok: BEGIN: virtual void Amarok::OSD::engineStateChanged(Phonon::State, Phonon::State) amarok: BEGIN: virtual void Amarok::OSD::metadataChanged(Meta::TrackPtr) amarok: BEGIN: void OSDWidget::show(const QString&, QImage) amarok: END__: void OSDWidget::show(const QString&, QImage) - Took 6.7e-05s amarok: END__: virtual void Amarok::OSD::metadataChanged(Meta::TrackPtr) - Took 0.00045s amarok: END__: virtual void Amarok::OSD::engineStateChanged(Phonon::State, Phonon::State) - Took 0.00054s amarok: END__: void EngineSubject::stateChangedNotify(Phonon::State, Phonon::State) - Took 0.06s amarok: returning bookmarkcurrenttrack action amarok: BEGIN: virtual void ProgressWidget::engineNewTrackPlaying() amarok: BEGIN: virtual void ProgressWidget::engineTrackLengthChanged(long int) amarok: new length: 262 amarok: slider enabled! amarok: here 1 amarok: here 2 amarok: BEGIN: static BookmarkList PlayUrlRunner::bookmarksFromUrl(KUrl) amarok: query: "SELECT id, parent_id, name, url, description, custom FROM bookmarks WHERE url LIKE '%ZmlsZTovLy9tbnQvbXlib29rL01wMy9BL0FpciUyMC0lMjAlNUIyMDAxJTVEJTIwMTAwMDAlMjBIeiUyMExlZ2VuZC8wMyUyMC0lMjBSYWRpbyUyMCUyMzEubXA%'" amarok: END__: static BookmarkList PlayUrlRunner::bookmarksFromUrl(KUrl) - Took 0.00067s amarok: END__: virtual void ProgressWidget::engineTrackLengthChanged(long int) - Took 0.0009s amarok: END__: virtual void ProgressWidget::engineNewTrackPlaying() - Took 0.001s amarok: BEGIN: void Playlist::PrettyListView::scrollToActiveTrack() amarok: [Playlist::PrettyListView] skipping scroll? false amarok: END__: void Playlist::PrettyListView::scrollToActiveTrack() - Took 0.00028s amarok: BEGIN: virtual void TimecodeObserver::engineNewTrackPlaying() amarok: curent track name: "Radio #1" amarok: Track timecodeable amarok: END__: virtual void TimecodeObserver::engineNewTrackPlaying() - Took 0.00012s amarok: END__: void EngineController::slotNewTrackPlaying(const Phonon::MediaSource&) - Took 0.096s amarok: BEGIN: void EngineController::slotStateChanged(Phonon::State, Phonon::State) amarok: BEGIN: void EngineSubject::stateChangedNotify(Phonon::State, Phonon::State) amarok: BEGIN: virtual void Amarok::PlayPauseAction::engineStateChanged(Phonon::State, Phonon::State) amarok: NEWSTATE: 1 OLDSTATE: 2 amarok: END__: virtual void Amarok::PlayPauseAction::engineStateChanged(Phonon::State, Phonon::State) - Took 9.1e-05s amarok: returning bookmarkcurrenttrack action amarok: BEGIN: virtual void Context::ContextView::engineStateChanged(Phonon::State, Phonon::State) amarok: BEGIN: virtual void LyricsEngine::message(const Context::ContextState&) amarok: END__: virtual void LyricsEngine::message(const Context::ContextState&) - Took 0.00019s amarok: BEGIN: virtual void CurrentEngine::message(const Context::ContextState&) amarok: END__: virtual void CurrentEngine::message(const Context::ContextState&) - Took 0.0002s amarok: END__: virtual void Context::ContextView::engineStateChanged(Phonon::State, Phonon::State) - Took 0.0011s amarok: BEGIN: virtual void StatusBar::engineStateChanged(Phonon::State, Phonon::State) amarok: END__: virtual void StatusBar::engineStateChanged(Phonon::State, Phonon::State) - Took 0.00025s amarok: BEGIN: virtual void MainWindow::engineStateChanged(Phonon::State, Phonon::State) amarok: [MainWindow] Phonon state: 1 amarok: END__: virtual void MainWindow::engineStateChanged(Phonon::State, Phonon::State) - Took 0.00041s amarok: BEGIN: virtual void ProgressWidget::engineStateChanged(Phonon::State, Phonon::State) amarok: END__: virtual void ProgressWidget::engineStateChanged(Phonon::State, Phonon::State) - Took 0.00022s amarok: BEGIN: virtual void Amarok::OSD::engineStateChanged(Phonon::State, Phonon::State) amarok: END__: virtual void Amarok::OSD::engineStateChanged(Phonon::State, Phonon::State) - Took 0.00019s amarok: END__: void EngineSubject::stateChangedNotify(Phonon::State, Phonon::State) - Took 0.039s amarok: END__: void EngineController::slotStateChanged(Phonon::State, Phonon::State) - Took 0.039s amarok: BEGIN: void EngineController::slotQueueEnded() amarok: BEGIN: virtual void LyricsEngine::metadataChanged(Meta::TrackPtr) amarok: END__: virtual void LyricsEngine::metadataChanged(Meta::TrackPtr) - Took 9.9e-05s amarok: BEGIN: virtual void Amarok::OSD::metadataChanged(Meta::TrackPtr) amarok: BEGIN: void OSDWidget::show(const QString&, QImage) amarok: END__: void OSDWidget::show(const QString&, QImage) - Took 0.00027s amarok: END__: virtual void Amarok::OSD::metadataChanged(Meta::TrackPtr) - Took 0.014s amarok: BEGIN: virtual void LyricsEngine::metadataChanged(Meta::TrackPtr) amarok: END__: virtual void LyricsEngine::metadataChanged(Meta::TrackPtr) - Took 9.6e-05s amarok: BEGIN: virtual void Amarok::OSD::metadataChanged(Meta::TrackPtr) amarok: BEGIN: void OSDWidget::show(const QString&, QImage) amarok: END__: void OSDWidget::show(const QString&, QImage) - Took 0.00023s amarok: END__: virtual void Amarok::OSD::metadataChanged(Meta::TrackPtr) - Took 0.0026s amarok: BEGIN: virtual void ProgressWidget::enginePlaybackEnded(int, int, EngineObserver::PlaybackEndedReason) amarok: END__: virtual void ProgressWidget::enginePlaybackEnded(int, int, EngineObserver::PlaybackEndedReason) - Took 0.00028s amarok: BEGIN: virtual void TimecodeObserver::enginePlaybackEnded(int, int, EngineObserver::PlaybackEndedReason) amarok: END__: virtual void TimecodeObserver::enginePlaybackEnded(int, int, EngineObserver::PlaybackEndedReason) - Took 0.00019s amarok: END__: void EngineController::slotQueueEnded() - Took 0.05s amarok: BEGIN: void CurrentTrack::dataUpdated(const QString&, const QHash<QString, QVariant>&) amarok: END__: void CurrentTrack::dataUpdated(const QString&, const QHash<QString, QVariant>&) - Took 0.00075s amarok(13418)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on "local:/tmp/ksocket-mikko/amarokF13418.slave-socket" amarok(13418)/kio (Slave) KIO::Slave::createSlave: createSlave "http" for KUrl("http://lyricwiki.org/api.php?func=getSong&artist=Air&song=Radio #1&fmt=xml") amarok(13418)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on "local:/tmp/ksocket-mikko/amarokI13418.slave-socket" amarok: BEGIN: virtual void CurrentTrack::constraintsEvent(Plasma::Constraints) amarok: placing album at X: 12.5 and Y: 6.5 amarok: END__: virtual void CurrentTrack::constraintsEvent(Plasma::Constraints) - Took 0.014s amarok: BEGIN: void AmarokDownloadHelper::resultString(KJob*) amarok: BEGIN: void AmarokScript::AmarokLyricsScript::showLyrics(const QString&) const amarok: END__: void AmarokScript::AmarokLyricsScript::showLyrics(const QString&) const - Took 0.00054s amarok: END__: void AmarokDownloadHelper::resultString(KJob*) - Took 0.034s amarok: BEGIN: void CurrentEngine::stoppedState() amarok: END__: void CurrentEngine::stoppedState() - Took 0.00081s amarok: BEGIN: void CurrentTrack::dataUpdated(const QString&, const QHash<QString, QVariant>&) amarok: END__: void CurrentTrack::dataUpdated(const QString&, const QHash<QString, QVariant>&) - Took 0.00057s amarok: BEGIN: void CurrentEngine::resultReady(const QString&, const Meta::TrackList&) amarok: END__: void CurrentEngine::resultReady(const QString&, const Meta::TrackList&) - Took 0.00036s amarok: BEGIN: void CurrentEngine::setupTracksData() amarok: END__: void CurrentEngine::setupTracksData() - Took 0.00023s amarok: BEGIN: void CurrentTrack::dataUpdated(const QString&, const QHash<QString, QVariant>&) amarok: END__: void CurrentTrack::dataUpdated(const QString&, const QHash<QString, QVariant>&) - Took 0.00058s amarok: BEGIN: virtual void CurrentTrack::constraintsEvent(Plasma::Constraints) amarok: placing album at X: 12.5 and Y: 6.5 amarok: END__: virtual void CurrentTrack::constraintsEvent(Plasma::Constraints) - Took 0.011s
And this is the output of Dragon Player trying to play the same file, which it can't play: dragonplayer(13472)/phonon (KDE plugin) Phonon::KioMediaStream::KioMediaStream: dragonplayer(13472)/phonon (KDE plugin) Phonon::KioMediaStream::reset: dragonplayer(13472)/phonon (KDE plugin) Phonon::KioMediaStream::reset: dragonplayer(13472)/kio (Slave) KIO::Slave::createSlave: createSlave "file" for KUrl("file:///mnt/mybook/Mp3/A/Air - [2001] 10000 Hz Legend/03 - Radio %231.mp3") dragonplayer(13472)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on "local:/tmp/ksocket-mikko/dragonplayerH13472.slave-socket" dragonplayer(13472)/phonon (KDE plugin) Phonon::KioMediaStreamPrivate::_k_bytestreamSeekDone: 0 dragonplayer(13472)/phonon (KDE plugin) Phonon::KioMediaStreamPrivate::_k_bytestreamFileJobOpen: 8860351 xine is asking to seek behind the end of the data stream dragonplayer(13472)/phonon (KDE plugin) Phonon::KioMediaStream::seekStream: 8860223 = 8860223 dragonplayer(13472)/phonon (KDE plugin) Phonon::KioMediaStreamPrivate::_k_bytestreamData: seeking: do nothing dragonplayer(13472)/phonon (KDE plugin) Phonon::KioMediaStreamPrivate::_k_bytestreamSeekDone: 8860223 dragonplayer(13472)/phonon (KDE plugin) Phonon::KioMediaStreamPrivate::_k_bytestreamData: empty data: stopping the stream dragonplayer(13472)/phonon (KDE plugin) Phonon::KioMediaStream::seekStream: no job/job finished -> recreate it dragonplayer(13472)/phonon (KDE plugin) Phonon::KioMediaStream::reset: dragonplayer(13472)/kio (Slave) KIO::Slave::kill: killing slave pid 13400 ( "file://" ) dragonplayer(13472)/phonon (KDE plugin) Phonon::KioMediaStream::seekStream: 0 = 0 dragonplayer(13472)/kio (Slave) KIO::Slave::createSlave: createSlave "file" for KUrl("file:///mnt/mybook/Mp3/A/Air - [2001] 10000 Hz Legend/03 - Radio %231.mp3") dragonplayer(13472)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on "local:/tmp/ksocket-mikko/dragonplayerJ13472.slave-socket" dragonplayer(13472)/phonon (KDE plugin) Phonon::KioMediaStreamPrivate::_k_bytestreamSeekDone: 0 dragonplayer(13472)/phonon (KDE plugin) Phonon::KioMediaStreamPrivate::_k_bytestreamFileJobOpen: 8860351 dragonplayer(13472)/phonon (KDE plugin) Phonon::KioMediaStream::enoughData:
*** Bug 196355 has been marked as a duplicate of this bug. ***
I just had a look into the phonon source code and noticed that there is already some special treatment for non-alphanumerical characters in place there, but the listing of these cases isn't quite complete... Proposed fix: In the file branches/phonon/4.3/xine/mediaobject.cpp, in the if-clause in line 324, append " || c == '#'", making the line look like this: if (c & 0x80 || c == '\\' || c < 32 || c == '%' || c == '#') { After recompiling phonon with this change, both dragon player and amarok were able to play a file containing # in its name :-) Additional thought: If someone thinks it's necessary, obviously one could also include any other characters that aren't working as of now into this list (I didn't test any others except #). Maybe it would be even better to just extend the range of ASCII codes to some value above 32, i.e. to change the whole line to: if (c & 0x80 || c == '\\' || c < 44) { This would mean to include all of the following characters (note the space at the beginning): !"#$%&'()*+
Created attachment 34522 [details] proposed simple patch, including only #
does this patch apply to phonon/xine/mediaobject.cpp or phonon/phonon/mediaobject.cpp ?
(In reply to comment #5) > does this patch apply to phonon/xine/mediaobject.cpp or > phonon/phonon/mediaobject.cpp ? the patch applies to phonon/xine/mediaobject.cpp as found here: http://websvn.kde.org/branches/phonon/4.3/xine/mediaobject.cpp?revision=924144&view=markup
I can confirm the patch applies and works fine also with phonon from trunk. Please apply it upstream. Thanks
Comment on attachment 34522 [details] proposed simple patch, including only # see post #3 for additional comments.
*** Bug 197035 has been marked as a duplicate of this bug. ***
fixed in rev 983650 http://websvn.kde.org/?view=rev&revision=983650
*** Bug 197349 has been marked as a duplicate of this bug. ***
*** Bug 197583 has been marked as a duplicate of this bug. ***
*** Bug 198745 has been marked as a duplicate of this bug. ***
*** Bug 199182 has been marked as a duplicate of this bug. ***
*** Bug 200585 has been marked as a duplicate of this bug. ***
*** Bug 205519 has been marked as a duplicate of this bug. ***
*** Bug 206923 has been marked as a duplicate of this bug. ***
*** Bug 208904 has been marked as a duplicate of this bug. ***
*** Bug 210704 has been marked as a duplicate of this bug. ***
*** Bug 210903 has been marked as a duplicate of this bug. ***
*** Bug 211355 has been marked as a duplicate of this bug. ***
*** Bug 213700 has been marked as a duplicate of this bug. ***
*** Bug 214731 has been marked as a duplicate of this bug. ***
*** Bug 224945 has been marked as a duplicate of this bug. ***
*** Bug 229188 has been marked as a duplicate of this bug. ***