Web: Plex playlist editing, offline art, glass search, NO STEMS tag, artist header fix
- Edit/Rename/Delete on Plex playlists, drag-to-reorder edit mode with the iOS remove-then-move-after commit, Remove from playlist, Add to Plex playlists - Downloads store art blobs with each song and group so it shows offline - Search box gets a tinted glass blur - NO STEMS tag restyled and aligned in rows and cards - Albums header on the artist page no longer overlaps the play button Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3ecfdaa73b
commit
0ef4c650d1
4 files changed
+149
-24
No files matched your search
+98
-11
@@ -3,7 +3,7 @@
|
||||
|
||||
import { $, $$, esc, fmtTime, fmtBytes, plural, on, emit, toast, ICON, store, uuid } from "./util.js";
|
||||
import { S, save, songMixes, saveSongMix, forgetSongMix, playlists, savePlaylists, newPlaylist, addToPlaylist, Offline } from "./store.js";
|
||||
import { px, img, rawImg, track, sources, liveServers, server, refreshServer, addServer, manualServer, signIn, sortState, pickSort, comparator, sortTracks, Pager, everything } from "./plex.js";
|
||||
import { px, img, rawImg, track, sources, liveServers, server, refreshServer, addServer, manualServer, signIn, sortState, pickSort, comparator, sortTracks, Pager, everything, pxSend, plexUri } from "./plex.js";
|
||||
import { Stems, Live, stemNow, stemTrack, stemBase, api } from "./stems.js";
|
||||
import { E, Q, setting, stemGain, presets, allPresets, presetLabel, applyPreset, currentPreset, nextPreset, savePreset, deletePreset, movePreset, restorePresets, deleteAllCustom, toggleLock,
|
||||
mixChanged, setKaraoke, setKaraokeMode, sameMix, setSpeed, saveQueue, saveOffline, Radio } from "./player.js";
|
||||
@@ -768,12 +768,28 @@ function stemItem(tracks) {
|
||||
}
|
||||
return { label: tracks.length === 1 ? "Stem Now" : `Stem Now (${need.length})`, run: () => stemNow(tracks) };
|
||||
}
|
||||
function pickPlaylist(x, y, tracks, mix = null) {
|
||||
// Stem playlists live in the browser. Plex playlists take the songs from their own server.
|
||||
async function pickPlaylist(x, y, tracks, mix = null) {
|
||||
const add = p => { addToPlaylist(p, tracks, mix); toast(`Added to “${p.title}”${mix ? " with this mix" : ""}`); };
|
||||
const srv = tracks.find(t => t.srv && t.key)?.srv, pts = tracks.filter(t => t.srv === srv && t.key);
|
||||
const pls = srv && server(srv) && !mix ? ((await px(srv, "/playlists", { playlistType: "audio" }).catch(() => ({}))).Metadata || []).filter(p => !p.smart) : [];
|
||||
const toPlex = async (key, title) => {
|
||||
try {
|
||||
const uri = await plexUri(srv, pts.map(t => t.key));
|
||||
if (key) await pxSend(srv, "PUT", `/playlists/${key}/items`, { uri });
|
||||
else await pxSend(srv, "POST", "/playlists", { type: "audio", title, smart: 0, uri });
|
||||
Finder.pls = null;
|
||||
toast(`Added to “${title}”`);
|
||||
if (location.hash === `#/playlist/${srv}:${key}`) route();
|
||||
} catch (e) { toast(e.message); }
|
||||
};
|
||||
Menu.open(x, y, [
|
||||
{ head: "Stem playlists" },
|
||||
{ label: "New stem playlist…", run: () => { const n = prompt("Stem playlist name"); if (n?.trim()) add(newPlaylist(n.trim())); } },
|
||||
playlists.length && "-",
|
||||
...playlists.map(p => ({ label: p.title, run: () => add(p) })),
|
||||
...(srv && server(srv) && !mix ? ["-", { head: `Plex playlists · ${server(srv).name}` },
|
||||
{ label: "New Plex playlist…", run: () => { const n = prompt("Plex playlist name"); if (n?.trim()) toPlex(null, n.trim()); } },
|
||||
...pls.map(p => ({ label: p.title, run: () => toPlex(p.ratingKey, p.title) }))] : []),
|
||||
]);
|
||||
}
|
||||
function trackMenu(x, y, listId, i) {
|
||||
@@ -784,7 +800,7 @@ function trackMenu(x, y, listId, i) {
|
||||
{ label: "Add to queue", run: () => Q.add([listItems[listId]?.[i] || t]) },
|
||||
"-",
|
||||
stemItem([t]),
|
||||
{ label: "Add to stem playlist…", run: () => pickPlaylist(x, y, [t]) },
|
||||
{ label: "Add to playlist…", run: () => pickPlaylist(x, y, [t]) },
|
||||
Offline.has(t.id) ? { label: "Remove download", run: () => Offline.remove(t.id).then(() => emit("offline")) }
|
||||
: { label: "Download for offline", run: () => download([t]) },
|
||||
(t.albumKey || t.artistKey) && "-",
|
||||
@@ -794,6 +810,10 @@ function trackMenu(x, y, listId, i) {
|
||||
pl && Q.cur()?.id === t.id && E.entry && { label: "Use the current mix here", run: () => { pl.items[i].mix = JSON.parse(JSON.stringify(S.mix)); savePlaylists(); route(); } },
|
||||
pl && pl.items[i].mix && { label: "Clear this item's mix", run: () => { pl.items[i].mix = null; savePlaylists(); route(); } },
|
||||
pl && { label: "Remove from playlist", run: () => { pl.items.splice(i, 1); pl.updated = Date.now(); savePlaylists(); route(); } },
|
||||
listId === "playlist" && curPx?.editable && t.pid != null && "-",
|
||||
listId === "playlist" && curPx?.editable && t.pid != null && { label: "Remove from playlist", run: async () => {
|
||||
try { await pxSend(curPx.srv, "DELETE", `/playlists/${curPx.key}/items/${t.pid}`); Finder.pls = null; route(); } catch (e) { toast(e.message); }
|
||||
} },
|
||||
]);
|
||||
}
|
||||
async function leaves(srv, key) { return ((await px(srv, `/library/metadata/${key}/allLeaves`)).Metadata || []).map(m => track(srv, m)); }
|
||||
@@ -806,13 +826,14 @@ function listMenu(x, y, get, group = null) {
|
||||
{ label: "Add to queue", run: run(ts => Q.add(ts)) },
|
||||
"-",
|
||||
{ label: "Stem Now", run: run(ts => stemNow(ts)) },
|
||||
{ label: "Add to stem playlist…", run: run(ts => pickPlaylist(x, y, ts)) },
|
||||
{ label: "Add to playlist…", run: run(ts => pickPlaylist(x, y, ts)) },
|
||||
{ label: "Download for offline", run: run(ts => download(ts, group)) },
|
||||
]);
|
||||
}
|
||||
|
||||
// ---- views --------------------------------------------------------------------------------------
|
||||
|
||||
let curPx = null, pxEdit = null;
|
||||
let lists = {}, listItems = {}, seq = 0, kick = null, genreCache = null;
|
||||
const visible = tracks => S.stemFilter ? tracks.filter(t => !!Stems.find(t.t || t) === (S.stemFilter === "stems")) : tracks;
|
||||
function playFrom(listId, i) {
|
||||
@@ -934,6 +955,7 @@ async function genres() {
|
||||
const hue = s => [...s].reduce((h, c) => (h * 31 + c.charCodeAt(0)) % 360, 7);
|
||||
|
||||
// Downloads the way iOS shows them: Playlists, Albums and Artists as card grids, then loose songs.
|
||||
let dlUrls = [];
|
||||
const DL_KINDS = [["Playlists", h => !/^#\/(album|artist)\//.test(h)], ["Albums", h => h.startsWith("#/album/")], ["Artists", h => h.startsWith("#/artist/")]];
|
||||
function dlGroups(recs) {
|
||||
const by = new Map(), loose = [];
|
||||
@@ -945,10 +967,13 @@ function dlGroups(recs) {
|
||||
}
|
||||
const gs = [...by.values()];
|
||||
gs.forEach((x, n) => { x.n = n; x.recs.sort((a, b) => a.saved - b.saved); lists["dl:" + n] = x.recs.map(r => r.track); });
|
||||
dlUrls.forEach(u => URL.revokeObjectURL(u)); dlUrls = [];
|
||||
const blobUrl = b => b instanceof Blob ? (dlUrls.push(URL.createObjectURL(b)), dlUrls.at(-1)) : "";
|
||||
const tile = ({ g, recs, n }) => {
|
||||
const t = recs[0].track, h = g.href, songs = plural(recs.length, "song");
|
||||
const art = blobUrl(g.art) || blobUrl(recs.find(r => r.art)?.art) || artOf(recs.find(r => r.track.thumb)?.track, 300);
|
||||
const s = h.startsWith("#/album/") ? t.artist || "" : h.startsWith("#/artist/") ? songs : `Playlist · ${songs}`;
|
||||
return card({ href: esc(h), img: artOf(t, 300), t: g.title, s, round: h.startsWith("#/artist/"), dl: n });
|
||||
return card({ href: esc(h), img: art, t: g.title, s, round: h.startsWith("#/artist/"), dl: n });
|
||||
};
|
||||
return DL_KINDS.map(([title, test]) => {
|
||||
const list = gs.filter(x => test(x.g.href));
|
||||
@@ -1107,9 +1132,11 @@ const routes = {
|
||||
const [srv, key] = splitKey(arg);
|
||||
const [info, items] = await Promise.all([px(srv, `/playlists/${key}`), px(srv, `/playlists/${key}/items`)]);
|
||||
if (my !== seq) return;
|
||||
const p = info.Metadata?.[0] || {}, tracks = sortTracks((items.Metadata || []).map(m => track(srv, m)), sortState("playlist"));
|
||||
view.innerHTML = hero(img(srv, p.thumb || p.composite, 420), "Playlist", p.title, plural(tracks.length, "track"), "playlist", false, p.composite && rawImg(srv, p.composite, 420))
|
||||
+ `<div class="bar sm"><span class="grow"></span>${stemsChip()}${sortControl("playlist")}</div>` + trackTable("playlist", tracks);
|
||||
const p = info.Metadata?.[0] || {}, raw = (items.Metadata || []).map(m => track(srv, m)), tracks = sortTracks(raw, sortState("playlist"));
|
||||
curPx = { srv, key, title: p.title, editable: !p.smart, raw };
|
||||
const id = esc(arg), tools = p.smart ? " · Smart playlist" : ` · <button class="link" data-pxedit="${id}">Edit</button> · <button class="link" data-pxrename="${id}">Rename</button> · <button class="link" data-pxdelete="${id}">Delete</button>`;
|
||||
view.innerHTML = hero(img(srv, p.thumb || p.composite, 420), "Playlist", p.title, plural(tracks.length, "track") + tools, "playlist", false, p.composite && rawImg(srv, p.composite, 420))
|
||||
+ `<div id="pxbody"><div class="bar sm"><span class="grow"></span>${stemsChip()}${sortControl("playlist")}</div>${trackTable("playlist", tracks)}</div>`;
|
||||
},
|
||||
async stemplaylist(my, id) {
|
||||
const p = playlists.find(x => x.id === id);
|
||||
@@ -1166,6 +1193,7 @@ const routes = {
|
||||
|
||||
async function route() {
|
||||
const my = ++seq;
|
||||
pxEdit = null; curPx = null;
|
||||
const [, name = "home", ...rest] = (location.hash || "#/home").split("/");
|
||||
const arg = decodeURIComponent(rest.join("/"));
|
||||
$$("#nav a").forEach(a => a.classList.toggle("on", a.dataset.nav === name || (a.dataset.nav === "genres" && name === "genre") || (a.dataset.nav === "playlists" && /playlist$/.test(name))));
|
||||
@@ -1199,7 +1227,7 @@ view.addEventListener("click", async ev => {
|
||||
if (!tracks.length) return toast(!all.length ? "Still loading…" : S.stemFilter === "nostems" ? "All of these have stems" : "None of these have stems yet");
|
||||
return Q.playList(tracks, ds.mode === "shuffle" ? -1 : 0, ds.mode === "shuffle");
|
||||
}
|
||||
if (ds.listmenu) { const r = el.getBoundingClientRect(); return listMenu(r.left, r.bottom, async () => listItems[ds.listmenu] || lists[ds.listmenu] || [], { title: $(".hero h1", view)?.textContent || "", href: location.hash }); }
|
||||
if (ds.listmenu) { const r = el.getBoundingClientRect(); return listMenu(r.left, r.bottom, async () => listItems[ds.listmenu] || lists[ds.listmenu] || [], { title: $(".hero h1", view)?.textContent || "", href: location.hash, art: $(".hero img.art", view)?.src || "" }); }
|
||||
if (ds.station) {
|
||||
try {
|
||||
let ts;
|
||||
@@ -1237,11 +1265,70 @@ view.addEventListener("click", async ev => {
|
||||
const ts = (await Promise.all(albums.map(m => leaves(m._srv, m.ratingKey)))).flat();
|
||||
return Q.playList(visible(ts), -1, true);
|
||||
}
|
||||
if (ds.pxrename && curPx) {
|
||||
const n = prompt("Rename playlist", curPx.title);
|
||||
if (n?.trim() && n.trim() !== curPx.title) try { await pxSend(curPx.srv, "PUT", `/playlists/${curPx.key}`, { title: n.trim() }); Finder.pls = null; route(); } catch (e) { toast(e.message); }
|
||||
return;
|
||||
}
|
||||
if (ds.pxdelete && curPx) {
|
||||
if (confirm(`Delete “${curPx.title}” from Plex? This can't be undone.`)) try { await pxSend(curPx.srv, "DELETE", `/playlists/${curPx.key}`); Finder.pls = null; location.hash = "#/playlists"; } catch (e) { toast(e.message); }
|
||||
return;
|
||||
}
|
||||
if (ds.pxedit && curPx) { pxEdit = { orig: curPx.raw, cur: [...curPx.raw] }; drawPxEdit(); return; }
|
||||
if ("pxcancel" in ds) { pxEdit = null; route(); return; }
|
||||
if (ds.pxrm != null && pxEdit) { pxEdit.cur.splice(+ds.pxrm, 1); drawPxEdit(); return; }
|
||||
if ("pxdone" in ds && pxEdit) { el.disabled = true; await commitPxEdit(); return; }
|
||||
if ("newpl" in ds) { const n = prompt("Stem playlist name"); if (n?.trim()) { newPlaylist(n.trim()); route(); } return; }
|
||||
if (ds.plrename) { const p = playlists.find(x => x.id === ds.plrename), n = prompt("Rename", p.title); if (n?.trim()) { p.title = n.trim(); savePlaylists(); route(); } return; }
|
||||
if (ds.pldelete) { if (confirm("Delete this stem playlist?")) { playlists.splice(playlists.findIndex(x => x.id === ds.pldelete), 1); savePlaylists(); location.hash = "#/playlists"; } return; }
|
||||
if ("dlclear" in ds) { if (confirm("Remove every download?")) { for (const id of [...Offline.ids]) await Offline.remove(id); emit("offline"); route(); } }
|
||||
});
|
||||
// ---- Plex playlist edit mode (iOS PlaylistScreens): drag to reorder, remove, then Done ----------
|
||||
function drawPxEdit() {
|
||||
const body = $("#pxbody", view);
|
||||
if (!body || !pxEdit) return;
|
||||
body.innerHTML = `<div class="bar sm"><span class="note">Drag to reorder</span><span class="grow"></span><button class="chip" data-pxcancel>Cancel</button><button class="chip on" data-pxdone>Done</button></div>
|
||||
<div class="pxedit">${pxEdit.cur.map((t, i) => `<div class="pxrow" data-i="${i}"><span class="grip" title="Drag">${ICON.queue}</span><img src="${esc(artOf(t, 96))}" alt="" ${FB}><div class="pxt"><b>${esc(t.title)}</b><small>${esc(t.artist)}</small></div><button class="ib bad" data-pxrm="${i}" title="Remove">${ICON.x}</button></div>`).join("") || `<p class="empty-msg">Nothing left. Done will empty the playlist.</p>`}</div>`;
|
||||
}
|
||||
// Pointer drag on the grip, so it works with touch too. Only transforms move during the drag.
|
||||
view.addEventListener("pointerdown", e => {
|
||||
const g = e.target.closest(".pxrow .grip");
|
||||
if (!g || !pxEdit) return;
|
||||
e.preventDefault();
|
||||
const row = g.parentElement, wrap = row.parentElement, rows = [...wrap.children], from = +row.dataset.i;
|
||||
const h = row.getBoundingClientRect().height + parseFloat(getComputedStyle(wrap).rowGap || 0), y0 = e.clientY;
|
||||
let to = from;
|
||||
row.classList.add("drag"); g.setPointerCapture(e.pointerId);
|
||||
const move = ev => {
|
||||
const dy = ev.clientY - y0;
|
||||
to = Math.max(0, Math.min(rows.length - 1, from + Math.round(dy / h)));
|
||||
row.style.transform = `translateY(${dy}px)`;
|
||||
rows.forEach((r, i) => { if (r !== row) r.style.transform = i > from && i <= to ? `translateY(${-h}px)` : i < from && i >= to ? `translateY(${h}px)` : ""; });
|
||||
};
|
||||
const up = () => {
|
||||
g.removeEventListener("pointermove", move); g.removeEventListener("pointerup", up); g.removeEventListener("pointercancel", up);
|
||||
if (to !== from) pxEdit.cur.splice(to, 0, ...pxEdit.cur.splice(from, 1));
|
||||
drawPxEdit();
|
||||
};
|
||||
g.addEventListener("pointermove", move); g.addEventListener("pointerup", up); g.addEventListener("pointercancel", up);
|
||||
});
|
||||
// Removals first, then replay the new order as move-after calls against a simulated list.
|
||||
async function commitPxEdit() {
|
||||
const { srv, key } = curPx, keep = new Set(pxEdit.cur.map(t => t.pid));
|
||||
try {
|
||||
for (const t of pxEdit.orig) if (!keep.has(t.pid)) await pxSend(srv, "DELETE", `/playlists/${key}/items/${t.pid}`);
|
||||
const sim = pxEdit.orig.filter(t => keep.has(t.pid)).map(t => t.pid);
|
||||
for (let i = 0; i < pxEdit.cur.length; i++) {
|
||||
const pid = pxEdit.cur[i].pid;
|
||||
if (sim[i] === pid) continue;
|
||||
const after = i ? pxEdit.cur[i - 1].pid : null;
|
||||
await pxSend(srv, "PUT", `/playlists/${key}/items/${pid}/move`, { after });
|
||||
sim.splice(sim.indexOf(pid), 1); sim.splice(i, 0, pid);
|
||||
}
|
||||
toast("Playlist saved");
|
||||
} catch (e) { toast(e.message); }
|
||||
pxEdit = null; Finder.pls = null; route();
|
||||
}
|
||||
async function removeDl(n, what) {
|
||||
const ts = lists["dl:" + n] || [];
|
||||
if (!confirm(`Remove ${what} (${plural(ts.length, "download")})? They will no longer play offline.`)) return;
|
||||
@@ -1263,7 +1350,7 @@ view.addEventListener("contextmenu", ev => {
|
||||
const row = ev.target.closest("tr[data-list]"), c = ev.target.closest(".card[data-kind]"), d = ev.target.closest(".card[data-dl]");
|
||||
if (d) { ev.preventDefault(); dlMenu(ev.clientX, ev.clientY, d.dataset.dl, $(".t", d).textContent); }
|
||||
else if (row) { ev.preventDefault(); trackMenu(ev.clientX, ev.clientY, row.dataset.list, +row.dataset.i); }
|
||||
else if (c) { ev.preventDefault(); listMenu(ev.clientX, ev.clientY, () => cardTracks(c), { title: $(".t", c).textContent, href: c.getAttribute("href") }); }
|
||||
else if (c) { ev.preventDefault(); listMenu(ev.clientX, ev.clientY, () => cardTracks(c), { title: $(".t", c).textContent, href: c.getAttribute("href"), art: $("img", c)?.src || "" }); }
|
||||
});
|
||||
|
||||
// ---- settings -----------------------------------------------------------------------------------
|
||||
|
||||
+6
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
import { S, save, songMixes, Offline } from "./store.js";
|
||||
import { Stems, api } from "./stems.js";
|
||||
import { partUrl } from "./plex.js";
|
||||
import { partUrl, img } from "./plex.js";
|
||||
import { emit, load, store, shuffled, toast, clone } from "./util.js";
|
||||
|
||||
// ---- mix -------------------------------------------------------------------------------------
|
||||
@@ -547,8 +547,11 @@ export const Radio = {
|
||||
// ---- offline ----------------------------------------------------------------------------------
|
||||
|
||||
// group: the album or playlist these came from, {title, href}, so Downloads can list them that way.
|
||||
// Art is stored as Blobs with the songs so Downloads shows it with no network.
|
||||
const artBlob = url => url && !url.startsWith("data:") ? fetch(url).then(r => r.ok ? r.blob() : null).catch(() => null) : null;
|
||||
export async function saveOffline(tracks, onStatus, group = null) {
|
||||
let n = 0;
|
||||
if (typeof group?.art === "string") group = { ...group, art: await artBlob(group.art) };
|
||||
for (const t of tracks) {
|
||||
if (Offline.has(t.id)) continue;
|
||||
onStatus?.(`Downloading ${++n} of ${tracks.length}: ${t.title}`);
|
||||
@@ -566,7 +569,8 @@ export async function saveOffline(tracks, onStatus, group = null) {
|
||||
blobs = { file: await r.blob() };
|
||||
}
|
||||
const size = Object.values(blobs).reduce((a, b) => a + b.size, 0);
|
||||
await Offline.put({ id: t.id, track: t, entry, fmt: entry ? S.fmt : "original", size, peaks: peaks?.stems || null, blobs, group, saved: Date.now() });
|
||||
const art = await artBlob(t.srv && t.thumb ? img(t.srv, t.thumb, 300) : "");
|
||||
await Offline.put({ id: t.id, track: t, entry, art, fmt: entry ? S.fmt : "original", size, peaks: peaks?.stems || null, blobs, group, saved: Date.now() });
|
||||
} catch (e) { toast(`Couldn't download “${t.title}”: ${e.message}`); }
|
||||
}
|
||||
emit("offline");
|
||||
|
||||
+19
-1
@@ -23,6 +23,24 @@ export async function px(srv, path, params = {}) {
|
||||
return (await r.json()).MediaContainer || {};
|
||||
}
|
||||
|
||||
// Writes (playlist edits). Plex answers some of these with an empty body.
|
||||
export async function pxSend(srv, method, path, params = {}) {
|
||||
if (typeof srv === "string") srv = server(srv);
|
||||
if (!srv) throw new Error("That Plex server isn't set up any more");
|
||||
const u = new URL(srv.url + path, location.href);
|
||||
for (const [k, v] of Object.entries(params)) if (v != null) u.searchParams.set(k, v);
|
||||
const r = await fetch(u, { method, headers: headers(srv.token), signal: AbortSignal.timeout(15000) });
|
||||
if (!r.ok) throw new Error(`Plex ${r.status} from ${srv.name}`);
|
||||
const txt = await r.text();
|
||||
try { return JSON.parse(txt).MediaContainer || {}; } catch { return {}; }
|
||||
}
|
||||
// The library uri Plex playlists take for a set of items, like iOS PlexServer.itemsURI.
|
||||
export async function plexUri(srv, keys) {
|
||||
if (typeof srv === "string") srv = server(srv);
|
||||
if (!srv.mid) srv.mid = (await px(srv, "/identity")).machineIdentifier;
|
||||
return `server://${srv.mid}/com.plexapp.plugins.library/library/metadata/${keys.join(",")}`;
|
||||
}
|
||||
|
||||
export function img(srvId, thumb, size = 300) {
|
||||
const s = server(srvId);
|
||||
if (!thumb || !s) return "";
|
||||
@@ -49,7 +67,7 @@ export function track(srvId, m) {
|
||||
title: m.title, artist: m.originalTitle || m.grandparentTitle || "", album: m.parentTitle || "",
|
||||
albumKey: m.parentRatingKey, artistKey: m.grandparentRatingKey,
|
||||
thumb: m.thumb || m.parentThumb || m.grandparentThumb, duration: m.duration || part?.duration || 0,
|
||||
part: part?.key, file: part?.file, index: m.index,
|
||||
part: part?.key, file: part?.file, index: m.index, pid: m.playlistItemID,
|
||||
meta: { titleSort: m.titleSort, addedAt: m.addedAt, lastViewedAt: m.lastViewedAt, viewCount: m.viewCount, userRating: m.userRating },
|
||||
};
|
||||
}
|
||||
|
||||
+26
-10
@@ -127,9 +127,9 @@ select, textarea, input[type=text], input[type=url], input[type=password] { back
|
||||
.tracks .acts button { opacity: 0; color: var(--muted); font-size: 18px; width: 26px; height: 26px; border-radius: 6px; display: inline-grid; place-items: center; vertical-align: middle; }
|
||||
.tracks tr:hover .acts button { opacity: 1; }
|
||||
.tracks .acts button:hover { color: var(--text); background: var(--raised); }
|
||||
.tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .05em; color: var(--muted); border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; margin-left: 8px; vertical-align: 1px; }
|
||||
.tag.nostems { color: var(--muted); opacity: .8; }
|
||||
body.stems-ready .card.nostem .t::after { content: "NO STEMS"; font-size: 9px; font-weight: 700; letter-spacing: .05em; color: var(--muted); border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; margin-left: 6px; vertical-align: 1px; }
|
||||
.tag { display: inline-flex; align-items: center; height: 15px; font-size: 9px; line-height: 1; font-weight: 700; letter-spacing: .06em; color: var(--muted); border: 1px solid color-mix(in srgb, currentColor 55%, transparent); border-radius: 4px; padding: 0 4px; margin-left: 8px; vertical-align: 2px; white-space: nowrap; }
|
||||
.tag.nostems { color: var(--muted); }
|
||||
body.stems-ready .card.nostem .s::before { content: "NO STEMS"; display: inline-flex; align-items: center; height: 14px; font-size: 8.5px; line-height: 1; font-weight: 700; letter-spacing: .06em; color: var(--muted); border: 1px solid color-mix(in srgb, currentColor 55%, transparent); border-radius: 4px; padding: 0 4px; margin-right: 6px; vertical-align: 1px; }
|
||||
.tag.queued { color: var(--muted); }
|
||||
.tag.stemming { color: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
|
||||
.tag.failed { color: #e5534b; }
|
||||
@@ -184,14 +184,17 @@ body.no-stems .tracks:not(:has(tbody tr.nostem)) ~ .only-nostems { display: bloc
|
||||
#menu.sortmenu { min-width: 190px; }
|
||||
|
||||
#finder { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px;
|
||||
background: color-mix(in srgb, var(--bg) 40%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
|
||||
animation: ffade .14s ease-out; }
|
||||
background: color-mix(in srgb, var(--bg) 35%, transparent); animation: ffade .14s ease-out; }
|
||||
#finder[hidden] { display: none; }
|
||||
@keyframes ffade { from { opacity: 0; } }
|
||||
.fbox { width: min(640px, 100%); max-height: 72vh; display: flex; flex-direction: column; background: var(--raised); border: 1px solid var(--line);
|
||||
border-radius: 14px; box-shadow: 0 24px 60px var(--shadow); overflow: hidden; animation: fpop .16s cubic-bezier(.2, .9, .3, 1.2); }
|
||||
.fbox { width: min(640px, 100%); max-height: 72vh; display: flex; flex-direction: column;
|
||||
background: color-mix(in srgb, var(--accent) 12%, color-mix(in srgb, var(--raised) 58%, transparent));
|
||||
-webkit-backdrop-filter: blur(28px) saturate(1.8); backdrop-filter: blur(28px) saturate(1.8);
|
||||
border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent), 0 24px 60px var(--shadow);
|
||||
border-radius: 16px; overflow: hidden; animation: fpop .16s cubic-bezier(.2, .9, .3, 1.2); }
|
||||
@keyframes fpop { from { transform: translateY(-8px) scale(.98); } }
|
||||
.fin { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 54px; border-bottom: 1px solid var(--line); flex: none; }
|
||||
.fin { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 54px; border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); flex: none; }
|
||||
.fin svg { fill: var(--accent) !important; }
|
||||
.fin svg { width: 20px; height: 20px; fill: var(--muted); flex: none; }
|
||||
.fin input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 17px; padding: 0; }
|
||||
.fres { overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
|
||||
@@ -500,8 +503,8 @@ input[type=number]#precachen { width: 64px; background: var(--raised); border: 1
|
||||
|
||||
/* toolbar shares its row with the filter/sort bar on wide screens */
|
||||
@media (min-width: 861px) {
|
||||
.actions + .bar.sm { margin: -66px 0 12px auto; min-height: 52px; pointer-events: none; }
|
||||
.actions + .bar.sm > * { pointer-events: auto; }
|
||||
.actions + .bar.sm:not(:has(h2)) { margin: -66px 0 12px auto; min-height: 52px; pointer-events: none; }
|
||||
.actions + .bar.sm:not(:has(h2)) > * { pointer-events: auto; }
|
||||
}
|
||||
#volume { -webkit-appearance: none; appearance: none; height: 16px; background: none; cursor: pointer; }
|
||||
#volume::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) var(--v, 85%), color-mix(in srgb, var(--text) 22%, transparent) var(--v, 85%)); }
|
||||
@@ -509,3 +512,16 @@ input[type=number]#precachen { width: 64px; background: var(--raised); border: 1
|
||||
#volume::-moz-range-track { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--text) 22%, transparent); }
|
||||
#volume::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
|
||||
#volume::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--text); border: 0; }
|
||||
|
||||
/* Plex playlist edit mode */
|
||||
.pxedit { display: grid; gap: 4px; }
|
||||
.pxrow { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 10px; background: var(--panel); transition: transform .15s ease; will-change: transform; }
|
||||
.pxrow.drag { transition: none; position: relative; z-index: 2; box-shadow: var(--shadow); background: var(--raised); }
|
||||
.pxrow img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; }
|
||||
.pxrow .pxt { flex: 1; min-width: 0; display: grid; }
|
||||
.pxrow .pxt b, .pxrow .pxt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.pxrow .pxt b { font-weight: 500; }
|
||||
.pxrow .pxt small { color: var(--muted); }
|
||||
.pxrow .grip { cursor: grab; touch-action: none; color: var(--muted); display: grid; place-items: center; padding: 4px; }
|
||||
.pxrow .grip svg { width: 20px; height: 20px; fill: currentColor; }
|
||||
.pxrow .ib.bad svg { fill: #ff453a; }
|
||||
Reference in new issue
Block a user