Merge pull request #272 from RattleSN4K3/feature/GameBaseGameStandalone

Standalone mods/expansions as Base Game
This commit is contained in:
Pat Hartl 2025-05-18 15:23:47 -05:00 committed by GitHub
commit 7ef2ba40da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -185,6 +185,8 @@
private async Task LoadData()
{
var allowedTypes = new[] { GameType.MainGame, GameType.StandaloneExpansion, GameType.StandaloneMod };
Engines = await EngineService.SortBy(g => g.Name).GetAsync();
Companies = await CompanyService.SortBy(g => g.Name).GetAsync();
Genres = await GenreService.SortBy(g => g.Name).GetAsync();
@ -193,7 +195,8 @@
Collections = await CollectionService.SortBy(g => g.Name).GetAsync();
Games = (await GameService
.Include(g => g.Media.Where(m => m.Type == MediaType.Icon))
.GetAsync(g => g.Type == GameType.MainGame)).OrderByTitle(g => String.IsNullOrWhiteSpace(g.SortTitle) ? g.Title : g.SortTitle);
.GetAsync(g => allowedTypes.Contains(g.Type)))
.OrderByTitle(g => String.IsNullOrWhiteSpace(g.SortTitle) ? g.Title : g.SortTitle);
Redistributables = (await RedistributableService.GetAsync()).OrderByTitle(r => r.Name);
Loaded = true;