Bug 435779 - Files on the playlist with unusual characters are not recognized again after being temporarily unavailable
Summary: Files on the playlist with unusual characters are not recognized again after ...
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playlist (show other bugs)
Version: 2.9.71
Platform: openSUSE Linux
: NOR normal
Target Milestone: kf5
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-15 16:10 UTC by Frank Schaefer
Modified: 2024-06-29 18:02 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Schaefer 2021-04-15 16:10:52 UTC
SUMMARY
Files on the playlist with unusual characters are not recognized again after being temporarily unavailable.

STEPS TO REPRODUCE
1. add file with e.g. one of the German characters ä/ö/ü in filename to playlist
2. exit Amarok
3. make file unavailable (e.g. unmount device or change its' directories name)
4. start Amarok (file on playlist is greyed out, which is correct)
5. exit Amarok
6. make file available again (same path of course)
7. start Amarok

OBSERVED RESULT
Although being available again, the file is still greyed out on the playlist.
Hint: a right click / "Edit Track Details" unveils that the ä/ö/ü character(s) are not displayed correctly in the "Location" field. So it looks like a character set issue.

EXPECTED RESULT
File should be recognized correctly and not be greyed out.

SOFTWARE/OS VERSIONS
Linux x86 32bit
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Comment 1 Myriam Schweingruber 2021-04-16 12:45:54 UTC
Are you talking about special characters in ID3 tags or actual characters in file names? You do know that these characters have never been supported in file names on computers, don't you?
Is the track in the collection and is the collection set to be checked automatically?
Comment 2 Frank Schaefer 2021-04-17 12:41:26 UTC
(In reply to Myriam Schweingruber from comment #1)
> Are you talking about special characters in ID3 tags or actual characters in
> file names? 
File names. I've verified that ID tags don't matter.

> You do know that these characters have never been supported in
> file names on computers, don't you?
Almost all file systems support unicode these days and it is working fine (except this issue).
Please note that the filename is recognized correctly when adding the file to the playlist and also on all further Amarok exit/restart cycles.
I also tried with files on ext4 and NTFS partitions and that makes no difference.
So I'm pretty sure a file system or mount parameter issue can be ruled out.

> Is the track in the collection and is the collection set to be checked
> automatically?
That doesn't matter. Bug occurs in any of these cases.
Comment 3 Tuomas Nurmi 2024-06-20 16:20:14 UTC
Tested on Amarok 3.0.1, Debian Bullseye (LANG=fi_FI.UTF-8):
Added an album in collection with 3 tracks to playlist: Track01öä.ogg, Track02.ogg, and Track03.ogg. Visible normally.
Exited Amarok
Moved the directory containing the three tracks.
Started Amarok. The tracks are greyed. Exited Amarok.
Moved the directory back. Started Amarok. The tracks are recognized correctly.

However, if I add Track01öä.ogg to playlist when it does not reside in a collection path and repeat the steps, it stays greyed out and it's path contains garbled characters.
Comment 4 Bug Janitor Service 2024-06-28 11:10:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/amarok/-/merge_requests/108
Comment 5 Tuomas Nurmi 2024-06-29 18:02:25 UTC
Git commit 1255e9a6297a6916343a9dc94459e1e8c3a43e63 by Tuomas Nurmi.
Committed on 29/06/2024 at 17:55.
Pushed by nurmi into branch 'master'.

Load paths from XSPF playlists as UTF-8

The saving code writes them in UTF-8 and the xml header generated states that the
encoding is UTF-8, so they should be definitely also read as UTF-8.

M  +1    -0    ChangeLog
M  +1    -1    src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp

https://invent.kde.org/multimedia/amarok/-/commit/1255e9a6297a6916343a9dc94459e1e8c3a43e63