api: convert service config to JS and remove it from main config
This commit is contained in:
@@ -1,16 +1,6 @@
|
||||
import UrlPattern from "url-pattern";
|
||||
import { loadJSON } from "./misc/load-from-fs.js";
|
||||
|
||||
const packageJson = loadJSON("./package.json");
|
||||
const servicesConfigJson = loadJSON("./src/processing/service-config.json");
|
||||
|
||||
Object.values(servicesConfigJson.config).forEach(service => {
|
||||
service.patterns = service.patterns.map(
|
||||
pattern => new UrlPattern(pattern, {
|
||||
segmentValueCharset: UrlPattern.defaultOptions.segmentValueCharset + '@\\.'
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
export const
|
||||
version = packageJson.version,
|
||||
@@ -26,10 +16,6 @@ export const
|
||||
gif: ["-vf", "scale=-1:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse", "-loop", "0"]
|
||||
},
|
||||
|
||||
services = servicesConfigJson.config,
|
||||
hlsExceptions = servicesConfigJson.hlsExceptions,
|
||||
audioIgnore = servicesConfigJson.audioIgnore,
|
||||
|
||||
env = {
|
||||
apiURL: process.env.API_URL || '',
|
||||
apiPort: process.env.API_PORT || 9000,
|
||||
|
||||
Reference in New Issue
Block a user