Skip to content

Commit

Permalink
Merge pull request #29711 from smoogipoo/add-played-acronyms
Browse files Browse the repository at this point in the history
Add 'yes'/'no' acronyms to the `played=` filter
  • Loading branch information
peppy authored Sep 6, 2024
2 parents a912d86 + 6913d75 commit 04d1338
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions osu.Game.Tests/NonVisual/Filtering/FilterQueryParserTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -633,11 +633,15 @@ public void TestOutOfRangeDateQuery()
new object[] { "0", DateTimeOffset.Now, false },
new object[] { "false", DateTimeOffset.MinValue, true },
new object[] { "false", DateTimeOffset.Now, false },
new object[] { "no", DateTimeOffset.MinValue, true },
new object[] { "no", DateTimeOffset.Now, false },

new object[] { "1", DateTimeOffset.MinValue, false },
new object[] { "1", DateTimeOffset.Now, true },
new object[] { "true", DateTimeOffset.MinValue, false },
new object[] { "true", DateTimeOffset.Now, true },
new object[] { "yes", DateTimeOffset.MinValue, false },
new object[] { "yes", DateTimeOffset.Now, true },
};

[Test]
Expand Down
2 changes: 2 additions & 0 deletions osu.Game/Screens/Select/FilterQueryParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,12 @@ private static bool tryParseBool(string value, out bool result)
switch (value)
{
case "1":
case "yes":
result = true;
return true;

case "0":
case "no":
result = false;
return true;

Expand Down

0 comments on commit 04d1338

Please sign in to comment.