Changeset cb01666 in Klonkt for src/middleware/render.js


Ignore:
Timestamp:
06/23/2026 02:54:36 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
9b851e7
Parents:
8f2f97c
Message:

feat: lite mode (KLONKT_AUDIO=off) — audio disabled, single codebase

Boot flag that skips the entire audio feature: no audio/playlist/download/
embed routes (no ffmpeg calls), no tracks loaded, own-audio shortcodes
(track/album/playlist) stripped, audio buttons in admin/profile
hidden. Hub and Circles keep working; external embeds (YouTube/SoundCloud/
Spotify) keep working too. Default = on (full version unchanged).
This lets Klonkt run as a lightweight blog/photo/EPK site on an environment
without ffmpeg.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/middleware/render.js

    r8f2f97c rcb01666  
    2020import { isPremium as isPremiumInstance, premiumEnabled, premiumUnlocked } from '../services/PatreonService.js';
    2121import { unreadCount as notifUnreadCount } from '../services/NotificationService.js';
     22import { audioEnabled as audioFeatureEnabled } from '../config/features.js';
    2223import { PLATFORMS as PLATFORMS_CATALOG } from '../services/PlatformIcons.js';
    2324import { t as i18nT, resolveLang, SUPPORTED as LANGS, LANG_NAMES } from '../services/i18n.js';
     
    111112    siteOwnerAvatar,
    112113    site: _site,
     114    audioEnabled: audioFeatureEnabled(),
    113115    audioTracks: data.audioTracks || res.locals.audioTracks || [],
    114116    siteUrlBase: res.locals.siteUrlBase || '',
Note: See TracChangeset for help on using the changeset viewer.