mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
No <4 minMembersPerTeam tournaments for streams sidebar
This commit is contained in:
parent
691e0bae8e
commit
d74270fcdf
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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}`,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user