Skip to content

Commit

Permalink
add optional episode property
Browse files Browse the repository at this point in the history
  • Loading branch information
delphiactual committed Jun 11, 2024
1 parent 4659635 commit 480ba14
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions output/d2-season-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const D2SeasonInfo: Record<
releaseDate: string;
resetTime: string;
numWeeks: number;
episode?: number;
}
> = {
1: {
Expand Down Expand Up @@ -350,6 +351,7 @@ export const D2SeasonInfo: Record<
releaseDate: '2024-06-04',
resetTime: '17:00:00Z',
numWeeks: 18,
episode: 1,
},
};

Expand Down
7 changes: 7 additions & 0 deletions src/generate-season-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const D2SeasonInfo: Record<
releaseDate: string;
resetTime: string;
numWeeks: number;
episode?: number;
}
> = {};

Expand Down Expand Up @@ -193,6 +194,11 @@ for (const season of seasonDefs) {
resetTime: (seasonOverrides[seasonNumber]?.startDate ?? season.startDate)?.slice(-9) ?? '',
numWeeks: getNumWeeks(seasonNumber),
};

if (seasonNumber > 23) {
D2SeasonInfo[seasonNumber].episode = seasonNumber - 23;
}

seasonsMD += updateSeasonsMD(seasonNumber);
}

Expand All @@ -217,6 +223,7 @@ number,
releaseDate: string;
resetTime: string;
numWeeks: number;
episode?: number;
}
> = {\n${D2SeasonInfoCleanedUp}};
Expand Down

0 comments on commit 480ba14

Please sign in to comment.