Skip to content

Commit

Permalink
Add gzip and xcf filetypes
Browse files Browse the repository at this point in the history
  • Loading branch information
floogulinc committed Jul 26, 2023
1 parent c505e7b commit dadd7ff
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app/hydrus-file-mimes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export enum HydrusFiletype {
APPLICATION_SAI2 = 54,
APPLICATION_KRITA = 55,
IMAGE_SVG = 56,
APPLICATION_XCF = 57,
APPLICATION_GZIP = 58,
APPLICATION_OCTET_STREAM = 100,
APPLICATION_UNKNOWN = 101
}
Expand Down Expand Up @@ -85,10 +87,12 @@ const searchableFileTypes = [
HydrusFiletype.APPLICATION_PSD,
HydrusFiletype.APPLICATION_SAI2,
HydrusFiletype.APPLICATION_KRITA,
HydrusFiletype.APPLICATION_XCF,
HydrusFiletype.APPLICATION_PDF,
HydrusFiletype.APPLICATION_ZIP,
HydrusFiletype.APPLICATION_RAR,
HydrusFiletype.APPLICATION_7Z,
HydrusFiletype.APPLICATION_GZIP,
HydrusFiletype.AUDIO_M4A,
HydrusFiletype.AUDIO_MP3,
HydrusFiletype.AUDIO_REALMEDIA,
Expand Down Expand Up @@ -124,9 +128,11 @@ export const mime_string_lookup: Record<HydrusFiletype, string> = {
[HydrusFiletype.APPLICATION_CLIP] : 'clip',
[HydrusFiletype.APPLICATION_SAI2] : 'sai2',
[HydrusFiletype.APPLICATION_KRITA] : 'krita',
[HydrusFiletype.APPLICATION_XCF] : 'xcf',
[HydrusFiletype.APPLICATION_ZIP] : 'zip',
[HydrusFiletype.APPLICATION_RAR] : 'rar',
[HydrusFiletype.APPLICATION_7Z] : '7z',
[HydrusFiletype.APPLICATION_GZIP] : 'gzip',
[HydrusFiletype.APPLICATION_WINDOWS_EXE] : 'windows exe',
[HydrusFiletype.APPLICATION_HYDRUS_ENCRYPTED_ZIP] : 'application/hydrus-encrypted-zip',
[HydrusFiletype.APPLICATION_HYDRUS_UPDATE_CONTENT] : 'application/hydrus-update-content',
Expand Down Expand Up @@ -186,9 +192,11 @@ const mime_mimetype_string_lookup: Partial<Record<HydrusFiletype, string>> = {
[HydrusFiletype.APPLICATION_CLIP] : 'application/clip',
[HydrusFiletype.APPLICATION_SAI2] : 'application/sai2',
[HydrusFiletype.APPLICATION_KRITA]: 'application/x-krita',
[HydrusFiletype.APPLICATION_XCF] : 'image/x-xcf',
[HydrusFiletype.APPLICATION_ZIP] : 'application/zip',
[HydrusFiletype.APPLICATION_RAR] : 'application/vnd.rar',
[HydrusFiletype.APPLICATION_7Z] : 'application/x-7z-compressed',
[HydrusFiletype.APPLICATION_GZIP]: 'application/gzip',
[HydrusFiletype.APPLICATION_WINDOWS_EXE] : 'application/octet-stream',
[HydrusFiletype.APPLICATION_HYDRUS_ENCRYPTED_ZIP] : 'application/hydrus-encrypted-zip',
[HydrusFiletype.APPLICATION_HYDRUS_UPDATE_CONTENT] : 'application/hydrus-update-content',
Expand Down Expand Up @@ -244,9 +252,11 @@ const mime_ext_lookup: Partial<Record<HydrusFiletype, string>> = {
[HydrusFiletype.APPLICATION_CLIP] : '.clip',
[HydrusFiletype.APPLICATION_SAI2] : '.sai2',
[HydrusFiletype.APPLICATION_KRITA]: '.kra',
[HydrusFiletype.APPLICATION_XCF] : '.xcf',
[HydrusFiletype.APPLICATION_ZIP] : '.zip',
[HydrusFiletype.APPLICATION_RAR] : '.rar',
[HydrusFiletype.APPLICATION_7Z] : '.7z',
[HydrusFiletype.APPLICATION_GZIP]: '.gz',
[HydrusFiletype.APPLICATION_WINDOWS_EXE] : '.exe',
[HydrusFiletype.APPLICATION_HYDRUS_ENCRYPTED_ZIP] : '.zip.encrypted',
[HydrusFiletype.APPLICATION_HYDRUS_UPDATE_CONTENT] : '',
Expand Down Expand Up @@ -300,13 +310,15 @@ const mime_enum_lookup: Record<string, HydrusFiletype> = {
'application/clip' : HydrusFiletype.APPLICATION_CLIP,
'application/sai2': HydrusFiletype.APPLICATION_SAI2,
'application/x-krita': HydrusFiletype.APPLICATION_KRITA,
'image/x-xcf' : HydrusFiletype.APPLICATION_XCF,
'application/octet-stream' : HydrusFiletype.APPLICATION_OCTET_STREAM,
'application/x-yaml' : HydrusFiletype.APPLICATION_YAML,
'PDF document' : HydrusFiletype.APPLICATION_PDF,
'application/pdf' : HydrusFiletype.APPLICATION_PDF,
'application/zip' : HydrusFiletype.APPLICATION_ZIP,
'application/vnd.rar' : HydrusFiletype.APPLICATION_RAR,
'application/x-7z-compressed' : HydrusFiletype.APPLICATION_7Z,
'application/gzip': HydrusFiletype.APPLICATION_GZIP,
'application/json' : HydrusFiletype.APPLICATION_JSON,
'application/cbor': HydrusFiletype.APPLICATION_CBOR,
'application/hydrus-encrypted-zip' : HydrusFiletype.APPLICATION_HYDRUS_ENCRYPTED_ZIP,
Expand Down

0 comments on commit dadd7ff

Please sign in to comment.