Changeset d727e92 in Klonkt for src/routes/posts.js


Ignore:
Timestamp:
06/20/2026 05:37:42 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
a66f691
Parents:
183875b
Message:

feat(audio): tracks without audio (link-only) — list with open-in links, no upload

You can now add a "Track without audio" in Admin → Audio (button) — only
title/artist + the Spotify/YouTube/SoundCloud links, no file. Such tracks
appear in albums & playlists (and standalone track embeds) in the list
with the open-in icons but WITHOUT a play button, and stay outside the
playback queue (which matches on URL). Lookups (posts album/single +
PlaylistService) no longer filter out fileless tracks. New route POST
/admin/audio/create-link. buster audio.css?v=9.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    r183875b rd727e92  
    537537      html = AudioEmbedService.embedTrackShortcodes(html, (id) => {
    538538        const r = byId.get(id);
    539         if (!r || !r.filename) return null;
     539        if (!r) return null;
    540540        return {
    541541          id: r.id,
     
    548548          link_youtube: r.link_youtube || '',
    549549          link_soundcloud: r.link_soundcloud || '',
    550           url: audioUrl(r.filename),
     550          url: r.filename ? audioUrl(r.filename) : '',  // '' = link-only track
    551551        };
    552552      });
     
    566566      const byAlbum = new Map();
    567567      for (const r of albumRows) {
    568         if (!r.filename) continue;
     568        // Link-only tracks (geen bestand) blijven in het album-overzicht (url '').
    569569        if (!byAlbum.has(r.album)) byAlbum.set(r.album, []);
    570570        byAlbum.get(r.album).push({
    571571          id: r.id,
    572           url: audioUrl(r.filename),
     572          url: r.filename ? audioUrl(r.filename) : '',
    573573          title: r.title || 'Untitled',
    574574          artist: r.artist || '',
Note: See TracChangeset for help on using the changeset viewer.