Skip to content

Commit

Permalink
Merge branch 'main' of github.com:koush/scrypted
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Jul 31, 2024
2 parents d0b46c3 + 6c7671d commit 782c993
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions plugins/reolink/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/reolink/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/reolink",
"version": "0.0.88",
"version": "0.0.90",
"description": "Reolink Plugin for Scrypted",
"author": "Scrypted",
"license": "Apache",
Expand Down
4 changes: 2 additions & 2 deletions plugins/reolink/src/reolink-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export class ReolinkCameraClient {
op += 'Up';

if (op) {
await this.ptzOp(op, Math.round((command.speed?.pan || command.speed?.tilt || 1) * 10));
await this.ptzOp(op, Math.round((command?.pan || command?.tilt || 1) * 10));
}

if (command.zoom < 0)
Expand All @@ -269,7 +269,7 @@ export class ReolinkCameraClient {
op = 'ZoomInc';

if (op) {
await this.ptzOp(op, Math.round((command.speed?.zoom || 1) * 10));
await this.ptzOp(op, Math.round((command?.zoom || 1) * 10));
}
}

Expand Down
3 changes: 2 additions & 1 deletion server/src/scrypted-plugin-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import { RpcMessage } from "./rpc";

function start(mainFilename: string) {
const pluginId = process.argv[3];
console.log('starting plugin', pluginId);
module.paths.push(getPluginNodePath(pluginId));

if (process.argv[2] === 'child-thread') {
console.log('starting thread', pluginId);
const { port } = worker_threads.workerData as { port: worker_threads.MessagePort };
const peer = startPluginRemote(mainFilename, pluginId, (message, reject) => {
try {
Expand All @@ -34,6 +34,7 @@ function start(mainFilename: string) {
});
}
else {
console.log('starting plugin', pluginId);
const peer = startPluginRemote(mainFilename, process.argv[3], (message, reject, serializationContext) => process.send(message, serializationContext?.sendHandle, {
swallowErrors: !reject,
}, e => {
Expand Down

0 comments on commit 782c993

Please sign in to comment.