Changeset d727e92 in Klonkt for src/services/PlaylistService.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/services/PlaylistService.js

    r183875b rd727e92  
    104104
    105105    const mappedTracks = tracks
    106       .filter(t => t.filename)  // skip orphaned references
     106      // Link-only tracks (geen media-bestand) blijven in de lijst staan met url ''.
    107107      .map(t => ({
    108108        id: t.id,
     
    114114        link_youtube: t.link_youtube || '',
    115115        link_soundcloud: t.link_soundcloud || '',
    116         url: urlFor ? urlFor(t.filename) : null,
     116        url: (t.filename && urlFor) ? urlFor(t.filename) : '',
    117117      }));
    118118    // Geen eigen cover? Val terug op de eerste track-cover, zodat de kaart niet leeg is.
Note: See TracChangeset for help on using the changeset viewer.