diff --git a/qml/flowplayer.qml b/qml/flowplayer.qml index 1431ead..487fcae 100644 --- a/qml/flowplayer.qml +++ b/qml/flowplayer.qml @@ -430,7 +430,7 @@ ApplicationWindow // Hard coded. FIXME: JB#22001. desktopEntry: "jolla-mediaplayer" supportedUriSchemes: ["file", "http", "https"] - supportedMimeTypes: ["audio/x-wav", "audio/mp4", "audio/mpeg", "audio/x-vorbis+ogg"] + supportedMimeTypes: ["audio/x-wav", "audio/mp4", "audio/mpeg", "audio/x-vorbis+ogg", "audio/ogg", "audio/opus"] // Mpris2 Player Interface canControl: currentSongInfo !== [] diff --git a/src/datareader.cpp b/src/datareader.cpp index 783acad..88bdc1f 100644 --- a/src/datareader.cpp +++ b/src/datareader.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -165,6 +166,8 @@ TagLib::File* DataReader::getFileByMimeType(QString file) return new TagLib::FLAC::File(file.toUtf8()); } else if(str.endsWith(".ogg")) { return new TagLib::Ogg::Vorbis::File(file.toUtf8()); + } else if(str.endsWith(".opus")) { + return new TagLib::Ogg::Opus::File(file.toUtf8()); } else if(str.endsWith(".wav")) { return new TagLib::RIFF::WAV::File(file.toUtf8()); } else if(str.endsWith(".m4a")) { diff --git a/src/meta.cpp b/src/meta.cpp index 52c6efc..afd4b6b 100644 --- a/src/meta.cpp +++ b/src/meta.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -137,6 +138,8 @@ TagLib::File* Meta::getFileByMimeType(QString file) return new TagLib::FLAC::File(file.toUtf8()); } else if(str.endsWith(".ogg")) { return new TagLib::Ogg::Vorbis::File(file.toUtf8()); + } else if(str.endsWith(".opus")) { + return new TagLib::Ogg::Opus::File(file.toUtf8()); } else if(str.endsWith(".wav")) { return new TagLib::RIFF::WAV::File(file.toUtf8()); } else if(str.endsWith(".m4a")) { diff --git a/src/utils.cpp b/src/utils.cpp index cfba209..1ce7f78 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -697,6 +697,7 @@ void Utils::getFolderItems(QString path) emit appendFile(fileInfo.fileName(), fileInfo.absoluteFilePath(), "folder"); else if (fileInfo.fileName().endsWith(".mp3") || fileInfo.fileName().endsWith(".m4a") || fileInfo.fileName().endsWith(".wma") || fileInfo.fileName().endsWith(".ogg") || + fileInfo.fileName().endsWith(".opus") || fileInfo.fileName().endsWith(".flac") || fileInfo.fileName().endsWith(".wav") || fileInfo.fileName().endsWith(".asf")) emit appendFile(fileInfo.fileName(), fileInfo.absoluteFilePath(), "sounds");