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" 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()) 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"); 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) => {