feat(platforms): added platform support (#67)

Now libraries can be assigned to platforms in the admin section.
Games will be assigned to libraries on scanning.

Resolves grimsi/gameyfin#31

Co-authored-by: shawly <shawlyde@gmail.com>
This commit is contained in:
Simon
2022-10-25 21:55:35 +03:00
committed by GitHub
parent 7504cd3500
commit 8e23549336
54 changed files with 1426 additions and 113 deletions
@@ -3,6 +3,8 @@ import {ActivatedRoute, Params, Router} from "@angular/router";
import {DetectedGameDto} from "../../models/dtos/DetectedGameDto";
import {GamesService} from "../../services/games.service";
import {CompanyDto} from "../../models/dtos/CompanyDto";
import {LibraryDto} from "../../models/dtos/LibraryDto";
import {PlatformDto} from "../../models/dtos/PlatformDto";
@Component({
selector: 'app-game-detail-view',
@@ -110,4 +112,8 @@ export class GameDetailViewComponent {
return Math.floor(containerWidth / elementWidth);
}
hasPlatform(library: LibraryDto, platform: PlatformDto) {
return library.platforms.some((libPlatform) => libPlatform.slug == platform.slug)
}
}