diff --git a/ChangeLog b/ChangeLog index f84698d52..a3b8311fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -52,8 +52,8 @@ 6. Fix decoding of Cantata HTTP stream URLs. 7. Work-around issue of non display of main window when using transparent QtCurve theme. -8. Fix playing of FLAC files external to MPD database via Cantata's simple HTTP - server. +8. Fix playing of some non-MP3 files external to MPD database via Cantata's + simple HTTP server. 9. Prevent multiple KDE Cantata windows appearing if app is attempted to be started repeatedly in quick succession. diff --git a/devices/filetyperesolver.cpp b/devices/filetyperesolver.cpp index 21305175d..6e5582260 100644 --- a/devices/filetyperesolver.cpp +++ b/devices/filetyperesolver.cpp @@ -114,8 +114,6 @@ TagLib::File *Meta::Tag::FileTypeResolver::createFile(TagLib::FileName fileName, delete result; result = new TagLib::Ogg::FLAC::File(fileName, readProperties, propertiesStyle); } - } else if (suffix == QLatin1String("wma")) { - result = new TagLib::ASF::File(fileName, readProperties, propertiesStyle); } #endif // else if (suffix == QLatin1String("m4a") || suffix == QLatin1String("m4b") diff --git a/http/httpsocket.cpp b/http/httpsocket.cpp index ccf936738..68ddb291e 100644 --- a/http/httpsocket.cpp +++ b/http/httpsocket.cpp @@ -35,6 +35,7 @@ #include #ifdef TAGLIB_FOUND #include +#include #include #include #endif @@ -73,19 +74,36 @@ static QString detectMimeType(const QString &file) } delete result; } - return mime; + if (mime.isEmpty()) { + result = new TagLib::TrueAudio::File(encodedName, false, TagLib::AudioProperties::Fast); + if (result->isValid()) { + mime="audio/x-speex+ogg"; + } + delete result; + } + return "audio/ogg"; } #endif else if (suffix == QLatin1String("flac")) { return "audio/x-flac"; } else if (suffix == QLatin1String("wma")) { return "audio/x-ms-wma"; - } - else if (suffix == QLatin1String("m4a") || suffix == QLatin1String("m4b") || suffix == QLatin1String("m4p") || suffix == QLatin1String("mp4")) { - return "audio/mp4"; - } - else if (suffix == QLatin1String("wav")) { + } else if (suffix == QLatin1String("m4a") || suffix == QLatin1String("m4b") || suffix == QLatin1String("m4p") || suffix == QLatin1String("mp4")) { + return "audio/mp4"; + } else if (suffix == QLatin1String("wav")) { return "audio/x-wav"; + } else if (suffix == QLatin1String("wv") || suffix == QLatin1String("wvp")) { + return "audio/x-wavpack"; + } else if (suffix == QLatin1String("ape")) { + return "audio/x-ape"; + } else if (suffix == QLatin1String("spx")) { + return "audio/x-speex"; + } else if (suffix == QLatin1String("tta")) { + return "audio/x-tta"; + } else if (suffix == QLatin1String("aiff") || suffix == QLatin1String("aif") || suffix == QLatin1String("aifc")) { + return "audio/x-aiff"; + } else if (suffix == QLatin1String("mpc") || suffix == QLatin1String("mpp") || suffix == QLatin1String("mp+")) { + return "audio/x-musepack"; } #endif return QString();