aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2025-12-13 19:41:47 -0500
committerlolcat <will@lolcat.ca>2025-12-13 19:41:47 -0500
commit800cde93cf94068138320994c8bfbf03af4b6400 (patch)
tree995a63c70040e8a62fa13748f32b72df54f4ca7a
parentaa7c85b98a1e6f0ef4bc474946a7c80db0764bb2 (diff)
soundcloud token expiry fix
-rw-r--r--scraper/sc.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/scraper/sc.php b/scraper/sc.php
index 7083c42..004d673 100644
--- a/scraper/sc.php
+++ b/scraper/sc.php
@@ -257,7 +257,7 @@ class sc{
}
// token might've expired, get a new one and re-try search
- $this->get_token($proxy);
+ $token = $this->get_token($proxy, true);
return $this->music($get, true);
}
@@ -422,11 +422,14 @@ class sc{
return $out;
}
- public function get_token($proxy){
+ public function get_token($proxy, $force_refresh = false){
$token = apcu_fetch("sc_token");
- if($token !== false){
+ if(
+ $token !== false &&
+ $force_refresh === false
+ ){
return $token;
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage