Changeset cb01666 in Klonkt for src/middleware/site.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/site.js

    r8f2f97c rcb01666  
    1212import { getTenancy } from '../services/SettingsService.js';
    1313import { audioUrl } from '../services/AudioStreamService.js';
     14import { audioEnabled } from '../config/features.js';
    1415
    1516/**
     
    7071 */
    7172export function loadAudioTracks(req, res, next) {
     73  if (!audioEnabled()) { res.locals.audioTracks = []; return next(); }   // lite-modus
    7274  const site = res.locals.site;
    7375  if (!site || site.enable_audio_player === 0) {
Note: See TracChangeset for help on using the changeset viewer.