mirror of
https://github.com/anthonyaxenov/iptv.git
synced 2024-11-22 05:24:45 +00:00
curl timeout
This commit is contained in:
parent
724ccfa40c
commit
29b35d014d
@ -30,11 +30,10 @@ final class PlaylistProcessor
|
|||||||
$filepath = config_path('playlists.ini');
|
$filepath = config_path('playlists.ini');
|
||||||
$this->updated_at = date('d.m.Y h:i', filemtime($filepath));
|
$this->updated_at = date('d.m.Y h:i', filemtime($filepath));
|
||||||
$this->playlists = collect(parse_ini_file($filepath, true))
|
$this->playlists = collect(parse_ini_file($filepath, true))
|
||||||
->transform(function ($playlist, $id) {
|
->transform(static fn ($playlist, $id) => empty($playlist['redirect'])
|
||||||
return empty($playlist['redirect'])
|
|
||||||
? new Playlist((string)$id, $playlist)
|
? new Playlist((string)$id, $playlist)
|
||||||
: new RedirectedPlaylist((string)$id, $playlist['redirect']);
|
: new RedirectedPlaylist((string)$id, $playlist['redirect'])
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -97,7 +96,7 @@ final class PlaylistProcessor
|
|||||||
curl_setopt_array($curl, [
|
curl_setopt_array($curl, [
|
||||||
CURLOPT_URL => $this->playlist($id)->pls,
|
CURLOPT_URL => $this->playlist($id)->pls,
|
||||||
CURLOPT_RETURNTRANSFER => true,
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
CURLOPT_TIMEOUT => 5,
|
CURLOPT_TIMEOUT => 30,
|
||||||
CURLOPT_HEADER => false,
|
CURLOPT_HEADER => false,
|
||||||
CURLOPT_FAILONERROR => true,
|
CURLOPT_FAILONERROR => true,
|
||||||
]);
|
]);
|
||||||
|
Loading…
Reference in New Issue
Block a user