diff --git a/.gitignore b/.gitignore index a09c56d..f87b7c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /.idea +/files +a.m3u8 diff --git a/download-all.sh b/download-all.sh new file mode 100755 index 0000000..404bd79 --- /dev/null +++ b/download-all.sh @@ -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 diff --git a/index.php b/index.php index 999e3af..2e5040e 100644 --- a/index.php +++ b/index.php @@ -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);