Bug 509204 - Storage of main playlist removes protocol and host parts from radio streams
Summary: Storage of main playlist removes protocol and host parts from radio streams
Status: REPORTED
Alias: None
Product: amarok
Classification: Applications
Component: Playlist (other bugs)
Version First Reported In: 3.3.1
Platform: Other Linux
: NOR normal
Target Milestone: kf5
Assignee: Amarok Bugs
URL:
Keywords:
: 510792 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-09-06 18:09 UTC by Pierre Willenbrock
Modified: 2025-10-19 15:29 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Willenbrock 2025-09-06 18:09:39 UTC
Commit 09b64d459540717c24c8c337f662c9b5101af303 introduced a change that fails to encode the protocol and host fields of URLs in the location elements in the ~/.local/share/amarok/current.xspf playlist file.

STEPS TO REPRODUCE
1. Add a radio stream to the playlist
2. exit and restart amarok

OBSERVED RESULT
In the gui, the newly added stream is reduced to only the path part.

EXPECTED RESULT
The whole URL is being kept in an equivalent encoding.

SOFTWARE/OS VERSIONS
Linux: Gentoo Linux
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.2

ADDITIONAL INFORMATION
It looks like the change should have kept using QUrl::toString(encoded the full URL as string) instead of changing to QUrl::path(encoded the path part of the URL as string), at least for things that actually are non-local URLs, but maybe the code changed in the above mentioned commit should not have been used for storing the current.xspf at all.
Comment 1 Tuomas Nurmi 2025-09-13 09:01:00 UTC
Thank you for the report!
As one can observe from e.g. various bug reports, commit history & various online resources, playlist files and encoding/escaping characters are a complex beast.
I'll try to have a look at some point and see if something can be done without breaking something else & some related test cases added for this, too.
Comment 2 Joachim Mairböck 2025-10-19 15:29:05 UTC
*** Bug 510792 has been marked as a duplicate of this bug. ***