[Scummvm-git-logs] scummvm-web master -> 0b2f1d9adf0370a177cccf0d7962f17e762b4b17
Thunderforge
noreply at scummvm.org
Wed Jan 12 03:20:10 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:
0b2f1d9adf WEB: Removing the need for DOWNLOADS_DAILY_URL
Commit: 0b2f1d9adf0370a177cccf0d7962f17e762b4b17
https://github.com/scummvm/scummvm-web/commit/0b2f1d9adf0370a177cccf0d7962f17e762b4b17
Author: Thunderforge (wjherrmann at gmail.com)
Date: 2022-01-11T21:20:05-06:00
Commit Message:
WEB: Removing the need for DOWNLOADS_DAILY_URL
Also rearranging how the file name is calculated and fixing the Tools extra info not working
Changed paths:
include/Constants.php
include/Objects/File.php
diff --git a/include/Constants.php b/include/Constants.php
index 6615fc72..ff3afce9 100644
--- a/include/Constants.php
+++ b/include/Constants.php
@@ -49,7 +49,6 @@ class Constants
/* Downloads */
define('DOWNLOADS_BASE', 'https://downloads.scummvm.org');
define('DOWNLOADS_URL', 'frs/scummvm/{$version}/');
- define('DOWNLOADS_DAILY_URL', 'frs/daily/');
define('DOWNLOADS_EXTRAS_URL', 'frs/extras/');
define('DOWNLOADS_TOOLS_URL', 'frs/scummvm-tools/{$release_tools}/');
diff --git a/include/Objects/File.php b/include/Objects/File.php
index 6e603f6d..477a51ad 100644
--- a/include/Objects/File.php
+++ b/include/Objects/File.php
@@ -36,16 +36,17 @@ class File extends BasicObject
$this->url = $url;
} else {
// Construct the URL based on its type
- if ($this->category == 'scummvm' && $this->version == 'daily') {
- $fname = DOWNLOADS_DAILY_URL . $url;
- } elseif ($this->category == 'scummvm' && $this->subcategory == 'tools') {
+ if ($this->category == 'source') {
+ $fname = DOWNLOADS_URL . $url;
+ } elseif ($this->subcategory == 'tools') {
$fname = DOWNLOADS_TOOLS_URL . $url;
} elseif ($this->category == 'games' || $this->category == 'addons') {
$fname = DOWNLOADS_EXTRAS_URL . $url;
} elseif (str_starts_with($url, '/frs') || str_starts_with($url, 'http')) {
$fname = $url;
} else {
- $fname = DOWNLOADS_URL . $url;
+ // E.g. frs/scummvm/1.2.3/scummvm-1.2.3.zip
+ $fname = 'frs/' . $this->category . '/' . $this->version . '/' . $url;
}
$fname = str_replace('{$release_tools}', RELEASE_TOOLS, $fname);
$fname = str_replace('{$version}', "$this->version", $fname);
More information about the Scummvm-git-logs
mailing list