[Scummvm-git-logs] scummvm-web master -> 3fafbaa5835de50f2a3a5a2b5854ed08c4ab3e6a
Thunderforge
noreply at scummvm.org
Sat Mar 5 19:49:53 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-web' repo located at https://github.com/scummvm/scummvm-web .
Summary:
3fafbaa583 IMAGES: Only count full screenshots (#213)
Commit: 3fafbaa5835de50f2a3a5a2b5854ed08c4ab3e6a
https://github.com/scummvm/scummvm-web/commit/3fafbaa5835de50f2a3a5a2b5854ed08c4ab3e6a
Author: Thunderforge (wjherrmann at gmail.com)
Date: 2022-03-05T13:49:51-06:00
Commit Message:
IMAGES: Only count full screenshots (#213)
Fixes [#13340](https://bugs.scummvm.org/ticket/13340).
When getting a count of the number of screenshots for a game or series, only count the full screenshots. This prevents doubling the count because both the small and large versions are included.
Changed paths:
include/Models/ScreenshotsModel.php
diff --git a/include/Models/ScreenshotsModel.php b/include/Models/ScreenshotsModel.php
index 9450afe4..697d3614 100644
--- a/include/Models/ScreenshotsModel.php
+++ b/include/Models/ScreenshotsModel.php
@@ -145,7 +145,7 @@ class ScreenshotsModel extends BasicModel
$count = 0;
// Iterate over each game and count the number of screenshot files
foreach ($games as $game) {
- $count += count(glob("./" . DIR_SCREENSHOTS . "/" . $game->getEngine()->getId() . "/" . $game->getId() . "/*"));
+ $count += count(glob("./" . DIR_SCREENSHOTS . "/" . $game->getEngine()->getId() . "/" . $game->getId() . "/*_full.png"));
}
return $count;
}
More information about the Scummvm-git-logs
mailing list