fix: torrentio client
This commit is contained in:
@@ -13,7 +13,7 @@ class HttpClient
|
||||
{
|
||||
private GuzzleClient $client;
|
||||
|
||||
private string $baseUrl = 'https://torrentio.strem.fun/realdebrid=%s/stream/movie/';
|
||||
private string $baseUrl = 'https://torrentio.strem.fun/realdebrid=%s/';
|
||||
|
||||
public function __construct(
|
||||
#[Autowire(env: 'REAL_DEBRID_KEY')] private string $realDebridKey,
|
||||
@@ -27,7 +27,7 @@ class HttpClient
|
||||
|
||||
public function get(string $imdbId, array $cacheTags = []): array
|
||||
{
|
||||
$cacheKey = "torrentio.{$imdbId}";
|
||||
$cacheKey = str_replace(":", ".", "torrentio.{$imdbId}");
|
||||
|
||||
return $this->cache->get($cacheKey, function (ItemInterface $item) use ($imdbId, $cacheTags) {
|
||||
$item->expiresAt(Carbon::now()->addHour()->setMinute(0)->setSecond(0));
|
||||
@@ -35,7 +35,7 @@ class HttpClient
|
||||
$item->tag($cacheTags);
|
||||
}
|
||||
try {
|
||||
$response = $this->client->get("$imdbId.json");
|
||||
$response = $this->client->get("stream/movie/$imdbId.json");
|
||||
return json_decode(
|
||||
$response->getBody()->getContents(),
|
||||
true
|
||||
|
||||
Reference in New Issue
Block a user