Skip to content

search: correct miscategorised file extensions and add modern formats - #189

Merged
got3nks merged 1 commit into
amule-org:masterfrom
got3nks:fix/search-file-type-filter-categories
Jun 17, 2026
Merged

search: correct miscategorised file extensions and add modern formats#189
got3nks merged 1 commit into
amule-org:masterfrom
got3nks:fix/search-file-type-filter-categories

Conversation

@got3nks

@got3nks got3nks commented Jun 17, 2026

Copy link
Copy Markdown

Summary

Refs amule-project/amule#842 (legacy repo).

The file-type filter in the search window (Any / Archives / Audio / CD-Images / Pictures / Programs / Texts / Videos) maps each category to a list of file extensions in src/OtherFunctions.cpp (CED2KFileTypes constructor). This list dates from the eMule era and had two issues: a handful of misclassified extensions, and a lot of formats that have become mainstream since ~2010 that were missing — so files with those extensions weren't matched by the corresponding filter and the file-type heuristic returned no type for them elsewhere either.

Part 1 — corrections

  • .m4b: moved Video → Audio (MPEG-4 audiobook — M4A audio with chapters and bookmarking, used by iTunes / Audible / LibriVox).
  • .msi: moved Archive → Program (Windows Installer package — software-installation format, not a general-purpose archive).
  • .xpi: moved Archive → Program (Mozilla browser-extension package — software/add-on package).
  • .dmz: removed (no known disc-image format with this extension; only documented as the obsolete DMesh 3D-model file — looks like a stray entry inherited from eMule).
  • Source-comment fixes: .mp1v ("QuickTime Movie File" → MPEG-1), .mp4 ("MPEG-2 Video File" → MPEG-4), .mpe ("MPEG-4 Video File" → MPEG-1), .sub ("Subtitle File" → CloneCD subchannel data file — its .ccd / .img / .sub set is correctly categorised as CD-Image).

Part 2 — additions

~95 extensions added across the seven categories. Highlights: Opus / OGA / WebA / WavPack / DSD / Audible (audio); MTS / F4V / MXF / H.264 / H.265 / HEVC (video); HEIC / HEIF / AVIF / JXL / SVG / JPEG 2000 / GIMP / animated PNG / camera-RAW set (pictures); Zstandard / XZ / LZ4 / LZMA / Lzip / comic-book 7z+ACE (archives); PowerShell scripts / shell scripts / app bundles / Win App Package / AppImage / Flatpak / Snap / .deb / .rpm / .apk / .jar (programs); virtual-disk images (VHD/VHDX/VMDK/VDI/qcow2/WIM) and modern disc-image set (CD-Images); the full OOXML set (docx/docm/dotx, xlsx/xlsm/xltx, pptx/pptm/potx/ppsx), Markdown, CSV, JSON, YAML, LaTeX, DjVu, XPS, FictionBook, modern Kindle (azw3/kfx), Apple iWork (pages/numbers/key) (texts).

Notes

Archive vs. ProgramArchives is for general-purpose compressed file containers; an extension whose purpose is to package, deliver, or run software belongs in Programs, even when internally a zip / compressed container. The moves above and all new software-package additions follow this rule.

Server-side searchGetED2KFileTypeSearchTerm() (src/OtherFunctions.cpp:976) already maps ED2KFT_ARCHIVE and ED2KFT_CDIMAGE to ED2KFTSTR_PROGRAM ("Pro") for server queries — the inline comment on line 983 acknowledges this. Adding extensions to Archive and CD-Image therefore changes aMule's local filtering only; server-side query behaviour is unchanged.

Test plan

  • Local macOS build clean (incremental on master tip + this change).
  • CI to verify the other targets.

…rmats

Refs amule-project#842.

Part 1 — corrections (5):
- .m4b: Video → Audio (MPEG-4 audiobook, M4A audio with chapters)
- .msi: Archive → Program (Windows Installer package, not a generic archive)
- .xpi: Archive → Program (Mozilla browser extension package)
- .dmz: removed (no known disc-image format; only known as obsolete
  DMesh 3D-model — likely a stray entry from eMule)
- Source-comment fixes for .mp1v / .mp4 / .mpe (MPEG version mix-up)
  and .sub (CloneCD subchannel data, not subtitle).

Part 2 — additions (~95):
- Audio: opus, oga, weba, wv, dsf, dff, caf, aa, aax
- Video: mts, f4v, mxf, h264, h265, hevc
- Pictures: heic, heif, avif, jxl, svg, jp2, j2k, xcf, apng, dng,
  cr2, cr3, nef, arw, orf, raf, rw2
- Archives: zst, xz, txz, lz4, lzma, lz, tlz, cb7, cba
- Programs: ps1, psm1, psd1, sh, app, appx, msix, appimage, flatpak,
  snap, scr, cpl, deb, rpm, apk, jar
- CD-Images: vhd, vhdx, vmdk, vdi, qcow2, wim, mdx, daa, isz, uif,
  cdi, b5t, b6t, vcd
- Texts: docx/docm/dotx, xlsx/xlsm/xltx, pptx/pptm/potx/ppsx (OOXML
  full set), md, markdown, csv, json, yaml, yml, tex, djvu, xps,
  oxps, fb2, azw3, kfx, pages, numbers, key

Guiding principle for software packages (per the issue): general-
purpose compressed containers stay under Archives; extensions whose
purpose is to package or deliver software belong under Programs even
when internally zip-based.

Note: Archive and CD-Image categories are server-side mapped to
"Pro" (Program) by GetED2KFileTypeSearchTerm, so additions to those
two categories affect aMule's local filtering only — no server-query
behaviour change.
@got3nks
got3nks merged commit 012daff into amule-org:master Jun 17, 2026
10 checks passed
@got3nks
got3nks deleted the fix/search-file-type-filter-categories branch June 17, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant