From c596ee003ae14653825be9430fe005d2273d1f9b Mon Sep 17 00:00:00 2001 From: Wes Copeland Date: Thu, 6 Feb 2025 17:55:20 -0500 Subject: [PATCH] fix(GameSuggestionEngine): exclude event games from mastered/beaten initial query (#3189) --- app/Platform/Services/GameSuggestions/GameSuggestionEngine.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Platform/Services/GameSuggestions/GameSuggestionEngine.php b/app/Platform/Services/GameSuggestions/GameSuggestionEngine.php index 615fc58bec..419fd65b46 100644 --- a/app/Platform/Services/GameSuggestions/GameSuggestionEngine.php +++ b/app/Platform/Services/GameSuggestions/GameSuggestionEngine.php @@ -49,6 +49,7 @@ private function initializeStrategies(User $user): void ]; } else { $masteredGames = Game::query() + ->whereNotIn('ConsoleID', System::getNonGameSystems()) ->whereHas('playerGames', function ($query) { $query->whereUserId($this->user->id) ->whereColumn('achievements_unlocked', 'achievements_total') @@ -58,6 +59,7 @@ private function initializeStrategies(User $user): void ->get(); $beatenGames = Game::query() + ->whereNotIn('ConsoleID', System::getNonGameSystems()) ->whereHas('playerGames', function ($query) { $query->whereUserId($this->user->id) ->whereNotNull('beaten_at'); @@ -121,6 +123,7 @@ private function initializeStrategies(User $user): void new Strategies\SharedAuthorStrategy($beatenGame, SourceGameKind::Beaten), $weight * 0.2, ]; + $this->strategies[] = [new Strategies\CommonPlayersStrategy($this->user, $beatenGame), $weight * 0.4]; }