From 18c7f3d5ed61124fd13da6d11a12ab0386e47543 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Fri, 30 Nov 2012 16:56:23 +0100 Subject: [PATCH] Support m4a and flac in dropbox. --- ext/clementine-tagreader/tagreaderworker.cpp | 6 ++++-- src/internet/dropboxservice.cpp | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ext/clementine-tagreader/tagreaderworker.cpp b/ext/clementine-tagreader/tagreaderworker.cpp index d585fdb1a..781dc6e23 100644 --- a/ext/clementine-tagreader/tagreaderworker.cpp +++ b/ext/clementine-tagreader/tagreaderworker.cpp @@ -613,7 +613,8 @@ bool TagReaderWorker::ReadCloudFile(const QUrl& download_url, stream, // Takes ownership. TagLib::ID3v2::FrameFactory::instance(), TagLib::AudioProperties::Accurate)); - } else if (mime_type == "audio/mpeg" && title.endsWith(".m4a")) { + } else if (mime_type == "audio/mp4" || + (mime_type == "audio/mpeg" && title.endsWith(".m4a"))) { tag.reset(new TagLib::MP4::File( stream, true, @@ -624,7 +625,8 @@ bool TagReaderWorker::ReadCloudFile(const QUrl& download_url, stream, true, TagLib::AudioProperties::Accurate)); - } else if (mime_type == "application/x-flac") { + } else if (mime_type == "application/x-flac" || + mime_type == "audio/flac") { tag.reset(new TagLib::FLAC::File( stream, TagLib::ID3v2::FrameFactory::instance(), diff --git a/src/internet/dropboxservice.cpp b/src/internet/dropboxservice.cpp index 3801d6f7e..42d8e7af5 100644 --- a/src/internet/dropboxservice.cpp +++ b/src/internet/dropboxservice.cpp @@ -100,7 +100,9 @@ namespace { bool IsSupportedMimeType(const QString& mime_type) { return mime_type == "audio/ogg" || - mime_type == "audio/mpeg"; + mime_type == "audio/mpeg" || + mime_type == "audio/mp4" || + mime_type == "audio/flac"; } } // namespace