diff options
| author | lolcat <will@lolcat.ca> | 2025-12-13 19:41:47 -0500 |
|---|---|---|
| committer | lolcat <will@lolcat.ca> | 2025-12-13 19:41:47 -0500 |
| commit | 800cde93cf94068138320994c8bfbf03af4b6400 (patch) | |
| tree | 995a63c70040e8a62fa13748f32b72df54f4ca7a /scraper/sc.php | |
| parent | aa7c85b98a1e6f0ef4bc474946a7c80db0764bb2 (diff) | |
soundcloud token expiry fix
Diffstat (limited to 'scraper/sc.php')
| -rw-r--r-- | scraper/sc.php | 9 |
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; } |
