fix: deliver JPEG (not huge PNG) to Picdrop, clean filenames, tmp cleanup

- Picdrop is a photo-proofing tool that expects handy JPGs; non-alpha
  results are now delivered as JPEG q92 (4:4:4) instead of 12-32 MB PNGs.
  Cutouts with alpha stay PNG. Fixes images not showing in POSTER LEA.
- buildResultFilename strips doubled dates/UUIDs/hex to avoid messy names.
- picdrop-ls gains action:cleanup_tmp; Admin 'Reste aufräumen' button
  removes leftover .tmp- files from the default gallery.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XNQ8ghPfzAfsyVYd6HgFb6
This commit is contained in:
2026-07-24 08:07:16 +00:00
parent 32f06297a6
commit 70f3904d0e
4 changed files with 57 additions and 8 deletions
+7
View File
@@ -101,6 +101,12 @@ export default function AdminApp() {
const r = await fetch('/api/admin/picdrop-ls', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ path }) }).then((x) => x.json());
setPdList(r); notify(r.error ? r.error : `${(r.entries || []).length} Einträge in ${r.path}`);
};
const cleanupPicdrop = async () => {
const gallery = s.picdrop_default_gallery || 'POSTER LEA';
notify('Räume Reste auf …');
const r = await fetch('/api/admin/picdrop-ls', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'cleanup_tmp', gallery }) }).then((x) => x.json());
notify(r.error ? r.error : `${r.cleaned ?? 0} Reste in „${gallery}" entfernt.`);
};
const testNas = async () => {
notify('Teste NAS …');
const r = await fetch('/api/admin/test-nas', { method: 'POST' }).then((x) => x.json());
@@ -204,6 +210,7 @@ export default function AdminApp() {
<section className="karte">
<div className="kopfzeile"><span className="mono-label">Picdrop</span>
<div className="reihe"><button className="mini" onClick={() => lsPicdrop()}>Ordner anzeigen</button>
<button className="mini" onClick={cleanupPicdrop}>Reste aufräumen</button>
<button className="mini" onClick={testPicdrop}>Verbindung testen</button></div></div>
<div className="steuer">
<div className="zwei">