Bug 389187 - Can't properly open .m3u playlist files whose filename contains all non-ASCII characters
Summary: Can't properly open .m3u playlist files whose filename contains all non-ASCII...
Status: CONFIRMED
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-19 03:53 UTC by TOM Harrison
Modified: 2021-03-02 21:55 UTC (History)
3 users (show)

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


Attachments
Image that show this issue. (53.63 KB, image/png)
2018-01-19 03:53 UTC, TOM Harrison
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TOM Harrison 2018-01-19 03:53:18 UTC
Created attachment 109977 [details]
Image that show this issue.

if player list contain none English file name, Elisa will show incorrect name and unable to play that song.

I have test that rename that file into English word, It could play normally.
Comment 1 TOM Harrison 2018-01-19 08:38:48 UTC
As far As I know, It cause by loadPlaylist line
d->mLoadPlaylist.load(fileName, "m3u");

QMediaPlaylist load m3u file with ASCII.
Comment 2 Matthieu Gallien 2018-01-19 20:30:48 UTC
Thanks for the analysis. I will have a look at it. I believe I will have to report it and fix it upstream in Qt. In this case, I will have to close this report.
Comment 3 Matthieu Gallien 2018-09-05 18:42:33 UTC
Sorry for the delay in handling your report.
Do you still remember what was the exact scenari ?

If I have understood correctly, you are loading a playlist using m3u format but with non ascii characters ?

In this case, could you please confirm and we can put this report into CONFIRMED state.
Comment 4 TOM Harrison 2018-09-05 23:46:26 UTC
(In reply to Matthieu Gallien from comment #3)
> Sorry for the delay in handling your report.
> Do you still remember what was the exact scenari ?
> 
> If I have understood correctly, you are loading a playlist using m3u format
> but with non ascii characters ?
> 
> In this case, could you please confirm and we can put this report into
> CONFIRMED state.

as far as I remember, yes.
Comment 5 Gabriel Marcano 2020-05-17 03:02:31 UTC
So, I did a little bit of experimentation. It looks like the proper playlist file extension for UTF-8 encoded files is .m3u8 . The Elisa "Load Playlist" prompt does not show .m3u8 files, but putting in the full path in the selection works.

For testing, I made a playlist with the name ゾ.m3u and with a two entries, one ゾ.flac and another test.flac. I copied the ゾ.m3u playlist to ゾ.m4u8 .

Elisa's UI silently chokes on the ゾ.m3u and prints out in the console:
  kf5.kfilemetadata: Unable to open file readonly:  "/home/test/Music/ã\u0082¾.flac

Only the test.flac entry is shown in the UI in this case.

If I give it the ゾ.m4u8 manually by specifying the full path, both files in the playlist show.
Comment 6 csukask 2020-06-18 07:16:28 UTC
Same here. Version 20.4.2

It fails to open playlist saved as m3u but works well with m3u8.
Problem is that it does not display m3u8 files in open playlist window.
Comment 7 Nate Graham 2021-03-01 18:31:34 UTC
You can rename your .m3u playlist files to .m3u8. This fix for Elisa should help too: https://invent.kde.org/multimedia/elisa/-/merge_requests/219
Comment 8 Nate Graham 2021-03-02 21:54:11 UTC
Git commit 085836632556c00bc56219e00a382a7a80680747 by Nate Graham.
Committed on 02/03/2021 at 21:53.
Pushed by ngraham into branch 'master'.

Prefer m3u8 over m3u as a playlist format

m3u files, when loaded by an audio player, will cause it to choke on
entries with non-ASCII characters--even if the file itself is UTF-8
encoded. To make this work, the filename extension itself must be m3u8,
not m3u.

Elisa already transparently supports files with the .m3u8 extension, but
does not save in this file format by default, and does not list them for
opening in its open dialog.

This commit makes Elisa able to open m3u8 files from its file dialog and
save playlists in that format by default.

M  +1    -1    autotests/mediaplaylistproxymodeltest.cpp
M  +1    -1    doc/index.docbook
M  +2    -2    src/mediaplaylistproxymodel.cpp
M  +2    -2    src/qml/MediaPlayListView.qml

https://invent.kde.org/multimedia/elisa/commit/085836632556c00bc56219e00a382a7a80680747
Comment 9 Nate Graham 2021-03-02 21:55:52 UTC
Note that the above commit does not fully fix this bug.

You can rename your playlist files from .m3u to .m3u8 and they will work properly, but we lack a way in Elisa to automatically treat .m3u playlists as .m3u8. In theory passing "m3u8" to the format argument of QMediaPlaylist::load() should do this, but it does not seem to work.