feat(music): support direct media playback from Fluxer attachments and uploaded files (#24)

- Add AttachmentUtils for detecting fluxerusercontent.com URLs and chat file attachments
- Support playing uploaded audio/video files directly via %play and %playnext
- Add Route 3d in-process ffmpeg decoding for container formats (.mp4, .mkv, .mov, etc.)
- Add native zero-re-encode passthrough for .opus, .webm, and .ogg attachments
- Add 📎 Fluxer Attachment source badges and embeds across all 6 locales
- Fixes #24
This commit is contained in:
NoLogicAlan committed 2026-10-29 03:08:20 +03:00
1 parent 91e7812c30
commit 7c5fb1e468
14 files changed
+300 -18

No files matched your search

+7 -3
View File
@@ -13,6 +13,7 @@ import { Utils } from "../../utils/Utils.mjs";
import { logger } from "../../core/Logger.mjs";
import { PROVIDERS, PROVIDER_NAMES } from "../providers.mjs";
import { bilibiliEnabled, isBilibiliUrl, resolveBilibiliVideo } from "../bilibili/index.mjs";
import { isFluxerAttachmentUrl, extractMediaTitle } from "../../utils/AttachmentUtils.mjs";
/**
* Broad music genres are ambiguous when used by themselves: searching for
@@ -743,12 +744,15 @@ const SearchMixin = {
* @returns {object}
*/
_buildExternalTrack(url, title = null, artist = null, trackType = "external") {
const displayTitle = title || this._extractFilenameFromUrl(url);
const isAttachment = isFluxerAttachmentUrl(url);
const resolvedType = isAttachment ? "attachment" : trackType;
const displayTitle = title || (isAttachment ? extractMediaTitle(url) : this._extractFilenameFromUrl(url));
const displayArtist = artist || (isAttachment ? "Fluxer Attachment" : null);
return {
type: trackType,
type: resolvedType,
title: displayTitle,
url: url,
artist: artist || null,
artist: displayArtist,
thumbnail: null,
};
},