Skip to content

best way to save what you love

config/env: validate platform for processingPriority on startup

dumbmoron9332b2e19660
diff --git a/src/modules/config.js b/src/modules/config.js
index b774a8b6..93347ad4 100644
--- a/src/modules/config.js
+++ b/src/modules/config.js
@@ -32,7 +32,9 @@ const
corsWildcard: process.env.CORS_WILDCARD !== '0',
corsURL: process.env.CORS_URL,
cookiePath: process.env.COOKIE_PATH,
- processingPriority: process.env.PROCESSING_PRIORITY && parseInt(process.env.PROCESSING_PRIORITY),
+ processingPriority: process.platform !== "win32"
+ && process.env.PROCESSING_PRIORITY
+ && parseInt(process.env.PROCESSING_PRIORITY),
tiktokDeviceInfo: process.env.TIKTOK_DEVICE_INFO && JSON.parse(process.env.TIKTOK_DEVICE_INFO),
apiURL
}
diff --git a/src/modules/stream/types.js b/src/modules/stream/types.js
index 7054a3b2..87c9f600 100644
--- a/src/modules/stream/types.js
+++ b/src/modules/stream/types.js
@@ -44,7 +44,7 @@ function pipe(from, to, done) {
}
function getCommand(args) {
- if (!isNaN(env.processingPriority) && process.platform !== "win32") {
+ if (!isNaN(env.processingPriority)) {
return ['nice', ['-n', env.processingPriority.toString(), ffmpeg, ...args]]
}
return [ffmpeg, args]