fix: torrentio client

This commit is contained in:
2025-08-31 19:33:37 -05:00
parent aa042e8275
commit 662e2600f6
2 changed files with 4 additions and 4 deletions

View File

@@ -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