mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
Base+Userland: Add support for QOA files everywhere
This adds MIME type sniffing, `file` support, LaunchServer support to open QOA in SoundPlayer, and audio icons
This commit is contained in:
parent
0f7a5006d1
commit
61bb9103c2
|
@ -28,7 +28,7 @@ presenter=*.presenter
|
||||||
python=*.py
|
python=*.py
|
||||||
ruby=*.rb
|
ruby=*.rb
|
||||||
shell=*.sh,*.bash,*.zsh
|
shell=*.sh,*.bash,*.zsh
|
||||||
sound=*.wav,*.flac,*.mp3
|
sound=*.wav,*.flac,*.mp3,*.qoa
|
||||||
spreadsheet=*.sheets,*.csv
|
spreadsheet=*.sheets,*.csv
|
||||||
text=*.txt
|
text=*.txt
|
||||||
truetype=*.ttf
|
truetype=*.ttf
|
||||||
|
|
|
@ -17,6 +17,7 @@ flac=/bin/SoundPlayer
|
||||||
m3u=/bin/SoundPlayer
|
m3u=/bin/SoundPlayer
|
||||||
m3u8=/bin/SoundPlayer
|
m3u8=/bin/SoundPlayer
|
||||||
mp3=/bin/SoundPlayer
|
mp3=/bin/SoundPlayer
|
||||||
|
qoa=/bin/SoundPlayer
|
||||||
txt=/bin/TextEditor
|
txt=/bin/TextEditor
|
||||||
font=/bin/FontEditor
|
font=/bin/FontEditor
|
||||||
sheets=/bin/Spreadsheet
|
sheets=/bin/Spreadsheet
|
||||||
|
|
|
@ -4,5 +4,5 @@ Executable=/bin/SoundPlayer
|
||||||
Category=Media
|
Category=Media
|
||||||
|
|
||||||
[Launcher]
|
[Launcher]
|
||||||
FileTypes=mp3,flac,m3u,m3u8,wav
|
FileTypes=mp3,flac,m3u,m3u8,qoa,wav
|
||||||
MimeTypes=audio/mpeg,audio/wave,audio/flac
|
MimeTypes=audio/mpeg,audio/wave,audio/flac,audio/qoa
|
||||||
|
|
|
@ -145,6 +145,7 @@ StringView guess_mime_type_based_on_filename(StringView path)
|
||||||
__ENUMERATE_MIME_TYPE_HEADER(png, "image/png", 0, 8, 0x89, 'P', 'N', 'G', 0x0D, 0x0A, 0x1A, 0x0A) \
|
__ENUMERATE_MIME_TYPE_HEADER(png, "image/png", 0, 8, 0x89, 'P', 'N', 'G', 0x0D, 0x0A, 0x1A, 0x0A) \
|
||||||
__ENUMERATE_MIME_TYPE_HEADER(ppm, "image/x-portable-pixmap", 0, 3, 0x50, 0x33, 0x0A) \
|
__ENUMERATE_MIME_TYPE_HEADER(ppm, "image/x-portable-pixmap", 0, 3, 0x50, 0x33, 0x0A) \
|
||||||
__ENUMERATE_MIME_TYPE_HEADER(qcow, "extra/qcow", 0, 3, 'Q', 'F', 'I') \
|
__ENUMERATE_MIME_TYPE_HEADER(qcow, "extra/qcow", 0, 3, 'Q', 'F', 'I') \
|
||||||
|
__ENUMERATE_MIME_TYPE_HEADER(qoa, "audio/qoa", 0, 4, 'q', 'o', 'a', 'f') \
|
||||||
__ENUMERATE_MIME_TYPE_HEADER(qoi, "image/x-qoi", 0, 4, 'q', 'o', 'i', 'f') \
|
__ENUMERATE_MIME_TYPE_HEADER(qoi, "image/x-qoi", 0, 4, 'q', 'o', 'i', 'f') \
|
||||||
__ENUMERATE_MIME_TYPE_HEADER(rtf, "application/rtf", 0, 6, 0x7B, 0x5C, 0x72, 0x74, 0x66, 0x31) \
|
__ENUMERATE_MIME_TYPE_HEADER(rtf, "application/rtf", 0, 6, 0x7B, 0x5C, 0x72, 0x74, 0x66, 0x31) \
|
||||||
__ENUMERATE_MIME_TYPE_HEADER(sevenzip, "application/x-7z-compressed", 0, 6, 0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C) \
|
__ENUMERATE_MIME_TYPE_HEADER(sevenzip, "application/x-7z-compressed", 0, 6, 0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C) \
|
||||||
|
|
|
@ -116,6 +116,7 @@ static Optional<DeprecatedString> elf_details(StringView description, StringView
|
||||||
__ENUMERATE_MIME_TYPE_DESCRIPTION("audio/flac"sv, "FLAC audio"sv, description_only) \
|
__ENUMERATE_MIME_TYPE_DESCRIPTION("audio/flac"sv, "FLAC audio"sv, description_only) \
|
||||||
__ENUMERATE_MIME_TYPE_DESCRIPTION("audio/midi"sv, "MIDI notes"sv, description_only) \
|
__ENUMERATE_MIME_TYPE_DESCRIPTION("audio/midi"sv, "MIDI notes"sv, description_only) \
|
||||||
__ENUMERATE_MIME_TYPE_DESCRIPTION("audio/mpeg"sv, "MP3 audio"sv, description_only) \
|
__ENUMERATE_MIME_TYPE_DESCRIPTION("audio/mpeg"sv, "MP3 audio"sv, description_only) \
|
||||||
|
__ENUMERATE_MIME_TYPE_DESCRIPTION("audio/qoa"sv, "Quite OK Audio"sv, description_only) \
|
||||||
__ENUMERATE_MIME_TYPE_DESCRIPTION("audio/wave"sv, "WAVE audio"sv, description_only) \
|
__ENUMERATE_MIME_TYPE_DESCRIPTION("audio/wave"sv, "WAVE audio"sv, description_only) \
|
||||||
__ENUMERATE_MIME_TYPE_DESCRIPTION("extra/blender"sv, "Blender project file"sv, description_only) \
|
__ENUMERATE_MIME_TYPE_DESCRIPTION("extra/blender"sv, "Blender project file"sv, description_only) \
|
||||||
__ENUMERATE_MIME_TYPE_DESCRIPTION("extra/elf"sv, "ELF"sv, elf_details) \
|
__ENUMERATE_MIME_TYPE_DESCRIPTION("extra/elf"sv, "ELF"sv, elf_details) \
|
||||||
|
|
Loading…
Reference in a new issue