Refactor extract_metadata_from_igdb_rom to streamline youtube_video_id retrieval

This commit is contained in:
zurdi committed 2025-04-22 21:18:33 +00:00
1 parent c533e22e84
commit 8ad3fbadea
1 file changed
+1 -3
+1 -3
View File
@@ -96,11 +96,9 @@ class IGDBRom(TypedDict):
def extract_metadata_from_igdb_rom(rom: dict) -> IGDBMetadata:
youtube_video_id = pydash.get(rom, "videos[0].video_id", None)
youtube_video_id = str(youtube_video_id) if youtube_video_id is not None else None
return IGDBMetadata(
{
"youtube_video_id": youtube_video_id,
"youtube_video_id": pydash.get(rom, "videos[0].video_id", None),
"total_rating": str(round(rom.get("total_rating", 0.0), 2)),
"aggregated_rating": str(round(rom.get("aggregated_rating", 0.0), 2)),
"first_release_date": rom.get("first_release_date", None),