Skip to content

Screenscraper - #19384

Open
danprice142 wants to merge 6 commits into
libretro:masterfrom
danprice142:screenscraper
Open

Screenscraper#19384
danprice142 wants to merge 6 commits into
libretro:masterfrom
danprice142:screenscraper

Conversation

@danprice142

Copy link
Copy Markdown
Contributor

Adds Screenscraper integration for playlist and per-game scraping, including media downloads, metadata sidecars, quota handling, and UI settings. Enhances XMB and Ozone with richer game metadata, ratings, scrolling synopses, video wallpapers, offline metadata reading

@LibretroAdmin

Comment thread docs/SCREENSCRAPER-INTEGRATION.md Outdated
Comment thread gfx/gfx_animation.c
Comment thread retroarch.cfg
Implements ScreenScraper support: adds network/screenscraper.{h,c} (API client, JSON parsing, media selection, metadata → JSON), tasks/task_screenscraper.c (playlist & per-entry scraping, downloads, resume-on-quota), settings files for scraper preferences and account details, and menu/UI wiring (settings, account lists, playlist scrape action, thumbnail mode extensions, per-game dynamic wallpapers). Integrates into the build (Makefile.common), configuration, and tasks_internal. Handles request-quota detection and pause/resume, libretro-server fallback, and new message IDs and strings. Updates the playlist thumbnail enum to include 3D boxarts, fanart, and marquees.
Introduce metadata sidecar support from ScreenScraper and vertical line-ticker text rendering.

- Add JSON sidecar parsing APIs (screenscraper_metadata_path/load/load_entry) and rating->stars helper; parse/normalize fields (name, description, publisher, developer, genre, rating, etc.).
- Add vertical line ticker implementations (step and smooth) in gfx/gfx_animation.{c,h} and move TICKER_* macros there; reuse from XMB and Ozone.
- Integrate scraped facts into menus: XMB metadata panel, Ozone content metadata (rating stars, publisher, synopsis) with selectable scroll style (Horizontal/Vertical/Off).
- Add UI/settings: ozone_metadata_scroll_style, menu_xmb_show_metadata_panel, menu_dynamic_wallpaper_type (Images/Videos) and string reps.
- Support video snaps as dynamic wallpapers and animated background handling via gfx_thumbnail (bg_anim) with lifecycle/cleanup changes.
- Prefer scraped sidecar values over .rdb entries when available (menu_displaylist parsing) and add PLAYLIST_THUMBNAIL_MODE_VIDEOS enum/strings.
- Misc: message hash entries, menu wiring, refactors to avoid duplicated ticker code in xmb.c, and HAVE_NETWORKING guards.

These changes let menus display richer scraped metadata, choose vertical scrolling for wrapped synopses, and optionally use video snaps for per-game dynamic backgrounds.
Add an unconditional metadata-only ScreenScraper translation unit and APIs so menus can read local metadata sidecars without networking. Create network/screenscraper_meta.c and declare screenscraper_extended_media_allowed in the header; move metadata and rating helpers out of the network-only file. Remove HAVE_NETWORKING guards in menu code so scraped sidecar information is shown on builds without network support. Add the object to Makefile.common and include it in griffin.c.
When a metadata sidecar is missing, menu drivers now request a single-entry ScreenScraper metadata backfill so facts can appear while browsing. Adds task_push_pl_entry_screenscraper_meta (and declaration) which checks settings, sign-in and that the sidecar is actually absent before pushing a scrape. Implements SS_SCRAPE_FLAG_INFO_MISS, records definitive misses (404 or unparseable 200) as a not-found marker file, and writes/replaces metadata correctly. Also fixes Ozone synopsis rendering by clamping wrapped descriptions and appending an ellipsis so long descriptions no longer disappear.
Replace calls to font_driver_get_line_height with direct access to font->metrics.height. In gfx_animation_line_ticker_smooth the code now scales and rounds the stored metrics height to compute glyph_height (metrics are populated at font init). In xmb.c the metadata panel uses xmb->font2->metrics.height with a fallback to xmb->font2_size. This removes redundant driver calls and relies on precomputed font metrics.
Add numerous ScreenScraper/settings entries to tools/settings_table.reference; expand password string handling to consider HAVE_NETWORKING and scope cheevos-only token check under HAVE_CHEEVOS in menu/menu_setting.c; fix overlapping copy in network/screenscraper.c by using memmove instead of strlcpy; add missing msg_hash_get_wideglyph_str stub and adjust comment in samples/gfx/.../stubs_retroarch.c; correct preprocessor mismatched #endif in tasks/tasks_internal.h.
@gouchi

gouchi commented Aug 12, 2026

Copy link
Copy Markdown
Member

Thank you for this nice feature !

As it is new UI, it might be good to add screenshots to see the result ;)

Also, you should add it to the CHANGES.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants