Fix print cropping and Linux custom photo path

This commit is contained in:
Natsumi
2025-02-17 13:17:43 +13:00
parent 8ee28ea3ca
commit 60d8d7682f
10 changed files with 44 additions and 26 deletions

View File

@@ -10745,12 +10745,14 @@ console.log(`isLinux: ${LINUX}`);
this.currentInstanceWorld.instance = ref;
} else {
var L = $utils.parseLocation(instanceId);
API.getInstance({
worldId: L.worldId,
instanceId: L.instanceId
}).then((args) => {
this.currentInstanceWorld.instance = args.ref;
});
if (L.isRealInstance) {
API.getInstance({
worldId: L.worldId,
instanceId: L.instanceId
}).then((args) => {
this.currentInstanceWorld.instance = args.ref;
});
}
}
}
};
@@ -17767,7 +17769,7 @@ console.log(`isLinux: ${LINUX}`);
$app.methods.refreshInstancePlayerCount = function (instance) {
var L = $utils.parseLocation(instance);
if (L.worldId && L.instanceId) {
if (L.isRealInstance) {
API.getInstance({
worldId: L.worldId,
instanceId: L.instanceId
@@ -18611,7 +18613,9 @@ console.log(`isLinux: ${LINUX}`);
console.log(`Print saved to file: ${monthFolder}\\${fileName}`);
if (this.cropInstancePrints) {
await AppApi.CropPrintImage(filePath);
if (!await AppApi.CropPrintImage(filePath)) {
console.error('Failed to crop print image');
}
}
}
@@ -22318,7 +22322,7 @@ console.log(`isLinux: ${LINUX}`);
}
if (!API.queuedInstances.has(instanceId)) {
var L = $utils.parseLocation(instanceId);
if (L.worldId && L.instanceId) {
if (L.isRealInstance) {
API.getInstance({
worldId: L.worldId,
instanceId: L.instanceId