Open countbuggula opened 3 years ago
I also see title screens as the screenshot for some games. I know when I tried the Skraper tool that you could select "best screenshot" or similar, and that seemed to always download an actual in-game screenshot instead of the occasional title screen. Not sure if this type of screenshot could be implemented in Skyscraper as well or simply be replaced by the type currently connected to "screenshot" as I imagine that's what people want most of the time.
A workaround that I've used is to prioritize the wor
region over us
by manually re-listing everything in the regionPrios
config option, like so:
regionPrios="wor,us,eu,ss,uk,jp,au,ame,de,cus,cn,kr,asi,br,sp,fr,gr,it,no,dk,nz,nl,pl,ru,se,tw,ca"
Most of the other data will be scraped from the us
region anyway (via fallback).
Note: This solution will not work with the default ROM naming scheme, though. If a region tag is present in the ROM filename (e.g. (Europe)
), Skyscraper's auto-detection will still override the custom regionPrios
configuration.
In the future, it might be useful to have an option to disable the auto-detection altogether.
Also having this issue. Setting the region priority to world helped in some ways. But there are some games with only regional screenshots no world, and it will prioritise the title screens. Would be great to be able to get stricter scraping for screenshots only.
TLDR: Just set regionPrios in the config to e.g. "us,wor,uk,eu,jap" is what I use (most gameplay screenshots really aren't that localized specific), then go remove the "sstitle" option from
void ScreenScraper::getScreenshot(GameEntry &game) {
QString url = getJsonText(jsonObj["medias"].toArray(), REGION, QList<QString>({"ss", "sstitle"}));
which is currently hardcoded. Then you will always only get normal screenshots. Is some of your games missing a wor/us screenshot? Contribute one!
Long rant below: I've dug into this a bit. First the explain the current logic.
regionPrios are followed according to config. The specific region is prefix'ed if detected from the filename. This is done in the function AbstractScraper::runPasses
which is very straight foward if-else block.
The logic checks for this starts off with
if (info.fileName().indexOf("(") != -1 && config->region.isEmpty()) {
QString regionString = info.fileName().toLower().mid(
info.fileName().indexOf("("), info.fileName().length());
so, disabling this feature already exists. Just set the region=us
or whatever you wish.
ScreenScarper::getScreenshot
includes both the "ss" and "sstitle".
void ScreenScraper::getScreenshot(GameEntry &game) {
QString url = getJsonText(jsonObj["medias"].toArray(), REGION, QList<QString>({"ss", "sstitle"}));
if you, like me, prefer to never have title screenshots given that every single game i've scraped does have a normal screenshot, you can just remote sstitle and be done with it.
But, if you actually e.g. prefer an english title screenshot in cases where only non-english screenshots exists (or no screenshots at all), then things get trickier.
Currently the code basically does the logic:
for (const auto ®ion : regionPrios)
for (const auto &type : types)
for (const auto &jsonVal : jsonArr)
if (jsonVal.toObject()["region"].toString() == region &&
jsonVal.toObject()["type"].toString() == type)
return jsonVal.toObject()["url"].toString();
meaning that region priorities always get preferred, and the type (ss or sstitle) is the secondary criteria. In other words, english-title is preferred over a world-screenshot (which is bad). But if you do prefer english-title over a japanese-screenshot (when no other options exist), changing this loop order doesn't solve the issue.
The order of preferences could be more complex here, given that "wor" or "eu" should be considered matches for US games (at least that's how many many many screenshots in screenscraper are currently set up). One arguably correct matching order could be:
But.. ugh, this is convoluted and quite bit ad-hoc. In practice almost all games have some screenshot that should match already, so In practice, not many that many games are missing screenshots, and when they do I personally prefer to just fix that rather than having any title screenshots.
Describe the bug Scraper: Screenscraper When you set regional preferences in the config, if that region's screenshot doesn't exist but a title screen for that region does, instead of downloading the "world" screenshot, it downloads the region specific title screen.
To Reproduce Set region to non-world option, eg: region="us" Set region priorities to include world, eg: regionPrios="us,wor,uk,eu,jp" Scrape a game that has a US title screen but no US screenshot (but does have a world screenshot), eg: https://screenscraper.fr/gameinfos.php?plateforme=1&gameid=186
Expected behavior: world screenshot would download when no region-specific screenshot exists. Actual behavior: region-specific title screen is downloaded
Technical information
Additional context Built from source. Reproduced this issue across multiple platforms