mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-04-19 19:14:51 +00:00
Fix sorting by game on LBP2
This commit is contained in:
parent
21dce144ce
commit
20a5fa6aa3
1 changed files with 4 additions and 1 deletions
|
@ -96,6 +96,8 @@ public static class ControllerExtensions
|
|||
|
||||
GameVersion targetVersion = token.GameVersion;
|
||||
|
||||
bool matchVersionExactly = false;
|
||||
|
||||
if (controller.Request.Query.ContainsKey("gameFilterType"))
|
||||
{
|
||||
string gameFilter = (string?)controller.Request.Query["gameFilterType"] ?? "";
|
||||
|
@ -103,10 +105,11 @@ public static class ControllerExtensions
|
|||
// Don't serve lbp3 levels to lbp2 just cause of the game filter
|
||||
if (filterVersion <= targetVersion)
|
||||
{
|
||||
matchVersionExactly = gameFilter != "both";
|
||||
targetVersion = filterVersion;
|
||||
}
|
||||
}
|
||||
queryBuilder.AddFilter(new GameVersionFilter(targetVersion));
|
||||
queryBuilder.AddFilter(new GameVersionFilter(targetVersion, matchVersionExactly));
|
||||
}
|
||||
else if (token.GameVersion == GameVersion.LittleBigPlanet3)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue