mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-25 18:48:51 -04:00
Triforce v0.8.0
Evil HD (SMAA Ultra, 16x filtering, full textures, ambient occlusion with bounce light, sunlight shafts, foliage drawn 4x as far, the remastered texture pack's loader and the launcher's download of it), FSR 3.1 frame generation for every GPU, Intel XeSS, FSR 4 model choice, ReShade presets, Auto (this PC), HUD placement, the options menu in 13 languages, a second input for every control, hold to toggle, DualSense speaker and haptics, NFC from the player's own dumps, the above-60 fps game fixes, the Debug tab's flight and Inventory fixes, the launcher's full settings, and over 250 fixes.
This commit is contained in:
@@ -231,10 +231,25 @@ def _https(url):
|
||||
return url
|
||||
|
||||
|
||||
class _HttpsRedirects(urllib.request.HTTPRedirectHandler):
|
||||
"""((Triforce, 11-24, after Source A's) A redirect is followed only to another https link. urllib's own follows one to http:
|
||||
and ftp: too, so _https saw the first link and not where the download came from"""
|
||||
|
||||
def redirect_request(self, req, fp, code, msg, headers, newurl):
|
||||
return super().redirect_request(req, fp, code, msg, headers, _https(newurl))
|
||||
|
||||
|
||||
_OPENER = urllib.request.build_opener(_HttpsRedirects)
|
||||
|
||||
|
||||
def _open(req, timeout):
|
||||
return _OPENER.open(req, timeout=timeout)
|
||||
|
||||
|
||||
def _request(url, timeout, limit=MAX_DOWNLOAD):
|
||||
# (no second argument: Request's second is the POST body, and a str body failed every download before connecting)
|
||||
req = urllib.request.Request(_https(url), headers={"User-Agent": "Triforce", "Accept": "application/vnd.github+json"})
|
||||
with urllib.request.urlopen(req, timeout=timeout) as response:
|
||||
with _open(req, timeout) as response:
|
||||
return _read_at_most(response, limit)
|
||||
|
||||
|
||||
@@ -254,7 +269,7 @@ def _api_download(url):
|
||||
if asset.get("name") == name:
|
||||
req = urllib.request.Request(_https(asset.get("url")), headers={
|
||||
"User-Agent": "Triforce", "Accept": "application/octet-stream"})
|
||||
with urllib.request.urlopen(req, timeout=120) as response:
|
||||
with _open(req, 120) as response:
|
||||
return _read_at_most(response, MAX_DOWNLOAD)
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user