diff --git a/backend/handler/export/gamelist_exporter.py b/backend/handler/export/gamelist_exporter.py index ec4e3248e..009447469 100644 --- a/backend/handler/export/gamelist_exporter.py +++ b/backend/handler/export/gamelist_exporter.py @@ -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 diff --git a/backend/handler/metadata/gamelist_handler.py b/backend/handler/metadata/gamelist_handler.py index 8e993bd2d..3aa333f08 100644 --- a/backend/handler/metadata/gamelist_handler.py +++ b/backend/handler/metadata/gamelist_handler.py @@ -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 diff --git a/backend/handler/metadata/ss_handler.py b/backend/handler/metadata/ss_handler.py index 15fd60246..ee7b3fff2 100644 --- a/backend/handler/metadata/ss_handler.py +++ b/backend/handler/metadata/ss_handler.py @@ -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"] diff --git a/frontend/src/__generated__/index.ts b/frontend/src/__generated__/index.ts index 9409c75ae..41b08395a 100644 --- a/frontend/src/__generated__/index.ts +++ b/frontend/src/__generated__/index.ts @@ -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'; diff --git a/frontend/src/__generated__/models/GamelistMedia.ts b/frontend/src/__generated__/models/GamelistMedia.ts deleted file mode 100644 index 5c5fc7b5f..000000000 --- a/frontend/src/__generated__/models/GamelistMedia.ts +++ /dev/null @@ -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); -}; - diff --git a/frontend/src/__generated__/models/RomGamelistMetadata.ts b/frontend/src/__generated__/models/RomGamelistMetadata.ts index 81a90400e..9c567a1d6 100644 --- a/frontend/src/__generated__/models/RomGamelistMetadata.ts +++ b/frontend/src/__generated__/models/RomGamelistMetadata.ts @@ -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 | null); @@ -11,6 +23,5 @@ export type RomGamelistMetadata = { genres?: (Array | null); player_count?: (string | null); md5_hash?: (string | null); - media?: GamelistMedia; }; diff --git a/frontend/src/__generated__/models/RomSSMetadata.ts b/frontend/src/__generated__/models/RomSSMetadata.ts index a1d2985ee..0e3b2a11c 100644 --- a/frontend/src/__generated__/models/RomSSMetadata.ts +++ b/frontend/src/__generated__/models/RomSSMetadata.ts @@ -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; @@ -11,6 +27,5 @@ export type RomSSMetadata = { franchises?: Array; game_modes?: Array; genres?: Array; - media?: SSMedia; }; diff --git a/frontend/src/__generated__/models/SSMedia.ts b/frontend/src/__generated__/models/SSMedia.ts deleted file mode 100644 index 51f19d501..000000000 --- a/frontend/src/__generated__/models/SSMedia.ts +++ /dev/null @@ -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); -}; - diff --git a/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue b/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue index 717c26ff2..f334b07f5 100644 --- a/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue +++ b/frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue @@ -343,7 +343,7 @@ watch( @click="exportGamelist" > mdi-download - {{ t("platform.export-gamelist") }} + {{ t("platform.export") }} gamelist.xml diff --git a/frontend/src/locales/de_DE/platform.json b/frontend/src/locales/de_DE/platform.json index 6cc403b5b..48666718a 100644 --- a/frontend/src/locales/de_DE/platform.json +++ b/frontend/src/locales/de_DE/platform.json @@ -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", diff --git a/frontend/src/locales/en_GB/platform.json b/frontend/src/locales/en_GB/platform.json index e75346032..2214807f1 100644 --- a/frontend/src/locales/en_GB/platform.json +++ b/frontend/src/locales/en_GB/platform.json @@ -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", diff --git a/frontend/src/locales/en_US/platform.json b/frontend/src/locales/en_US/platform.json index e75346032..2214807f1 100644 --- a/frontend/src/locales/en_US/platform.json +++ b/frontend/src/locales/en_US/platform.json @@ -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", diff --git a/frontend/src/locales/es_ES/platform.json b/frontend/src/locales/es_ES/platform.json index c33274ad8..92b47097b 100644 --- a/frontend/src/locales/es_ES/platform.json +++ b/frontend/src/locales/es_ES/platform.json @@ -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", diff --git a/frontend/src/locales/fr_FR/platform.json b/frontend/src/locales/fr_FR/platform.json index 0cc31942e..811c6821d 100644 --- a/frontend/src/locales/fr_FR/platform.json +++ b/frontend/src/locales/fr_FR/platform.json @@ -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", diff --git a/frontend/src/locales/it_IT/platform.json b/frontend/src/locales/it_IT/platform.json index 7b85ed778..5dda58f9e 100644 --- a/frontend/src/locales/it_IT/platform.json +++ b/frontend/src/locales/it_IT/platform.json @@ -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", diff --git a/frontend/src/locales/ja_JP/platform.json b/frontend/src/locales/ja_JP/platform.json index 4d9c3be88..fa6fd282a 100644 --- a/frontend/src/locales/ja_JP/platform.json +++ b/frontend/src/locales/ja_JP/platform.json @@ -8,6 +8,7 @@ "cover-style": "カバースタイル", "danger-zone": "危険", "delete-platform": "プラットフォームの削除", + "export": "エクスポート", "family": "ファミリー", "filter-gallery": "ギャラリーをフィルタ", "franchise": "フランチャイズ", diff --git a/frontend/src/locales/ko_KR/platform.json b/frontend/src/locales/ko_KR/platform.json index cd60bd4a9..18efe63a2 100644 --- a/frontend/src/locales/ko_KR/platform.json +++ b/frontend/src/locales/ko_KR/platform.json @@ -8,6 +8,7 @@ "cover-style": "커버 스타일", "danger-zone": "위험 구역", "delete-platform": "플랫폼 지우기", + "export": "내보내기", "family": "계열", "filter-gallery": "갤러리 필터", "franchise": "프랜차이즈", diff --git a/frontend/src/locales/pl_PL/platform.json b/frontend/src/locales/pl_PL/platform.json index 4e0b412a2..707d5fffd 100644 --- a/frontend/src/locales/pl_PL/platform.json +++ b/frontend/src/locales/pl_PL/platform.json @@ -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", diff --git a/frontend/src/locales/pt_BR/platform.json b/frontend/src/locales/pt_BR/platform.json index 772261650..510fc1543 100644 --- a/frontend/src/locales/pt_BR/platform.json +++ b/frontend/src/locales/pt_BR/platform.json @@ -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", diff --git a/frontend/src/locales/ro_RO/platform.json b/frontend/src/locales/ro_RO/platform.json index 6d0e458a6..666fcc897 100644 --- a/frontend/src/locales/ro_RO/platform.json +++ b/frontend/src/locales/ro_RO/platform.json @@ -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ă", diff --git a/frontend/src/locales/ru_RU/platform.json b/frontend/src/locales/ru_RU/platform.json index f399f83dc..b2f84e221 100644 --- a/frontend/src/locales/ru_RU/platform.json +++ b/frontend/src/locales/ru_RU/platform.json @@ -8,6 +8,7 @@ "cover-style": "Стиль обложки", "danger-zone": "Опасная зона", "delete-platform": "Удалить платформу", + "export": "Экспорт", "family": "Семейство", "filter-gallery": "Фильтр галереи", "franchise": "Франшиза", diff --git a/frontend/src/locales/zh_CN/platform.json b/frontend/src/locales/zh_CN/platform.json index 7e8b07ef4..10f109464 100644 --- a/frontend/src/locales/zh_CN/platform.json +++ b/frontend/src/locales/zh_CN/platform.json @@ -8,6 +8,7 @@ "cover-style": "封面样式", "danger-zone": "危险区域", "delete-platform": "删除平台", + "export": "导出", "family": "家族", "filter-gallery": "筛选游戏库", "franchise": "系列", diff --git a/frontend/src/locales/zh_TW/platform.json b/frontend/src/locales/zh_TW/platform.json index 3e3d7bc04..fb9836605 100644 --- a/frontend/src/locales/zh_TW/platform.json +++ b/frontend/src/locales/zh_TW/platform.json @@ -8,6 +8,7 @@ "cover-style": "封面樣式", "danger-zone": "危險操作", "delete-platform": "删除平台", + "export": "導出", "family": "家族", "filter-gallery": "篩選遊戲庫", "franchise": "系列", diff --git a/frontend/src/stores/config.ts b/frontend/src/stores/config.ts index 69be6ff87..6f1276d04 100644 --- a/frontend/src/stores/config.ts +++ b/frontend/src/stores/config.ts @@ -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", {