Responsive mini player, set details, cleaner titles, featured artists

- Mini player reflows by size: portrait card, wide strip with art left and controls right, or tiny
- Lyrics preview in the mini player when there's room; lyrics and queue are exclusive
- Mini player can't be maximised and remembers its size
- SoundCloud sets read track details in parallel and split "Artist - Title"
- YouTube titles drop (Official Music Video) and similar tags; Topic/VEVO channels become the artist
- Comma lists and feat. credits in titles count as separate artists
- Artist profiles show Featured on with the release type and which song
- Downloaded files keep the source description and link in their notes
- Opus is labelled Opus; DRC-compressed YouTube audio is avoided
This commit is contained in:
Christian
2026-11-18 22:10:20 -05:00
parent 039a22e7ef
commit f6db780bca
8 changed files with 489 additions and 123 deletions
+4 -3
View File
@@ -40,6 +40,7 @@ const PLATFORM_ICON = [
[/(^|\.)x\.com|twitter\.com/i, "brand-x", "X"],
[/instagram\.com/i, "brand-instagram", "Instagram"],
];
const codecName = (c) => ({ opus: "Opus", vorbis: "Vorbis", mp4a: "AAC", aac: "AAC", pcm: "PCM" })[(c || "").toLowerCase()] || (c || "").toUpperCase();
const platformIcon = (name) => (PLATFORM_ICON.find((p) => p[2] === name) || [0, "world"])[1];
const state = {
@@ -600,7 +601,7 @@ function defaults(c, e) {
isrc: "",
bpm: null,
key: "",
comment: "",
comment: [e.description?.trim(), e.url ? `Source: ${e.url}` : ""].filter(Boolean).join("\n\n"),
lyrics: e.lyrics || "",
artwork: rel || c.data.single ? c.album.artwork : { kind: "keep" },
};
@@ -999,7 +1000,7 @@ function inspector(c, e, inline) {
function availabilityFlags(e) {
if (!e.media) return [h("span", { class: "flag" }, e.detailed ? "Unknown formats" : "Checking…")];
const m = e.media, out = [];
if (m.bestCodec) out.push(h("span", { class: "flag" }, `${m.bestCodec.toUpperCase()}${m.bestAbr ? ` ${m.bestAbr} kbps` : ""} best audio`));
if (m.bestCodec) out.push(h("span", { class: "flag" }, `${codecName(m.bestCodec)}${m.bestAbr ? ` ${m.bestAbr} kbps` : ""} best audio`));
if (m.original) out.push(h("span", { class: "flag" }, `Original ${m.originalExt ? m.originalExt.toUpperCase() : "file"}`));
if (m.lossless) out.push(h("span", { class: "flag" }, "Lossless source"));
if (m.hasVideo) out.push(h("span", { class: "flag" }, m.heights.length ? `Video up to ${m.heights[0]}p` : "Video"));
@@ -1020,7 +1021,7 @@ function selectionCaps(c) {
const lossless = known.some((e) => e.media.lossless || (e.media.original && e.media.originalLossless));
const originals = known.filter((e) => e.media.original).length;
const heights = [...new Set(known.flatMap((e) => e.media.heights || []))].sort((a, b) => b - a);
const codecs = [...new Set(known.map((e) => e.media.bestCodec && `${e.media.bestCodec.toUpperCase()}${e.media.bestAbr ? ` ${e.media.bestAbr} kbps` : ""}`).filter(Boolean))];
const codecs = [...new Set(known.map((e) => e.media.bestCodec && `${codecName(e.media.bestCodec)}${e.media.bestAbr ? ` ${e.media.bestAbr} kbps` : ""}`).filter(Boolean))];
return {
count: ents.length,
unknown: known.length < ents.length,