Browse Source

Improve config parsing of cdn replacements

pull/597/head
mrjvs 2 years ago
parent
commit
d73a9575bd
  1. 7
      src/setup/config.ts

7
src/setup/config.ts

@ -89,7 +89,12 @@ export function conf(): RuntimeConfig { @@ -89,7 +89,12 @@ export function conf(): RuntimeConfig {
.filter((v) => v.length > 0), // Should be comma-seperated and contain the media type and ID, formatted like so: movie-753342,movie-753342,movie-753342
CDN_REPLACEMENTS: getKey("CDN_REPLACEMENTS", "")
.split(",")
.map((v) => v.split(":").map((s) => s.trim()))
.map((v) =>
v
.split(":")
.map((s) => s.trim())
.filter((s) => s.length > 0),
)
.filter((v) => v.length > 0), // The format is <beforeA>:<afterA>,<beforeB>:<afterB>
};
}

Loading…
Cancel
Save