Commit c98841a2 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

use extension ".oga" instead of ".ogg" for Ogg audio files (Debian Bug #498352)

parent 95675390
......@@ -592,11 +592,11 @@ bool OggFile::hasTagV2() const
/**
* Get file extension including the dot.
*
* @return file extension ".ogg".
* @return file extension ".oga".
*/
QString OggFile::getFileExtension() const
{
return ".ogg";
return ".oga";
}
#ifdef HAVE_VORBIS
......@@ -907,7 +907,8 @@ bool OggFile::CommentList::setValue(const QString& name, const QString& value)
TaggedFile* OggFile::Resolver::createFile(const DirInfo* di,
const QString& fn) const
{
if (fn.right(4).QCM_toLower() == ".ogg")
QString ext = fn.right(4).QCM_toLower();
if (ext == ".oga" || ext == ".ogg")
return new OggFile(di, fn);
else
return 0;
......@@ -920,7 +921,7 @@ TaggedFile* OggFile::Resolver::createFile(const DirInfo* di,
*/
QStringList OggFile::Resolver::getSupportedFileExtensions() const
{
return QStringList() << ".ogg";
return QStringList() << ".oga" << ".ogg";
}
#endif // HAVE_VORBIS || define HAVE_FLAC
......@@ -250,7 +250,7 @@ public:
/**
* Get file extension including the dot.
*
* @return file extension ".ogg".
* @return file extension ".oga".
*/
virtual QString getFileExtension() const;
......
......@@ -1347,7 +1347,7 @@ QString TagLibFile::getFileExtension() const
if (dynamic_cast<TagLib::MPEG::File*>(file) != 0) {
return ".mp3";
} else if (dynamic_cast<TagLib::Vorbis::File*>(file) != 0) {
return ".ogg";
return ".oga";
} else if (dynamic_cast<TagLib::FLAC::File*>(file) != 0) {
return ".flac";
} else if (dynamic_cast<TagLib::MPC::File*>(file) != 0) {
......@@ -3119,7 +3119,7 @@ TaggedFile* TagLibFile::Resolver::createFile(const DirInfo* di,
&& Kid3App::s_miscCfg.m_id3v2Version == MiscConfig::ID3v2_4_0
#endif
)
|| ext == ".mpc" || ext == ".ogg" || ext == "flac"
|| ext == ".mpc" || ext == ".oga" || ext == ".ogg" || ext == "flac"
|| ext == ".spx" || ext == ".tta"
|| ext.right(3) == ".wv")
return new TagLibFile(di, fn);
......@@ -3134,7 +3134,7 @@ TaggedFile* TagLibFile::Resolver::createFile(const DirInfo* di,
*/
QStringList TagLibFile::Resolver::getSupportedFileExtensions() const
{
return QStringList() << ".flac" << ".mp3" << ".mpc" << ".ogg" <<
return QStringList() << ".flac" << ".mp3" << ".mpc" << ".oga" << ".ogg" <<
".spx" << ".tta" << ".aac" << ".mp2" << ".wv";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment