mirror of
https://github.com/rommapp/romm.git
synced 2026-06-27 22:35:57 +00:00
add logo and marquee paths
This commit is contained in:
@@ -44,6 +44,7 @@ class MetadataMediaType(enum.StrEnum):
|
||||
SCREENSHOT = "screenshot"
|
||||
TITLE_SCREEN = "title_screen"
|
||||
MARQUEE = "marquee"
|
||||
LOGO = "logo"
|
||||
FANART = "fanart"
|
||||
VIDEO = "video"
|
||||
MANUAL = "manual"
|
||||
|
||||
@@ -44,6 +44,7 @@ class GamelistMetadataMedia(TypedDict):
|
||||
box3d_path: str | None
|
||||
miximage_path: str | None
|
||||
physical_path: str | None
|
||||
marquee_path: str | None
|
||||
video_path: str | None
|
||||
|
||||
|
||||
@@ -85,6 +86,7 @@ def extract_media_from_gamelist_rom(rom: Rom, game: Element) -> GamelistMetadata
|
||||
box3d_path=None,
|
||||
miximage_path=None,
|
||||
physical_path=None,
|
||||
marquee_path=None,
|
||||
video_path=None,
|
||||
)
|
||||
|
||||
@@ -142,6 +144,11 @@ def extract_media_from_gamelist_rom(rom: Rom, game: Element) -> GamelistMetadata
|
||||
f"{platform_dir}/{marquee_elem.text.replace("./", "")}"
|
||||
)
|
||||
gamelist_media["marquee_url"] = f"file://{str(marquee_path_path)}"
|
||||
|
||||
if MetadataMediaType.MARQUEE in preferred_media_types:
|
||||
gamelist_media["marquee_path"] = (
|
||||
f"{fs_resource_handler.get_media_resources_path(rom.platform_id, rom.id, MetadataMediaType.MARQUEE)}/marquee.png"
|
||||
)
|
||||
if miximage_elem is not None and miximage_elem.text:
|
||||
miximage_path_path = fs_platform_handler.validate_path(
|
||||
f"{platform_dir}/{miximage_elem.text.replace("./", "")}"
|
||||
|
||||
@@ -165,6 +165,8 @@ class SSMetadataMedia(TypedDict):
|
||||
box3d_path: str | None
|
||||
miximage_path: str | None
|
||||
physical_path: str | None
|
||||
marquee_path: str | None
|
||||
logo_path: str | None
|
||||
video_path: str | None
|
||||
|
||||
|
||||
@@ -208,6 +210,8 @@ def extract_media_from_ss_game(rom: Rom, game: SSGame) -> SSMetadataMedia:
|
||||
box3d_path=None,
|
||||
miximage_path=None,
|
||||
physical_path=None,
|
||||
marquee_path=None,
|
||||
logo_path=None,
|
||||
video_path=None,
|
||||
)
|
||||
|
||||
@@ -232,10 +236,19 @@ def extract_media_from_ss_game(rom: Rom, game: SSGame) -> SSMetadataMedia:
|
||||
ss_media["fullbox_url"] = media["url"]
|
||||
elif media.get("type") == "wheel-hd" and not ss_media["logo_url"]:
|
||||
ss_media["logo_url"] = media["url"]
|
||||
|
||||
if MetadataMediaType.LOGO in preferred_media_types:
|
||||
ss_media["logo_path"] = (
|
||||
f"{fs_resource_handler.get_media_resources_path(rom.platform_id, rom.id, MetadataMediaType.LOGO)}/logo.png"
|
||||
)
|
||||
elif media.get("type") == "manual" and not ss_media["manual_url"]:
|
||||
ss_media["manual_url"] = media["url"]
|
||||
elif media.get("type") == "screenmarquee" and not ss_media["marquee_url"]:
|
||||
ss_media["marquee_url"] = media["url"]
|
||||
if MetadataMediaType.MARQUEE in preferred_media_types:
|
||||
ss_media["marquee_path"] = (
|
||||
f"{fs_resource_handler.get_media_resources_path(rom.platform_id, rom.id, MetadataMediaType.MARQUEE)}/marquee.png"
|
||||
)
|
||||
elif (
|
||||
media.get("type") == "miximage1"
|
||||
or media.get("type") == "miximage2"
|
||||
|
||||
@@ -88,10 +88,11 @@ filesystem: {} # { roms_folder: 'roms' } For example if your folder structure is
|
||||
# - box3d # 3D box art
|
||||
# - miximage # Mixed image of multiple media
|
||||
# - physical # Disc, cartridge, etc.
|
||||
# - marquee # Custom marquee
|
||||
# - logo # Transparent logo
|
||||
# # Added to the screenshots carousel
|
||||
# - screenshot # Screenshot (enabled by default)
|
||||
# - title_screen # Title screen
|
||||
# - marquee # Transparent logo
|
||||
# - fanart # User uploaded artwork
|
||||
# # Bezel displayed around the emulatorjs window
|
||||
# - bezel
|
||||
|
||||
@@ -19,6 +19,7 @@ export type RomGamelistMetadata = {
|
||||
box3d_path?: (string | null);
|
||||
miximage_path?: (string | null);
|
||||
physical_path?: (string | null);
|
||||
marquee_path?: (string | null);
|
||||
video_path?: (string | null);
|
||||
rating?: (number | null);
|
||||
first_release_date?: (string | null);
|
||||
|
||||
@@ -24,6 +24,8 @@ export type RomSSMetadata = {
|
||||
box3d_path?: (string | null);
|
||||
miximage_path?: (string | null);
|
||||
physical_path?: (string | null);
|
||||
marquee_path?: (string | null);
|
||||
logo_path?: (string | null);
|
||||
video_path?: (string | null);
|
||||
ss_score?: string;
|
||||
first_release_date?: (number | null);
|
||||
|
||||
@@ -56,7 +56,8 @@ export type BoxartStyleOption =
|
||||
| "cover_path"
|
||||
| "box3d_path"
|
||||
| "physical_path"
|
||||
| "miximage_path";
|
||||
| "miximage_path"
|
||||
| "marquee_path";
|
||||
const boxartStyleRef = useLocalStorage<BoxartStyleOption>(
|
||||
"settings.boxartStyle",
|
||||
"cover_path",
|
||||
@@ -197,6 +198,7 @@ const boxartStyleOptions = computed(() => [
|
||||
{ title: t("settings.boxart-box3d"), value: "box3d_path" },
|
||||
{ title: t("settings.boxart-physical"), value: "physical_path" },
|
||||
{ title: t("settings.boxart-miximage"), value: "miximage_path" },
|
||||
{ title: t("settings.boxart-marquee"), value: "marquee_path" },
|
||||
]);
|
||||
|
||||
const setPlatformDrawerGroupBy = (value: string) => {
|
||||
|
||||
@@ -157,6 +157,7 @@ const videoRef = useTemplateRef<HTMLVideoElement>("hover-video-ref");
|
||||
|
||||
const gameIsHovering = ref(false);
|
||||
const {
|
||||
boxartStyle,
|
||||
boxartStyleCover,
|
||||
animateCD,
|
||||
animateCartridge,
|
||||
@@ -175,11 +176,6 @@ const {
|
||||
videoRef: videoRef,
|
||||
});
|
||||
|
||||
const boxartStyle = useLocalStorage<BoxartStyleOption>(
|
||||
"settings.boxartStyle",
|
||||
"cover_path",
|
||||
);
|
||||
|
||||
const isWebpEnabled = computed(
|
||||
() => heartbeatStore.value.TASKS?.ENABLE_SCHEDULED_CONVERT_IMAGES_TO_WEBP,
|
||||
);
|
||||
|
||||
@@ -239,6 +239,7 @@ export function useGameAnimation({
|
||||
);
|
||||
|
||||
return {
|
||||
boxartStyle,
|
||||
boxartStyleCover,
|
||||
animateCD,
|
||||
animateCartridge,
|
||||
|
||||
Reference in New Issue
Block a user