Download script + fixed radio ch count

master
Anthony Axenov 2022-05-29 18:19:09 +08:00
parent c171e63a9e
commit 9f538f2665
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC
3 changed files with 7 additions and 2 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
/.idea
/files
a.m3u8

4
download-all.sh 100755
View File

@ -0,0 +1,4 @@
#!/bin/bash
mkdir files
cd files
grep -P "pls='(.*)'" ../playlists.ini | sed "s/^pls=//g" | sed "s/'//g" | tr -d '\r' | xargs wget

View File

@ -24,8 +24,7 @@ if (!empty($_GET['getinfo'])) {
curl_close($ch);
unset($ch);
$matches = [];
preg_match_all("/^#EXTINF:-?[\d](?:(\s?url-tvg=\".*\")?(\stvg-logo=\".*\")?(\stvg-name=\".*\")?(\sgroup-title=\".*\")?)\s?,\s?(.*)/m",
$content, $matches);
preg_match_all("/^#EXTINF:-?[\d](?:(\s?url-tvg=\".*\")?(\stvg-logo=\".*\")?(\stvg-name=\".*\")?(\stvg-id=\".*\")?(\sgroup-title=\".*\")?)\s?,\s?(.*)/m", $content, $matches);
unset($content);
$channels = $matches[5];
unset($matches);