fix: more robust screenshot naming for scrapers

This commit is contained in:
lantzelot-swe 2021-01-15 23:25:25 +01:00
parent e21af5691e
commit 4a01061cc6
2 changed files with 3 additions and 3 deletions

View File

@ -286,8 +286,8 @@ public class C64comScraper implements Scraper
URL imageUrl = new URL(absoluteUrl);
screensList.add(ImageIO.read(imageUrl));
//Replace number in url
absoluteUrl = absoluteUrl.replace("0" + Integer.toString(i), "0" + Integer.toString(i+1));
}
absoluteUrl = absoluteUrl.replace("0" + Integer.toString(i) + ".", "0" + Integer.toString(i+1) + ".");
}
}
}
catch (IOException e)

View File

@ -259,7 +259,7 @@ public class GamebaseScraper implements Scraper
}
else
{
absoluteUrl = absoluteUrl.replace("_" + Integer.toString(i), "_" + Integer.toString(i + 1));
absoluteUrl = absoluteUrl.replace("_" + Integer.toString(i) + ".", "_" + Integer.toString(i + 1) + ".");
}
}
}