Changeset 0d7acdf in Klonkt for src/routes/posts.js


Ignore:
Timestamp:
06/20/2026 05:04:13 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
3ec691c
Parents:
fef781e
Message:

feat(audio): per-track owner/credit + license (+ written to mp3 ID3 tags)

New per-track metadata: credit (copyright holder) + license. Editable in the
track editor (license with datalist presets: All rights reserved, CC BY/…/CC0).

  • DB: audio_tracks.credit + .license.
  • ID3: on upload and on every metadata edit the tags are written into the mp3 itself — copyright=credit, comment=license (new retagMp3() in the transcoder, -c copy, no re-encode) → ownership travels with a download.
  • Visible: "credit · license" line below each track (post-audio-track).

busters audio.css?v=7.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    rfef781e r0d7acdf  
    529529      const placeholders = trackIds.map(() => '?').join(',');
    530530      const rows = db.prepare(`
    531         SELECT t.id, t.title, t.artist, t.cover_url, m.filename
     531        SELECT t.id, t.title, t.artist, t.cover_url, t.credit, t.license, m.filename
    532532        FROM audio_tracks t LEFT JOIN media m ON m.id = t.media_id
    533533        WHERE t.site_id = ? AND t.id IN (${placeholders})
     
    542542          artist: r.artist,
    543543          cover: r.cover_url,
     544          credit: r.credit || '',
     545          license: r.license || '',
    544546          url: audioUrl(r.filename),
    545547        };
Note: See TracChangeset for help on using the changeset viewer.