No <4 minMembersPerTeam tournaments for streams sidebar

This commit is contained in:
Kalle 2026-03-19 20:47:12 +02:00
parent 691e0bae8e
commit d74270fcdf
4 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,7 @@ export interface ShowcaseCalendarEvent extends CommonEvent {
startTime: number;
/** Tournament is hidden from the public (test tournament) */
hidden: boolean;
minMembersPerTeam: number;
firstPlacer: {
teamName: string;
logoUrl: string | null;

View File

@ -31,6 +31,7 @@ export function getLiveTournamentStreams(): SidebarStream[] {
for (const tournament of RunningTournaments.all) {
if (tournament.isLeagueDivision) continue;
if (tournament.minMembersPerTeam < 4) continue;
streams.push({
id: `tournament-${tournament.ctx.id}`,

View File

@ -312,6 +312,7 @@ function mapTournamentFromDB(
tier: tournament.tier ?? null,
tentativeTier,
hidden: Boolean(tournament.hidden),
minMembersPerTeam: tournament.settings.minMembersPerTeam ?? 4,
modes: null,
firstPlacer:
highestDivWinners.length > 0

View File

@ -215,6 +215,7 @@ async function combinedStreams(): Promise<SidebarStream[]> {
if (event.startTime < nowTimestamp) continue;
if (event.startTime > threeDaysFromNow) continue;
if (event.hidden) continue;
if ((event.minMembersPerTeam ?? 4) < 4) continue;
ranked.push({
stream: {