mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-21 14:47:41 +01:00
Improve config parsing of cdn replacements
This commit is contained in:
parent
23c1df5aef
commit
d73a9575bd
1 changed files with 6 additions and 1 deletions
|
@ -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…
Reference in a new issue