Added icons association with extensions

- .webm -- basically is full video container (video+audio)
- .weba -- is only audio stream
- .webp -- is a picture
This commit is contained in:
AskOldIch 2023-01-03 16:57:42 +00:00
parent c1b7105321
commit 2cf95b410d
No known key found for this signature in database
GPG Key ID: BF91DF87BD653598

View File

@ -33,13 +33,15 @@ static QString getInfoFromFilename(const QString& filename, bool anyForUnknown,
{
QString ext = QFileInfo(filename).suffix().toLower();
if (ext == "jpg" || ext == "jpeg" || ext == "tif" || ext == "tiff" || ext == "png" || ext == "gif" || ext == "bmp" || ext == "ico" || ext == "svg") {
if (ext == "jpg" || ext == "jpeg" || ext == "tif" || ext == "tiff" || ext == "png" || ext == "gif" ||
ext == "bmp" || ext == "ico" || ext == "svg" || ext == "webp") {
return image ? ":/icons/filetype/picture.svg" : QApplication::translate("FilesDefs", "Picture");
} else if (ext == "avi" || ext == "mpg" || ext == "mpeg" || ext == "wmv" || ext == "divx" || ext == "ts" ||
ext == "mkv" || ext == "mp4" || ext == "flv" || ext == "mov" || ext == "asf" || ext == "xvid" ||
ext == "vob" || ext == "qt" || ext == "rm" || ext == "3gp" || ext == "ogm") {
ext == "vob" || ext == "qt" || ext == "rm" || ext == "3gp" || ext == "ogm" || ext == "webm") {
return image ? ":/icons/filetype/video.svg" : QApplication::translate("FilesDefs", "Video");
} else if (ext == "ogg" || ext == "mp3" || ext == "mp1" || ext == "mp2" || ext == "wav" || ext == "wma" || ext == "m4a" || ext == "flac" ||ext == "xpm") {
} else if (ext == "ogg" || ext == "mp3" || ext == "mp1" || ext == "mp2" || ext == "wav" || ext == "wma" ||
ext == "m4a" || ext == "flac" || ext == "xpm" || ext == "weba") {
return image ? ":/icons/filetype/audio.svg" : QApplication::translate("FilesDefs", "Audio");
} else if (ext == "tar" || ext == "bz2" || ext == "zip" || ext == "gz" || ext == "7z" || ext == "msi" ||
ext == "rar" || ext == "rpm" || ext == "ace" || ext == "jar" || ext == "tgz" || ext == "lha" ||