1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-19 04:50:16 +01:00

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. stream, // Takes ownership.
TagLib::ID3v2::FrameFactory::instance(), TagLib::ID3v2::FrameFactory::instance(),
TagLib::AudioProperties::Accurate)); 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( tag.reset(new TagLib::MP4::File(
stream, stream,
true, true,
@ -624,7 +625,8 @@ bool TagReaderWorker::ReadCloudFile(const QUrl& download_url,
stream, stream,
true, true,
TagLib::AudioProperties::Accurate)); 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( tag.reset(new TagLib::FLAC::File(
stream, stream,
TagLib::ID3v2::FrameFactory::instance(), TagLib::ID3v2::FrameFactory::instance(),

View File

@ -100,7 +100,9 @@ namespace {
bool IsSupportedMimeType(const QString& mime_type) { bool IsSupportedMimeType(const QString& mime_type) {
return mime_type == "audio/ogg" || return mime_type == "audio/ogg" ||
mime_type == "audio/mpeg"; mime_type == "audio/mpeg" ||
mime_type == "audio/mp4" ||
mime_type == "audio/flac";
} }
} // namespace } // namespace