Changeset 183875b in Klonkt for src/services/PlaylistService.js


Ignore:
Timestamp:
06/20/2026 05:23:08 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
d727e92
Parents:
459acd9
Message:

feat(audio): per-track "open in" Spotify/YouTube/SoundCloud links

New per-track fields link_spotify/link_youtube/link_soundcloud (audio_tracks),
editable in the track editor (https + correct host validated). Shown as small
brand icons per track row in standalone track embeds, albums and playlists —
click opens the track on that service (new tab). buster audio.css?v=8.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/services/PlaylistService.js

    r459acd9 r183875b  
    9494    // filenames (only tracks with a media file are playable).
    9595    const tracks = db.prepare(`
    96       SELECT t.id, t.title, t.artist, t.duration, t.cover_url, m.filename
     96      SELECT t.id, t.title, t.artist, t.duration, t.cover_url,
     97             t.link_spotify, t.link_youtube, t.link_soundcloud, m.filename
    9798      FROM playlist_tracks pt
    9899      JOIN audio_tracks t   ON t.id = pt.track_id
     
    110111        cover: t.cover_url || p.cover_url || '',
    111112        duration: t.duration || 0,
     113        link_spotify: t.link_spotify || '',
     114        link_youtube: t.link_youtube || '',
     115        link_soundcloud: t.link_soundcloud || '',
    112116        url: urlFor ? urlFor(t.filename) : null,
    113117      }));
Note: See TracChangeset for help on using the changeset viewer.