added country, category and encrypted filters
This commit is contained in:
parent
41062a7af6
commit
0d7547d75c
3 changed files with 47 additions and 4 deletions
|
@ -1,10 +1,16 @@
|
|||
<?php
|
||||
require_once("config.php");
|
||||
|
||||
|
||||
$channels=json_decode(file_get_contents("channels.json"), true);
|
||||
//print_r($channels);
|
||||
echo "#EXTM3U\n";
|
||||
|
||||
foreach($channels as $channel) {
|
||||
if ($exclude_encrypted && $channel['encrypted'] == 1) continue;
|
||||
if (!in_array($channel['land'], $include_countries)) continue;
|
||||
if (in_array($channel['kategorie'], $exclude_categories)) continue;
|
||||
|
||||
echo "#EXTINF:-1,".$channel["name"]."\n";
|
||||
//echo $channel["name"]."\n";
|
||||
echo "http://$IP/?src=1";
|
||||
|
|
36
config.php
36
config.php
|
@ -10,6 +10,40 @@ $transponderDB = "https://www.satindex.de/transponderv-1.php";
|
|||
/*
|
||||
Elgato IP
|
||||
*/
|
||||
$IP = "192.168.1.1:8090";
|
||||
$IP = "192.168.42.37:8090";
|
||||
|
||||
/*
|
||||
Exclude encrypted Channels?
|
||||
*/
|
||||
$exclude_encrypted = true;
|
||||
$include_countries = array('Deutschland', 'Österreich', 'Schweiz', 'Großbritannien', 'Korea');
|
||||
|
||||
/*
|
||||
"Allgemein"
|
||||
"Bildung"
|
||||
"Dokus / Reportagen"
|
||||
"Erotik"
|
||||
"HbbTV"
|
||||
"Hinweistafel"
|
||||
"Kinderprogramm"
|
||||
"Kochen / Ernährung"
|
||||
"Kultur"
|
||||
"Lifestyle"
|
||||
"Multimedia"
|
||||
"Musik"
|
||||
"Nachrichten"
|
||||
"Pay per View"
|
||||
"Promotion"
|
||||
"Regional Programm"
|
||||
"Religion"
|
||||
"Shopping"
|
||||
"Spielfilme"
|
||||
"Sport"
|
||||
"Standbilder"
|
||||
"Urlaub / Reisen"
|
||||
"Verschiedenes"
|
||||
"Wirtschaft"
|
||||
|
||||
*/
|
||||
$exclude_categories = array('Religion','Pay per View','Erotik','Hinweistafel','Promotion','Shopping','Standbilder');
|
||||
?>
|
||||
|
|
|
@ -63,7 +63,7 @@ function processTransponder($transponder) {
|
|||
echo "Transponder:\t".$transponder["transponder"]."\n\n";
|
||||
|
||||
$html = explode('"clear: both;"', $html);
|
||||
$re = '/<div class="freq_color_[01]" > <div class="col freqx_1" ><a href="(.*)" title=.*>(.*)<\/a><\/div> <div class="col freqx_2" ><img.*><\/div> <div class="col freqx_2" ><img .*><\/div> <div class="col freqx_2" ><img.*><\/div> <div class="col freqx_3" >(.*)<\/div> <div class="col freqx_4" >(\d*)<\/div> <div class="col freqx_4" >(.*)<\/div> <div class="col freqx_5" >(.*)<\/div> <div class="col freqx_4" >(.*)<\/div> <div class="col freqx_4" >(.*)<\/div> <div class="col2 freqx_6" >.*<\/div>/im';
|
||||
$re = '/<div class="freq_color_[01]" > <div class="col freqx_1" ><a href="(.*)" title=.*>(.*)<\/a><\/div> <div class="col freqx_2" ><img src="(.*)".*><\/div> <div class="col freqx_2" ><img src="(.*)".*><\/div> <div class="col freqx_2" ><img.*alt="(.*)" title.*><\/div> <div class="col freqx_3" >(.*)<\/div> <div class="col freqx_4" >(\d*)<\/div> <div class="col freqx_4" >(.*)<\/div> <div class="col freqx_5" >(.*)<\/div> <div class="col freqx_4" >(.*)<\/div> <div class="col freqx_4" >(.*)<\/div> <div class="col2 freqx_6" >.*<\/div>/im';
|
||||
unset($html[count($html) - 1]);
|
||||
foreach($html as $channel) {
|
||||
if (strpos("freq_color_", $channel) === false) {
|
||||
|
@ -73,7 +73,7 @@ function processTransponder($transponder) {
|
|||
}
|
||||
$channelM = $channelM[0];
|
||||
unset($channelM[0]);
|
||||
$pidsSlice = array_slice($channelM, 4);
|
||||
$pidsSlice = array_slice($channelM, 7);
|
||||
$pids=array();
|
||||
foreach($pidsSlice as $pid) {
|
||||
if (intval($pid) != 0) {
|
||||
|
@ -91,7 +91,10 @@ function processTransponder($transponder) {
|
|||
$channel=array(
|
||||
"link" => $channelM[1],
|
||||
"name" => $channelM[2],
|
||||
"kategorie" => $channelM[3],
|
||||
"hdtv" => !(strpos($channelM[3], "1") === false),
|
||||
"encrypted" => !(strpos($channelM[4], "1") === false),
|
||||
"land" => $channelM[5],
|
||||
"kategorie" => $channelM[6],
|
||||
"transponder" => $transponder,
|
||||
"pids" => $pids,
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue