diff --git a/ext/libstrawberry-tagreader/tagreadermessages.proto b/ext/libstrawberry-tagreader/tagreadermessages.proto index dadaf3a05..e68fc20d9 100644 --- a/ext/libstrawberry-tagreader/tagreadermessages.proto +++ b/ext/libstrawberry-tagreader/tagreadermessages.proto @@ -25,6 +25,8 @@ message SongMetadata { APE = 17; MOD = 18; S3M = 19; + XM = 20; + IT = 21; CDDA = 90; STREAM = 91; } diff --git a/ext/libstrawberry-tagreader/tagreadertaglib.cpp b/ext/libstrawberry-tagreader/tagreadertaglib.cpp index f2bc6d335..650448c15 100644 --- a/ext/libstrawberry-tagreader/tagreadertaglib.cpp +++ b/ext/libstrawberry-tagreader/tagreadertaglib.cpp @@ -69,6 +69,8 @@ #include #include #include +#include +#include #ifdef HAVE_TAGLIB_DSFFILE # include #endif @@ -167,6 +169,8 @@ spb::tagreader::SongMetadata_FileType TagReaderTagLib::GuessFileType(TagLib::Fil if (dynamic_cast(fileref->file())) return spb::tagreader::SongMetadata_FileType_APE; if (dynamic_cast(fileref->file())) return spb::tagreader::SongMetadata_FileType_MOD; if (dynamic_cast(fileref->file())) return spb::tagreader::SongMetadata_FileType_S3M; + if (dynamic_cast(fileref->file())) return spb::tagreader::SongMetadata_FileType_XM; + if (dynamic_cast(fileref->file())) return spb::tagreader::SongMetadata_FileType_IT; #ifdef HAVE_TAGLIB_DSFFILE if (dynamic_cast(fileref->file())) return spb::tagreader::SongMetadata_FileType_DSF; #endif diff --git a/src/core/song.cpp b/src/core/song.cpp index 5e5de2896..9444244f7 100644 --- a/src/core/song.cpp +++ b/src/core/song.cpp @@ -600,6 +600,8 @@ QString Song::TextForFiletype(FileType filetype) { case Song::FileType_APE: return "Monkey's Audio"; case Song::FileType_MOD: return "Module Music Format"; case Song::FileType_S3M: return "Module Music Format"; + case Song::FileType_XM: return "Module Music Format"; + case Song::FileType_IT: return "Module Music Format"; case Song::FileType_CDDA: return "CDDA"; case Song::FileType_Stream: return "Stream"; case Song::FileType_Unknown: @@ -629,6 +631,8 @@ QString Song::ExtensionForFiletype(FileType filetype) { case Song::FileType_APE: return "ape"; case Song::FileType_MOD: return "mod"; case Song::FileType_S3M: return "s3m"; + case Song::FileType_XM: return "xm"; + case Song::FileType_IT: return "it"; case Song::FileType_Unknown: default: return "dat"; } @@ -657,6 +661,8 @@ QIcon Song::IconForFiletype(FileType filetype) { case Song::FileType_APE: return IconLoader::Load("ape"); case Song::FileType_MOD: return IconLoader::Load("mod"); case Song::FileType_S3M: return IconLoader::Load("s3m"); + case Song::FileType_XM: return IconLoader::Load("xm"); + case Song::FileType_IT: return IconLoader::Load("it"); case Song::FileType_CDDA: return IconLoader::Load("cd"); case Song::FileType_Stream: return IconLoader::Load("applications-internet"); case Song::FileType_Unknown: @@ -751,6 +757,8 @@ Song::FileType Song::FiletypeByExtension(const QString &ext) { ext.compare("nst", Qt::CaseInsensitive) == 0|| ext.compare("wow", Qt::CaseInsensitive) == 0) return Song::FileType_MOD; else if (ext.compare("s3m", Qt::CaseInsensitive) == 0) return Song::FileType_S3M; + else if (ext.compare("xm", Qt::CaseInsensitive) == 0) return Song::FileType_XM; + else if (ext.compare("it", Qt::CaseInsensitive) == 0) return Song::FileType_IT; else return Song::FileType_Unknown; diff --git a/src/core/song.h b/src/core/song.h index 6771d7255..5fcd75cf3 100644 --- a/src/core/song.h +++ b/src/core/song.h @@ -104,6 +104,8 @@ class Song { FileType_APE = 17, FileType_MOD = 18, FileType_S3M = 19, + FileType_XM = 20, + FileType_IT = 21, FileType_CDDA = 90, FileType_Stream = 91, };