From 75bb15d3b792ffa1bad22fea7f205501d39c7908 Mon Sep 17 00:00:00 2001 From: Brett Jia Date: Fri, 17 May 2024 20:39:24 -0400 Subject: [PATCH 1/4] Revert "server: make fetching network interfaces optional (#1474)" (#1478) This reverts commit 0160502da865a45c894af5ddb5c909043698c70a. --- server/src/server-settings.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/server/src/server-settings.ts b/server/src/server-settings.ts index 017e79a13..82899a4c5 100644 --- a/server/src/server-settings.ts +++ b/server/src/server-settings.ts @@ -29,14 +29,7 @@ function nodeIpAddress(family: number): string[] { ...costlyNetworks, ]; - let interfaces: any; - try { - interfaces = os.networkInterfaces(); - } catch { - // bjia56: When running in secured environments like UserLAnd in Android, os.networkInterfaces() - // is unable to get addresses and throws an error. Therefore, assume we can't find any addresses. - return []; - } + const interfaces = os.networkInterfaces(); const all = Object.keys(interfaces) .map((nic) => { From f2c940c1d362e2dcb412b4d5119b4527031714cd Mon Sep 17 00:00:00 2001 From: Brett Jia Date: Sun, 19 May 2024 16:38:57 -0400 Subject: [PATCH 2/4] server: add SCRYPTED_COMPATIBILITY_FILE (#1479) --- server/src/scrypted-main-exports.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/src/scrypted-main-exports.ts b/server/src/scrypted-main-exports.ts index 05fdb29d5..4f61d42e6 100644 --- a/server/src/scrypted-main-exports.ts +++ b/server/src/scrypted-main-exports.ts @@ -1,5 +1,6 @@ import dns from 'dns'; import dotenv from 'dotenv'; +import fs from 'fs'; import path from 'path'; import process from 'process'; import semver from 'semver'; @@ -17,6 +18,13 @@ export function isChildProcess() { function start(mainFilename: string, options?: { onRuntimeCreated?: (runtime: Runtime) => Promise, }) { + // Allow including a custom file path for platforms that require + // compatibility hacks. For example, Android may need to patch + // os functions. + if (process.env.SCRYPTED_COMPATIBILITY_FILE && fs.existsSync(process.env.SCRYPTED_COMPATIBILITY_FILE)) { + require(process.env.SCRYPTED_COMPATIBILITY_FILE); + } + if (!global.gc) { v8.setFlagsFromString('--expose_gc') global.gc = vm.runInNewContext("gc"); From 5d7206115104089faa8989f1745289afa971ed43 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Tue, 21 May 2024 09:19:43 -0700 Subject: [PATCH 3/4] ha: publish --- install/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/config.yaml b/install/config.yaml index 0d81677a2..ca5cebbf6 100755 --- a/install/config.yaml +++ b/install/config.yaml @@ -1,6 +1,6 @@ # Home Assistant Addon Configuration name: Scrypted -version: "v0.102.0-jammy-full" +version: "v0.105.0-jammy-full" slug: scrypted description: Scrypted is a high performance home video integration and automation platform url: "https://github.com/koush/scrypted" From bc71fd8515b63004b1da011748246f12aa4cba92 Mon Sep 17 00:00:00 2001 From: Brett Jia Date: Sun, 26 May 2024 01:29:46 -0400 Subject: [PATCH 4/4] server: print python interpreter path (#1484) --- server/python/plugin_remote.py | 1 + 1 file changed, 1 insertion(+) diff --git a/server/python/plugin_remote.py b/server/python/plugin_remote.py index 9a020e73d..414473c96 100644 --- a/server/python/plugin_remote.py +++ b/server/python/plugin_remote.py @@ -557,6 +557,7 @@ class PluginRemote: python_version = 'python%s' % str( sys.version_info[0])+"."+str(sys.version_info[1]) print('python version:', python_version) + print('interpreter:', sys.executable) python_versioned_directory = '%s-%s-%s' % ( python_version, platform.system(), platform.machine())