mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-16 16:20:04 +00:00
feat(refresh): added refresh button on game detail view to refresh metadata
Resolves grimsi/gameyfin#45
This commit is contained in:
@@ -48,6 +48,24 @@ export class GameDetailViewComponent {
|
||||
this.gamesService.downloadGame(this.game.slug);
|
||||
}
|
||||
|
||||
public refreshGame(): void {
|
||||
this.gamesService.refreshGame(this.game.slug).subscribe({
|
||||
next: game => {
|
||||
this.game = game;
|
||||
if(game.companies !== undefined) {
|
||||
this.companiesWithLogo = game.companies.filter(c => c.logoId !== undefined && c.logoId.length > 0);
|
||||
}
|
||||
},
|
||||
error: error => {
|
||||
if (error.status === 404) {
|
||||
this.router.navigate(['/library']);
|
||||
} else {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public bytesAsHumanReadableString(bytes: number): string {
|
||||
const thresh = 1024;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user