Support m4a and flac in dropbox.

This commit is contained in:
John Maguire 2012-11-30 16:56:23 +01:00
parent 7058d238fb
commit 18c7f3d5ed
2 changed files with 7 additions and 3 deletions

View File

@ -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(),

View File

@ -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