mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 00:27:41 +01:00
fix types
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
import os
|
||||
from datetime import datetime
|
||||
from typing import Dict, List, Optional
|
||||
from xml.etree.ElementTree import Element, SubElement, indent, tostring
|
||||
from xml.etree.ElementTree import ( # trunk-ignore(bandit/B405)
|
||||
Element,
|
||||
SubElement,
|
||||
indent,
|
||||
tostring,
|
||||
)
|
||||
|
||||
from config import YOUTUBE_BASE_URL
|
||||
from handler.database import db_platform_handler, db_rom_handler
|
||||
|
||||
@@ -2,7 +2,7 @@ import os
|
||||
import uuid
|
||||
from pathlib import Path
|
||||
from typing import NotRequired, TypedDict
|
||||
from xml.etree.ElementTree import Element
|
||||
from xml.etree.ElementTree import Element # trunk-ignore(bandit/B405)
|
||||
|
||||
import pydash
|
||||
from defusedxml import ElementTree as ET
|
||||
|
||||
@@ -150,7 +150,7 @@ class SSMetadataMedia(TypedDict):
|
||||
manual: str | None # manual
|
||||
marquee: str | None # screenmarquee
|
||||
miximage: str | None # mixrbv1 | mixrbv2
|
||||
physical: str | None # support-texture | support-2D
|
||||
physical: str | None # support-2D
|
||||
screenshot: str | None # ss
|
||||
steamgrid: str | None # steamgrid
|
||||
title_screen: str | None # sstitle
|
||||
@@ -216,13 +216,13 @@ def extract_media_from_ss_rom(game: SSGame) -> SSMetadataMedia:
|
||||
elif media.get("type") == "screenmarquee" and not ss_media["marquee"]:
|
||||
ss_media["marquee"] = media["url"]
|
||||
elif (
|
||||
media.get("type") == "miximage1" or media.get("type") == "miximage2"
|
||||
media.get("type") == "miximage1"
|
||||
or media.get("type") == "miximage2"
|
||||
or media.get("type") == "mixrbv1"
|
||||
or media.get("type") == "mixrbv2"
|
||||
) and not ss_media["miximage"]:
|
||||
ss_media["miximage"] = media["url"]
|
||||
elif (
|
||||
media.get("type") == "support-texture"
|
||||
or media.get("type") == "support-2D"
|
||||
) and not ss_media["physical"]:
|
||||
elif media.get("type") == "support-2D" and not ss_media["physical"]:
|
||||
ss_media["physical"] = media["url"]
|
||||
elif media.get("type") == "ss" and not ss_media["screenshot"]:
|
||||
ss_media["screenshot"] = media["url"]
|
||||
|
||||
2
frontend/src/__generated__/index.ts
generated
2
frontend/src/__generated__/index.ts
generated
@@ -39,7 +39,6 @@ export type { EmulationDict } from './models/EmulationDict';
|
||||
export type { FilesystemDict } from './models/FilesystemDict';
|
||||
export type { FirmwareSchema } from './models/FirmwareSchema';
|
||||
export type { FrontendDict } from './models/FrontendDict';
|
||||
export type { GamelistMedia } from './models/GamelistMedia';
|
||||
export type { GenericTaskMeta } from './models/GenericTaskMeta';
|
||||
export type { GenericTaskStatusResponse } from './models/GenericTaskStatusResponse';
|
||||
export type { HeartbeatResponse } from './models/HeartbeatResponse';
|
||||
@@ -83,7 +82,6 @@ export type { SGDBResource } from './models/SGDBResource';
|
||||
export type { SiblingRomSchema } from './models/SiblingRomSchema';
|
||||
export type { SimpleRomSchema } from './models/SimpleRomSchema';
|
||||
export type { SmartCollectionSchema } from './models/SmartCollectionSchema';
|
||||
export type { SSMedia } from './models/SSMedia';
|
||||
export type { StateSchema } from './models/StateSchema';
|
||||
export type { StatsReturn } from './models/StatsReturn';
|
||||
export type { SystemDict } from './models/SystemDict';
|
||||
|
||||
20
frontend/src/__generated__/models/GamelistMedia.ts
generated
20
frontend/src/__generated__/models/GamelistMedia.ts
generated
@@ -1,20 +0,0 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type GamelistMedia = {
|
||||
box2d: (string | null);
|
||||
box2d_back: (string | null);
|
||||
box3d: (string | null);
|
||||
fanart: (string | null);
|
||||
image: (string | null);
|
||||
manual: (string | null);
|
||||
marquee: (string | null);
|
||||
miximage: (string | null);
|
||||
physical: (string | null);
|
||||
screenshot: (string | null);
|
||||
thumbnail: (string | null);
|
||||
title_screen: (string | null);
|
||||
video: (string | null);
|
||||
};
|
||||
|
||||
@@ -2,8 +2,20 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { GamelistMedia } from './GamelistMedia';
|
||||
export type RomGamelistMetadata = {
|
||||
box2d?: (string | null);
|
||||
box2d_back?: (string | null);
|
||||
box3d?: (string | null);
|
||||
fanart?: (string | null);
|
||||
image?: (string | null);
|
||||
manual?: (string | null);
|
||||
marquee?: (string | null);
|
||||
miximage?: (string | null);
|
||||
physical?: (string | null);
|
||||
screenshot?: (string | null);
|
||||
thumbnail?: (string | null);
|
||||
title_screen?: (string | null);
|
||||
video?: (string | null);
|
||||
rating?: (number | null);
|
||||
first_release_date?: (string | null);
|
||||
companies?: (Array<string> | null);
|
||||
@@ -11,6 +23,5 @@ export type RomGamelistMetadata = {
|
||||
genres?: (Array<string> | null);
|
||||
player_count?: (string | null);
|
||||
md5_hash?: (string | null);
|
||||
media?: GamelistMedia;
|
||||
};
|
||||
|
||||
|
||||
19
frontend/src/__generated__/models/RomSSMetadata.ts
generated
19
frontend/src/__generated__/models/RomSSMetadata.ts
generated
@@ -2,8 +2,24 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { SSMedia } from './SSMedia';
|
||||
export type RomSSMetadata = {
|
||||
bezel?: (string | null);
|
||||
box2d?: (string | null);
|
||||
box2d_side?: (string | null);
|
||||
box2d_back?: (string | null);
|
||||
box3d?: (string | null);
|
||||
fanart?: (string | null);
|
||||
fullbox?: (string | null);
|
||||
logo?: (string | null);
|
||||
manual?: (string | null);
|
||||
marquee?: (string | null);
|
||||
miximage?: (string | null);
|
||||
physical?: (string | null);
|
||||
screenshot?: (string | null);
|
||||
steamgrid?: (string | null);
|
||||
title_screen?: (string | null);
|
||||
video?: (string | null);
|
||||
video_normalized?: (string | null);
|
||||
ss_score?: string;
|
||||
first_release_date?: (number | null);
|
||||
alternative_names?: Array<string>;
|
||||
@@ -11,6 +27,5 @@ export type RomSSMetadata = {
|
||||
franchises?: Array<string>;
|
||||
game_modes?: Array<string>;
|
||||
genres?: Array<string>;
|
||||
media?: SSMedia;
|
||||
};
|
||||
|
||||
|
||||
24
frontend/src/__generated__/models/SSMedia.ts
generated
24
frontend/src/__generated__/models/SSMedia.ts
generated
@@ -1,24 +0,0 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type SSMedia = {
|
||||
bezel: (string | null);
|
||||
box2d: (string | null);
|
||||
box2d_side: (string | null);
|
||||
box2d_back: (string | null);
|
||||
box3d: (string | null);
|
||||
fanart: (string | null);
|
||||
fullbox: (string | null);
|
||||
logo: (string | null);
|
||||
manual: (string | null);
|
||||
marquee: (string | null);
|
||||
miximage: (string | null);
|
||||
physical: (string | null);
|
||||
screenshot: (string | null);
|
||||
steamgrid: (string | null);
|
||||
title_screen: (string | null);
|
||||
video: (string | null);
|
||||
video_normalized: (string | null);
|
||||
};
|
||||
|
||||
@@ -343,7 +343,7 @@ watch(
|
||||
@click="exportGamelist"
|
||||
>
|
||||
<v-icon class="text-romm-blue mr-2"> mdi-download </v-icon>
|
||||
{{ t("platform.export-gamelist") }}
|
||||
{{ t("platform.export") }} gamelist.xml
|
||||
</v-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"cover-style": "Cover-Stil",
|
||||
"danger-zone": "Gefahrenzone",
|
||||
"delete-platform": "Plattform löschen",
|
||||
"export": "Exportieren",
|
||||
"family": "Familie",
|
||||
"filter-gallery": "Gallerie filtern",
|
||||
"franchise": "Franchise",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"cover-style": "Cover style",
|
||||
"danger-zone": "Danger zone",
|
||||
"delete-platform": "Delete platform",
|
||||
"export-gamelist": "Export Gamelist",
|
||||
"export": "Export",
|
||||
"family": "Family",
|
||||
"filter-gallery": "Filter gallery",
|
||||
"franchise": "Franchise",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"cover-style": "Cover style",
|
||||
"danger-zone": "Danger zone",
|
||||
"delete-platform": "Delete platform",
|
||||
"export-gamelist": "Export Gamelist",
|
||||
"export": "Export",
|
||||
"family": "Family",
|
||||
"filter-gallery": "Filter gallery",
|
||||
"franchise": "Franchise",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"cover-style": "Estilo de carátula",
|
||||
"danger-zone": "Zona de peligro",
|
||||
"delete-platform": "Eliminar platforma",
|
||||
"export": "Exportar",
|
||||
"family": "Familia",
|
||||
"filter-gallery": "Filtrar galería",
|
||||
"franchise": "Franquicia",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"cover-style": "Style de couverture",
|
||||
"danger-zone": "Zone de danger",
|
||||
"delete-platform": "Supprimer la plateforme",
|
||||
"export": "Exporter",
|
||||
"family": "Famille",
|
||||
"filter-gallery": "Filtrer la galerie",
|
||||
"franchise": "Franchise",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"cover-style": "Stile Copertina",
|
||||
"danger-zone": "Zona pericolosa",
|
||||
"delete-platform": "Elimina piattaforma",
|
||||
"export": "Esporta",
|
||||
"family": "Famiglia",
|
||||
"filter-gallery": "Filtra galleria",
|
||||
"franchise": "Franchise",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"cover-style": "カバースタイル",
|
||||
"danger-zone": "危険",
|
||||
"delete-platform": "プラットフォームの削除",
|
||||
"export": "エクスポート",
|
||||
"family": "ファミリー",
|
||||
"filter-gallery": "ギャラリーをフィルタ",
|
||||
"franchise": "フランチャイズ",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"cover-style": "커버 스타일",
|
||||
"danger-zone": "위험 구역",
|
||||
"delete-platform": "플랫폼 지우기",
|
||||
"export": "내보내기",
|
||||
"family": "계열",
|
||||
"filter-gallery": "갤러리 필터",
|
||||
"franchise": "프랜차이즈",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"cover-style": "Styl okładki",
|
||||
"danger-zone": "Strefa zagrożenia",
|
||||
"delete-platform": "Usuń platformę",
|
||||
"export": "Eksportuj",
|
||||
"family": "Rodzina",
|
||||
"filter-gallery": "Filtruj galerię",
|
||||
"franchise": "Seria",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"cover-style": "Estilo da capa",
|
||||
"danger-zone": "Zona de perigo",
|
||||
"delete-platform": "Excluir plataforma",
|
||||
"export": "Exportar",
|
||||
"family": "Família",
|
||||
"filter-gallery": "Filtrar galeria",
|
||||
"franchise": "Franquia",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"cover-style": "Stil copertă",
|
||||
"danger-zone": "Zonă periculoasă",
|
||||
"delete-platform": "Șterge platforma",
|
||||
"export": "Exportare",
|
||||
"family": "Familie",
|
||||
"filter-gallery": "Filtrare galerie",
|
||||
"franchise": "Franciză",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"cover-style": "Стиль обложки",
|
||||
"danger-zone": "Опасная зона",
|
||||
"delete-platform": "Удалить платформу",
|
||||
"export": "Экспорт",
|
||||
"family": "Семейство",
|
||||
"filter-gallery": "Фильтр галереи",
|
||||
"franchise": "Франшиза",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"cover-style": "封面样式",
|
||||
"danger-zone": "危险区域",
|
||||
"delete-platform": "删除平台",
|
||||
"export": "导出",
|
||||
"family": "家族",
|
||||
"filter-gallery": "筛选游戏库",
|
||||
"franchise": "系列",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"cover-style": "封面樣式",
|
||||
"danger-zone": "危險操作",
|
||||
"delete-platform": "删除平台",
|
||||
"export": "導出",
|
||||
"family": "家族",
|
||||
"filter-gallery": "篩選遊戲庫",
|
||||
"franchise": "系列",
|
||||
|
||||
@@ -30,6 +30,7 @@ const defaultConfig = {
|
||||
SCAN_ARTWORK_PRIORITY: [],
|
||||
SCAN_REGION_PRIORITY: [],
|
||||
SCAN_LANGUAGE_PRIORITY: [],
|
||||
SCAN_ARTWORK_COVER_STYLE: "",
|
||||
} as ConfigResponse;
|
||||
|
||||
export default defineStore("config", {
|
||||
|
||||
Reference in New Issue
Block a user