Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matches table does not always populate #85

Open
timonla opened this issue Aug 11, 2022 · 1 comment
Open

Matches table does not always populate #85

timonla opened this issue Aug 11, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@timonla
Copy link
Contributor

timonla commented Aug 11, 2022

I think this happens when teams participated in the ESL Meisterschaft.

image
image

https://liga.esl-meisterschaft.de/leagues/teams/117766-geekz-energy

@timonla timonla added the bug Something isn't working label Aug 11, 2022
@timonla
Copy link
Contributor Author

timonla commented Aug 11, 2022

Our season regex only considers /99dmg/ leagues but the seasons since the ESL Meisterschaft have links like: https://liga.esl-meisterschaft.de/leagues/eslm. Also our naming scheme Saison ${seasonNumber} is outdated.

export const getSeason = (divisionUrl: string): Season | null => {
const seasonRegex = /99dmg\/([0-9]+)-.*?([0-9]+)\/group/;
const regexResult = divisionUrl.match(seasonRegex);
const idString = regexResult?.[1];
const seasonNumber = regexResult?.[2];
if (!idString || !seasonNumber ) return null;
return {
id: Number.parseInt(idString),
order: Number.parseInt(seasonNumber),
name: `Saison ${seasonNumber}`,
};
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant