Re-enabled filename actors and tags in Gamma banner tool, improved disable argument.

This commit is contained in:
DebaucheryLibrarian
2026-03-02 06:24:54 +01:00
parent 062dc0e75e
commit 16648d50f6

View File

@@ -93,7 +93,7 @@ async function init() {
const fileActors = banner.SceneActors?.slice(0, 2).map((actor) => slugify(actor, '_')).join('_');
// actors and tags are unreliable and describe entire scene, not banner, don't include by default
const filename = `${channel}_${banner.Width}_${banner.Height}_${fileActors && argv.actors ? fileActors : banner.MediaID}${fileTags && argv.tags ? `-${fileTags}` : ''}.${banner.MediaExt}`;
const filename = `${channel}_${banner.Width}_${banner.Height}_${fileActors && argv.actors?.[0] !== false ? fileActors : banner.MediaID}${fileTags && argv.tags?.[0] !== false ? `-${fileTags}` : ''}.${banner.MediaExt}`;
const filepath = `/tmp/gamma/${channel}/${filename}`;
if (argv.inspect) {
@@ -115,7 +115,11 @@ async function init() {
await pipeline(Readable.fromWeb(res.body), writer);
console.log(`Saved ${url} to ${filepath}, actors ${banner.SceneActors?.join(', ') || ''}`);
if (argv.actors) {
console.log(`Saved ${url} to ${filepath}`);
} else {
console.log(`Saved ${url} to ${filepath}, actors ${banner.SceneActors?.join(', ') || ''}`);
}
} else {
console.log(`Failed to fetch ${url} (${res.status})`);
}