Commit 08583663 authored by Nate Graham's avatar Nate Graham
Browse files

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.

CCBUG: 389187
parent b441ad96
Pipeline #52892 passed with stage
in 9 minutes and 16 seconds
......@@ -1149,7 +1149,7 @@ void MediaPlayListProxyModelTest::testSaveLoadPlayList()
QCOMPARE(myPlayListProxyModelSave.currentTrack(), QPersistentModelIndex(myPlayListProxyModelSave.index(0, 0)));
QTemporaryFile playlistFile(QStringLiteral("./myPlaylistXXXXXX.m3u"));
QTemporaryFile playlistFile(QStringLiteral("./myPlaylistXXXXXX.m3u8"));;
QCOMPARE(myPlayListProxyModelSave.savePlayList(QUrl::fromLocalFile(playlistFile.fileName())), true);
......@@ -156,7 +156,7 @@ A toolbar below the playlist allows to operate on it. The following actions are
You can save the playlist to the m3u format.
You can save the playlist to the m3u8 format.
......@@ -723,13 +723,13 @@ bool MediaPlayListProxyModel::savePlayList(const QUrl &fileName)
return, "m3u");
return, "m3u8");
void MediaPlayListProxyModel::loadPlayList(const QUrl &fileName)
d->mLoadPlaylist.load(fileName, "m3u");
d->mLoadPlaylist.load(fileName, "m3u8");
void MediaPlayListProxyModel::loadPlayListLoaded()
......@@ -368,9 +368,9 @@ Kirigami.Page {
PlatformDialog.FileDialog {
id: fileDialog
defaultSuffix: 'm3u'
defaultSuffix: 'm3u8'
folder: PlatformDialog.StandardPaths.writableLocation(PlatformDialog.StandardPaths.MusicLocation)
nameFilters: [i18nc("file type (mime type) for m3u playlist", "Playlist (*.m3u)")]
nameFilters: [i18nc("file type (mime type) for m3u and m3u8 playlist file formats", "Playlist (*.m3u*)")]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment