mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 23:42:07 +01:00
display hash matching status
This commit is contained in:
@@ -20,6 +20,8 @@ class PlatformSchema(BaseModel):
|
||||
launchbox_id: int | None = None
|
||||
ss_id: int | None = None
|
||||
ra_id: int | None = None
|
||||
hasheous_id: int | None = None
|
||||
tgdb_id: int | None = None
|
||||
category: str | None = None
|
||||
generation: int | None = None
|
||||
family_name: str | None = None
|
||||
|
||||
@@ -7,6 +7,7 @@ from typing import NotRequired, TypedDict, get_type_hints
|
||||
from endpoints.responses.assets import SaveSchema, ScreenshotSchema, StateSchema
|
||||
from endpoints.responses.collection import CollectionSchema
|
||||
from fastapi import Request
|
||||
from handler.metadata.hasheous_handler import HasheousMetadata
|
||||
from handler.metadata.igdb_handler import IGDBMetadata
|
||||
from handler.metadata.launchbox_handler import LaunchboxMetadata
|
||||
from handler.metadata.moby_handler import MobyMetadata
|
||||
@@ -44,6 +45,11 @@ RomLaunchboxMetadata = TypedDict( # type: ignore[misc]
|
||||
dict((k, NotRequired[v]) for k, v in get_type_hints(LaunchboxMetadata).items()),
|
||||
total=False,
|
||||
)
|
||||
RomHasheousMetadata = TypedDict( # type: ignore[misc]
|
||||
"RomHasheousMetadata",
|
||||
dict((k, NotRequired[v]) for k, v in get_type_hints(HasheousMetadata).items()),
|
||||
total=False,
|
||||
)
|
||||
|
||||
|
||||
def rom_user_schema_factory() -> RomUserSchema:
|
||||
@@ -180,6 +186,8 @@ class RomSchema(BaseModel):
|
||||
ss_id: int | None
|
||||
ra_id: int | None
|
||||
launchbox_id: int | None
|
||||
hasheous_id: int | None
|
||||
tgdb_id: int | None
|
||||
|
||||
platform_id: int
|
||||
platform_slug: str
|
||||
@@ -207,6 +215,7 @@ class RomSchema(BaseModel):
|
||||
moby_metadata: RomMobyMetadata | None
|
||||
ss_metadata: RomSSMetadata | None
|
||||
launchbox_metadata: RomLaunchboxMetadata | None
|
||||
hasheous_metadata: RomHasheousMetadata | None
|
||||
|
||||
path_cover_small: str | None
|
||||
path_cover_large: str | None
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 15 KiB |
1
frontend/src/__generated__/index.ts
generated
1
frontend/src/__generated__/index.ts
generated
@@ -40,6 +40,7 @@ export type { RAUserGameProgression } from './models/RAUserGameProgression';
|
||||
export type { Role } from './models/Role';
|
||||
export type { RomFileCategory } from './models/RomFileCategory';
|
||||
export type { RomFileSchema } from './models/RomFileSchema';
|
||||
export type { RomHasheousMetadata } from './models/RomHasheousMetadata';
|
||||
export type { RomIGDBMetadata } from './models/RomIGDBMetadata';
|
||||
export type { RomLaunchboxMetadata } from './models/RomLaunchboxMetadata';
|
||||
export type { RomMetadataSchema } from './models/RomMetadataSchema';
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
/* eslint-disable */
|
||||
import type { CollectionSchema } from './CollectionSchema';
|
||||
import type { RomFileSchema } from './RomFileSchema';
|
||||
import type { RomHasheousMetadata } from './RomHasheousMetadata';
|
||||
import type { RomIGDBMetadata } from './RomIGDBMetadata';
|
||||
import type { RomLaunchboxMetadata } from './RomLaunchboxMetadata';
|
||||
import type { RomMetadataSchema } from './RomMetadataSchema';
|
||||
@@ -24,6 +25,8 @@ export type DetailedRomSchema = {
|
||||
ss_id: (number | null);
|
||||
ra_id: (number | null);
|
||||
launchbox_id: (number | null);
|
||||
hasheous_id: (number | null);
|
||||
tgdb_id: (number | null);
|
||||
platform_id: number;
|
||||
platform_slug: string;
|
||||
platform_fs_slug: string;
|
||||
@@ -46,6 +49,7 @@ export type DetailedRomSchema = {
|
||||
moby_metadata: (RomMobyMetadata | null);
|
||||
ss_metadata: (RomSSMetadata | null);
|
||||
launchbox_metadata: (RomLaunchboxMetadata | null);
|
||||
hasheous_metadata: (RomHasheousMetadata | null);
|
||||
path_cover_small: (string | null);
|
||||
path_cover_large: (string | null);
|
||||
url_cover: (string | null);
|
||||
|
||||
@@ -16,6 +16,8 @@ export type PlatformSchema = {
|
||||
launchbox_id?: (number | null);
|
||||
ss_id?: (number | null);
|
||||
ra_id?: (number | null);
|
||||
hasheous_id?: (number | null);
|
||||
tgdb_id?: (number | null);
|
||||
category?: (string | null);
|
||||
generation?: (number | null);
|
||||
family_name?: (string | null);
|
||||
|
||||
15
frontend/src/__generated__/models/RomHasheousMetadata.ts
generated
Normal file
15
frontend/src/__generated__/models/RomHasheousMetadata.ts
generated
Normal file
@@ -0,0 +1,15 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type RomHasheousMetadata = {
|
||||
tosec_match?: boolean;
|
||||
mame_arcade_match?: boolean;
|
||||
mame_mess_match?: boolean;
|
||||
nointro_match?: boolean;
|
||||
redump_match?: boolean;
|
||||
whdload_match?: boolean;
|
||||
ra_match?: boolean;
|
||||
fbneo_match?: boolean;
|
||||
};
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { RomFileSchema } from './RomFileSchema';
|
||||
import type { RomHasheousMetadata } from './RomHasheousMetadata';
|
||||
import type { RomIGDBMetadata } from './RomIGDBMetadata';
|
||||
import type { RomLaunchboxMetadata } from './RomLaunchboxMetadata';
|
||||
import type { RomMetadataSchema } from './RomMetadataSchema';
|
||||
@@ -18,6 +19,8 @@ export type SimpleRomSchema = {
|
||||
ss_id: (number | null);
|
||||
ra_id: (number | null);
|
||||
launchbox_id: (number | null);
|
||||
hasheous_id: (number | null);
|
||||
tgdb_id: (number | null);
|
||||
platform_id: number;
|
||||
platform_slug: string;
|
||||
platform_fs_slug: string;
|
||||
@@ -40,6 +43,7 @@ export type SimpleRomSchema = {
|
||||
moby_metadata: (RomMobyMetadata | null);
|
||||
ss_metadata: (RomSSMetadata | null);
|
||||
launchbox_metadata: (RomLaunchboxMetadata | null);
|
||||
hasheous_metadata: (RomHasheousMetadata | null);
|
||||
path_cover_small: (string | null);
|
||||
path_cover_large: (string | null);
|
||||
url_cover: (string | null);
|
||||
|
||||
@@ -101,6 +101,7 @@ const { allPlatforms } = storeToRefs(platformsStore);
|
||||
style="text-decoration: none; color: inherit"
|
||||
:href="`https://www.igdb.com/games/${rom.slug}`"
|
||||
target="_blank"
|
||||
class="mr-1"
|
||||
>
|
||||
<v-chip class="pl-0 mt-1" size="small" @click.stop>
|
||||
<v-avatar class="mr-2" size="30" rounded="0">
|
||||
@@ -117,7 +118,7 @@ const { allPlatforms } = storeToRefs(platformsStore);
|
||||
style="text-decoration: none; color: inherit"
|
||||
:href="`https://www.screenscraper.fr/gameinfos.php?gameid=${rom.ss_id}`"
|
||||
target="_blank"
|
||||
:class="{ 'ml-1': rom.igdb_id }"
|
||||
class="mr-1"
|
||||
>
|
||||
<v-chip class="pl-0 mt-1" size="small" @click.stop>
|
||||
<v-avatar class="mr-2" size="30" rounded="0">
|
||||
@@ -134,7 +135,7 @@ const { allPlatforms } = storeToRefs(platformsStore);
|
||||
style="text-decoration: none; color: inherit"
|
||||
:href="`https://www.mobygames.com/game/${rom.moby_id}`"
|
||||
target="_blank"
|
||||
:class="{ 'ml-1': rom.igdb_id || rom.ss_id }"
|
||||
class="mr-1"
|
||||
>
|
||||
<v-chip class="pl-0 mt-1" size="small" @click.stop>
|
||||
<v-avatar class="mr-2" size="30" rounded="0">
|
||||
@@ -151,7 +152,7 @@ const { allPlatforms } = storeToRefs(platformsStore);
|
||||
style="text-decoration: none; color: inherit"
|
||||
:href="`https://retroachievements.org/game/${rom.ra_id}`"
|
||||
target="_blank"
|
||||
:class="{ 'ml-1': rom.igdb_id || rom.ss_id || rom.moby_id }"
|
||||
class="mr-1"
|
||||
>
|
||||
<v-chip class="pl-0 mt-1" size="small" @click.stop>
|
||||
<v-avatar class="mr-2" size="25" rounded="1">
|
||||
@@ -160,10 +161,7 @@ const { allPlatforms } = storeToRefs(platformsStore);
|
||||
<span>{{ rom.ra_id }}</span>
|
||||
</v-chip>
|
||||
</a>
|
||||
<div
|
||||
v-if="rom.launchbox_id"
|
||||
:class="{ 'ml-1': rom.igdb_id || rom.ss_id }"
|
||||
>
|
||||
<span v-if="rom.launchbox_id" class="mr-1">
|
||||
<v-chip class="pl-0 mt-1" size="small">
|
||||
<v-avatar class="mr-2" size="30" rounded="0">
|
||||
<v-img src="/assets/scrappers/launchbox.png" />
|
||||
@@ -175,7 +173,46 @@ const { allPlatforms } = storeToRefs(platformsStore);
|
||||
}}</span>
|
||||
<v-icon class="ml-1">mdi-star</v-icon>
|
||||
</v-chip>
|
||||
</div>
|
||||
</span>
|
||||
<span v-if="rom.hasheous_id" class="mr-1">
|
||||
<v-chip class="pl-0 mt-1" size="small">
|
||||
<v-avatar class="mr-2 pa-1" size="30" rounded="0">
|
||||
<v-img src="/assets/scrappers/hasheous.png" />
|
||||
</v-avatar>
|
||||
<span>{{ rom.hasheous_id }}</span>
|
||||
</v-chip>
|
||||
</span>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row
|
||||
v-if="rom.hasheous_id"
|
||||
class="text-white text-shadow mt-2"
|
||||
:class="{ 'text-center': smAndDown }"
|
||||
no-gutters
|
||||
>
|
||||
<v-col cols="12">
|
||||
<v-chip
|
||||
v-if="rom.hasheous_metadata?.tosec_match"
|
||||
prepend-icon="mdi-check"
|
||||
class="mt-1 mr-1"
|
||||
size="small"
|
||||
title="Passed CRC, SHA1 and MD5 checksum checks"
|
||||
>
|
||||
<span>Verified</span>
|
||||
<v-divider class="mx-2 border-opacity-25" vertical />
|
||||
<span>TOSEC</span>
|
||||
</v-chip>
|
||||
<v-chip
|
||||
v-if="rom.hasheous_metadata?.nointro_match"
|
||||
prepend-icon="mdi-check"
|
||||
class="mt-1 mr-1"
|
||||
size="small"
|
||||
title="Passed CRC, SHA1 and MD5 checksum checks"
|
||||
>
|
||||
<span>Verified</span>
|
||||
<v-divider class="mx-2 border-opacity-25" vertical />
|
||||
<span>NoIntro</span>
|
||||
</v-chip>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
|
||||
@@ -379,6 +379,19 @@ watch(
|
||||
<span>{{ currentPlatform.launchbox_id }}</span>
|
||||
</v-chip>
|
||||
</a>
|
||||
<a
|
||||
v-if="currentPlatform.hasheous_id"
|
||||
style="text-decoration: none; color: inherit"
|
||||
target="_blank"
|
||||
class="ml-1"
|
||||
>
|
||||
<v-chip class="pl-0 mt-1" size="small" @click.stop>
|
||||
<v-avatar class="mr-2" size="25" rounded="1">
|
||||
<v-img src="/assets/scrappers/hasheous.png" />
|
||||
</v-avatar>
|
||||
<span>{{ currentPlatform.hasheous_id }}</span>
|
||||
</v-chip>
|
||||
</a>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-card class="mt-4 bg-toplayer fill-width" elevation="0">
|
||||
|
||||
Reference in New Issue
Block a user