From 009d93bdca262bf2c93e0cc5deec89aadb51f298 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Fri, 16 Dec 2022 10:05:19 +0000 Subject: [PATCH] fix screenshot dir --- bin/thumbnailer.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/thumbnailer.js b/bin/thumbnailer.js index e9eb2ff61..22cdc27a5 100755 --- a/bin/thumbnailer.js +++ b/bin/thumbnailer.js @@ -6,6 +6,7 @@ var DEVICEID = "BANGLEJS2"; */ var EMULATOR = "banglejs1"; var DEVICEID = "BANGLEJS"; +var SCREENSHOT_DIR = __dirname+"/../screenshots/"; var emu = require("./lib/emulator.js"); var apploader = require("./lib/apploader.js"); @@ -69,7 +70,7 @@ emu.init({ }).then(function() { if (singleAppId) { console.log("Single Screenshot"); - getThumbnail(singleAppId, "screenshots/"+singleAppId+"-"+EMULATOR+".png"); + getThumbnail(singleAppId, SCREENSHOT_DIR+singleAppId+"-"+EMULATOR+".png"); return; } @@ -79,6 +80,10 @@ emu.init({ var promise = Promise.resolve(); appList.forEach(app => { + if (!app.supports.includes(DEVICEID)) { + console.log(`App ${app.id} isn't designed for ${DEVICEID}`); + return; + } promise = promise.then(() => { var imageFile = "screenshots/"+app.id+"-"+EMULATOR+".png"; return getThumbnail(app.id, imageFile).then(ok => {