Add refresh from source for entries and whole lists
- Every provider can look an entry up again by its ID (TMDB, TheTVDB,
IGDB, Deezer, MusicBrainz, Wikipedia); search and lookup share parsing
- POST /api/items/{id}/refresh re-applies title, subtitle, year,
description, link, details and artwork. Kept: the "why" note, rank,
theater production/venue/cast and a theater entry's year, the Deezer
preview match. Empty source fields don't erase existing values
- New items.image_custom column (migration 4; existing uploads marked)
records artwork the owner chose; refresh keeps it unless asked
- Refused for custom lists and hand-added entries; entries the source
dropped are reported, and a refresh whose title shares no words with
the current one is rejected as a likely bad ID
- Editor: refresh button per row (asks about the owner's own artwork),
and "Refresh all" with a confirm step, replace-my-art checkbox,
progress with Stop, and a summary of problems
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4ea7cbc984
commit
33053d1c5f
18 files changed
+852
-148
No files matched your search
@@ -137,6 +137,30 @@ export function confirmDialog({ title, message, confirm = "Confirm", danger = fa
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Ask a question with several answers. Resolves to the chosen value, or
|
||||
* null if dismissed. choices: [{ label, value, primary }]
|
||||
*/
|
||||
export function chooseDialog({ title, message, choices }) {
|
||||
return new Promise((resolve) => {
|
||||
let picked = null;
|
||||
let dlg;
|
||||
const content = h("div", {},
|
||||
dialogHead(title, () => dlg),
|
||||
h("div", { class: "dialog-body" }, h("p", { class: "muted" }, message)),
|
||||
h("div", { class: "dialog-foot" },
|
||||
h("button", { type: "button", class: "btn btn--ghost", onclick: () => dlg.close() }, "Cancel"),
|
||||
choices.map((c) => h("button", {
|
||||
type: "button", class: "btn" + (c.primary ? " btn--primary" : ""),
|
||||
onclick: () => { picked = c.value; dlg.close(); },
|
||||
}, c.label)),
|
||||
),
|
||||
);
|
||||
dlg = openDialog(content, { onClose: () => resolve(picked) });
|
||||
dlg.style.maxWidth = "480px";
|
||||
});
|
||||
}
|
||||
|
||||
export function debounce(fn, ms) {
|
||||
let t;
|
||||
return (...args) => {
|
||||
|
||||
Reference in new issue
Block a user