Re-enabled filename actors and tags in Gamma banner tool, improved disable argument.
This commit is contained in:
@@ -93,7 +93,7 @@ async function init() {
|
|||||||
const fileActors = banner.SceneActors?.slice(0, 2).map((actor) => slugify(actor, '_')).join('_');
|
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
|
// 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}`;
|
const filepath = `/tmp/gamma/${channel}/${filename}`;
|
||||||
|
|
||||||
if (argv.inspect) {
|
if (argv.inspect) {
|
||||||
@@ -115,7 +115,11 @@ async function init() {
|
|||||||
|
|
||||||
await pipeline(Readable.fromWeb(res.body), writer);
|
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 {
|
} else {
|
||||||
console.log(`Failed to fetch ${url} (${res.status})`);
|
console.log(`Failed to fetch ${url} (${res.status})`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user