From cb36c0ea0fb73ab80f91e89651d2f5e66601a2b4 Mon Sep 17 00:00:00 2001 From: Ben Hutchison Date: Tue, 7 Jan 2025 21:08:36 -0800 Subject: [PATCH] Block runs based on their tags, such as "opener", "checkpoint", "recap", "sleep", and "finale". All existing blocking logic is retained (title, duration, runner IDs). --- .../Data/GDQ/GdqRun.cs | 6 +- GamesDoneQuickCalendarFactory/Data/GameRun.cs | 11 +- .../GamesDoneQuickCalendarFactory.csproj | 2 +- .../Services/EventDownloader.cs | 20 +- .../Services/GdqClient.cs | 3 +- Tests/CalendarGeneratorTest.cs | 12 +- Tests/Data/runs.json | 7077 ++++++++++++++++- Tests/EventDownloaderTest.cs | 336 +- Tests/GdqClientTest.cs | 14 +- 9 files changed, 7303 insertions(+), 178 deletions(-) diff --git a/GamesDoneQuickCalendarFactory/Data/GDQ/GdqRun.cs b/GamesDoneQuickCalendarFactory/Data/GDQ/GdqRun.cs index 6722a13..8409a4f 100644 --- a/GamesDoneQuickCalendarFactory/Data/GDQ/GdqRun.cs +++ b/GamesDoneQuickCalendarFactory/Data/GDQ/GdqRun.cs @@ -8,9 +8,10 @@ namespace GamesDoneQuickCalendarFactory.Data.GDQ; /// Usually the same as , but if this is a bonus game, will have a BONUS GAME 1- prefix. /// Usually the same as , but if this is a bonus game, won't have the BONUS GAME 1- prefix. /// The type or rule set of the run, such as 100% or Any%. -/// The hardware the game is running on, such as PC or PS5. +/// The hardware the game is running on, such as PC or PS5, or the empty string. /// The sequence number of this run in its containing event, starting at 1 for the first run of the even and increasing by 1 for each run in the event /// Before a run ends, this is the estimated duration, but after a run ends, this changes to the actual duration. To get the original estimated duration even after the run ends, use -. +/// Zero or more of awful, bingo, bonus, checkpoint, checkpoint_run, coop, finale, horror, kaizo, new_addition, online, opener, race, randomizer, recap, relay, rhythm, showcase, sleep, tas, or tournament (as of AGDQ2025, there can be more in the future). Can be empty, but never null. public record GdqRun( int id, [property: JsonPropertyName("name")] string name, @@ -26,7 +27,8 @@ public record GdqRun( [property: JsonPropertyName("run_time")] Period runTime, [property: JsonPropertyName("setup_time")] Period setupTime, [property: JsonPropertyName("anchor_time")] OffsetDateTime? anchorTime, - [property: JsonPropertyName("video_links")] IReadOnlyList