Skip to content

Commit b10ed90

Browse files
committed
feat(demos): detect Esplay demos from server name
ref akiver/cs-demo-analyzer#21 (comment)
1 parent 2ed4508 commit b10ed90

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
},
4949
"devDependencies": {
5050
"@akiver/boiler-writter": "1.6.0",
51-
"@akiver/cs-demo-analyzer": "1.7.0",
51+
"@akiver/cs-demo-analyzer": "1.7.1",
5252
"@akiver/csgo-voice-extractor": "2.1.3",
5353
"@crowdin/cli": "4.6.1",
5454
"@eslint/js": "9.22.0",

src/node/demo/get-demo-from-file-path.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ function getDemoSource(demoHeader: DemoHeader, demoName: string): DemoSource {
9696
return DemoSource.FiveEPlay;
9797
}
9898

99-
// ID of 12 characters long, starts with "n" (probably the game id) and then 11 letters.
100-
const esplayDemoNameRegex = /^n[a-zA-Z]{11}$/;
101-
if (esplayDemoNameRegex.exec(fileName) !== null) {
99+
if (serverName.includes('esplay')) {
102100
return DemoSource.Esplay;
103101
}
104102

0 commit comments

Comments
 (0)