From: Vincent Date: Wed, 4 Nov 2020 10:07:07 +0000 (+0100) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=3bb0481bcd6d06266396b919756800a8ccf48597;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 534e5a2..abcc2d1 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,8 +3,9 @@ - - + + + @@ -1292,12 +1293,12 @@ - + - + @@ -1328,10 +1329,11 @@ - - + + + diff --git a/config/media.php b/config/media.php index 476cc22..0690f13 100644 --- a/config/media.php +++ b/config/media.php @@ -11,8 +11,7 @@ if ($device == 'salon') { $shortcuts['media'][] = array('type' => 'netflix', 'url' => 'scripts/netflix.php?id=home', 'label' => ''); } if ($device == 'salon' || $device == 'bureau') { - $shortcuts['media'][] = ['label' => 'Nintendo Switch', 'type' => 'harmonyactivity', 'activity' => 'tv']; - $shortcuts['media'][] = ['label' => 'Jeux PC', 'type' => 'ajax', 'url' => '/scripts/pcgames.php']; + $shortcuts['media'][] = ['label' => 'Jeux Videos', 'type' => 'ajax', 'url' => '/scripts/pcgames.php']; $shortcuts['media'][] = ['label' => 'Vidéo web', 'type' => 'raspberrycast']; } diff --git a/config/tv.php b/config/tv.php index 3f6ffbe..d80c457 100644 --- a/config/tv.php +++ b/config/tv.php @@ -17,47 +17,88 @@ if (!$mapdvb) { connectRedis()->igbsetex('dvbchannels', 3600, $mapdvb); } +$replays = [ + 'FranceTV' => ['shield' => 'mycanal:replay:francetv', 'logo' => 'https://www.france.tv/images/francetv-black.svg'], + 'Arte' => ['shield' => 'mycanal:replay:arte', 'logo' => '80204926'], + 'MyTF1' => ['shield' => 'mycanal:replay:mytf1', 'logo' => '3932761'], + 'Toutes les chaînes' => ['shield' => 'mycanal:replay:home'], +]; +$shortcuts['sub-tv-replay'] = array(); +foreach ($replays as $name => $replay) { + if (isset($replay['logo']) && $replay['logo']) { + $url = $replay['logo']; + $style = 'width:80%;margin-top:42%;'; + $ext = null; + if (strpos($url, 'http') !== 0) { + $url = 'http://thumb.canalplus.pro/bddpe/unsafe/' . $replay['logo']; + $style = 'margin-top:12%;'; + $ext = 'webp'; + } + $name = ''; + } + if (isset($replay['shield'])) { + $e = explode(':', $replay['shield'], 2); + if ($name === 'netflix') { + $name = ''; + } + $shortcuts['sub-tv-replay'][] = array('type' => 'shield', 'url' => 'scripts/shield.php?' . $e[0] . '=' . $e[1], 'label' => $name); + } +} + $tv = array( 'Replay' => array('freebox' => 'replay', 'shield' => 'mycanal:replay:home'), 'Netflix' => array('freebox' => 'netflix', 'shield' => 'netflix:home'), 'Infos', - 'France Info' => array('stream' => 'tvheadend:franceinfo:', 'channel' => 27, 'shield' => 'mycanal:live:670'), - 'Cnews' => array('stream' => 'tvheadend:CNEWS', 'channel' => 16, 'shield' => 'mycanal:live:480'), - 'BFM TV' => array('stream' => 'tvheadend:BFM TV', 'channel' => 15, 'shield' => 'mycanal:live:633'), - 'BFM Business' => array('stream' => 'tvheadend:BFM Paris', 'channel' => 347, 'shield' => 'mycanal:live:645'), - 'LCI' => array('stream' => 'tvheadend:LCI', 'channel' => 26, 'shield' => 'mycanal:live:553'), - 'Euronews' => array('stream' => 'fbx:205:sd', 'channel' => 345, 'shield' => 'mycanal:live:324'), + 'France Info' => array('stream' => 'tvheadend:franceinfo:', 'channel' => 27, 'shield' => 'mycanal:live:670', 'logo' => '41072782'), + 'Cnews' => array('stream' => 'tvheadend:CNEWS', 'channel' => 16, 'shield' => 'mycanal:live:480', 'logo' => '64698936'), + 'BFM TV' => array('stream' => 'tvheadend:BFM TV', 'channel' => 15, 'shield' => 'mycanal:live:633', 'logo' => '34766177'), + 'BFM Business' => array('stream' => 'tvheadend:BFM Paris', 'channel' => 347, 'shield' => 'mycanal:live:645', 'logo' => '54239635'), + 'LCI' => array('stream' => 'tvheadend:LCI', 'channel' => 26, 'shield' => 'mycanal:live:553', 'logo' => '66747521'), + 'Euronews' => array('stream' => 'fbx:205:sd', 'channel' => 345, 'shield' => 'mycanal:live:324', 'logo' => '36581437'), 'Généralistes', - 'TF1' => array('stream' => 'tvheadend:TF1', 'channel' => 1, 'shield' => 'mycanal:live:312'), - 'France 2' => array('stream' => 'tvheadend:France 2', 'channel' => 2, 'shield' => 'mycanal:live:26'), - 'France 3' => array('stream' => 'tvheadend:F3 Paris Ile-de-France', 'channel' => 3, 'shield' => 'mycanal:live:543'), - 'France 5' => array('stream' => 'tvheadend:France 5', 'channel' => 5, 'shield' => 'mycanal:live:545'), - 'M6' => array('stream' => 'tvheadend:M6', 'channel' => 6, 'shield' => 'mycanal:live:313'), - 'Canal +' => array('stream' => 'tvheadend:CANAL+', 'channel' => 4, 'shield' => 'mycanal:live:601'), - 'Arte' => array('stream' => 'tvheadend:Arte', 'channel' => 7, 'shield' => 'mycanal:live:154'), - 'C8' => array('stream' => 'tvheadend:C8', 'channel' => 8, 'shield' => 'mycanal:live:450'), - 'W9' => array('stream' => 'tvheadend:W9', 'channel' => 9, 'shield' => 'mycanal:live:296'), - 'TMC' => array('stream' => 'tvheadend:TMC', 'channel' => 10, 'shield' => 'mycanal:live:584'), - 'TFX' => array('stream' => 'tvheadend:TFX', 'channel' => 11, 'shield' => 'mycanal:live:570'), - 'NRJ12' => array('stream' => 'tvheadend:NRJ12', 'channel' => 12, 'shield' => 'mycanal:live:568'), - 'LCP' => array('stream' => 'tvheadend:LCP', 'channel' => 13, 'shield' => 'mycanal:live:554'), - 'France 4' => array('stream' => 'tvheadend:France 4', 'channel' => 14, 'shield' => 'mycanal:live:544'), - 'CStar' => array('stream' => 'tvheadend:CSTAR', 'channel' => 17, 'shield' => 'mycanal:live:513'), - 'Gulli' => array('stream' => 'tvheadend:Gulli', 'channel' => 18, 'shield' => 'mycanal:live:549'), - 'RMC Story' => array('stream' => 'tvheadend:RMC STORY', 'channel' => 23, 'shield' => 'mycanal:live:571'), - 'RMC Découverte' => array('stream' => 'tvheadend:RMC Découverte', 'channel' => 24, 'shield' => 'mycanal:live:595'), - 'Chérie 25' => array('stream' => 'tvheadend:Chérie 25', 'channel' => 25, 'shield' => 'mycanal:live:440'), - 'Paris première' => array('stream' => 'fbx:213:ld', 'channel' => 28, 'shield' => 'mycanal:live:294'), - 'RTL9' => array('stream' => 'fbx:210:ld', 'channel' => 29, 'shield' => 'mycanal:live:505'), - '6ter' => array('stream' => 'tvheadend:6ter', 'channel' => 22, 'shield' => 'mycanal:live:521'), - 'TF1 Séries Films' => array('stream' => 'tvheadend:TF1 Séries Films', 'channel' => 20, 'shield' => 'mycanal:live:526'), + 'TF1' => array('stream' => 'tvheadend:TF1', 'channel' => 1, 'shield' => 'mycanal:live:312', 'logo' => '66746746'), + 'France 2' => array('stream' => 'tvheadend:France 2', 'channel' => 2, 'shield' => 'mycanal:live:26', 'logo' => '67032119'), + 'France 3' => array('stream' => 'tvheadend:France 3', 'channel' => 3, 'shield' => 'mycanal:live:543', 'logo' => '67033022'), + 'France 5' => array('stream' => 'tvheadend:France 5', 'channel' => 5, 'shield' => 'mycanal:live:545', 'logo' => '67033026'), + 'M6' => array('stream' => 'tvheadend:M6', 'channel' => 6, 'shield' => 'mycanal:live:313', 'logo' => '96947147'), + 'Canal +' => array('stream' => 'tvheadend:CANAL+', 'channel' => 4, 'shield' => 'mycanal:live:601', 'logo' => '59320209'), + 'Arte' => array('stream' => 'tvheadend:Arte', 'channel' => 7, 'shield' => 'mycanal:live:154', 'logo' => '3932761'), + 'C8' => array('stream' => 'tvheadend:C8', 'channel' => 8, 'shield' => 'mycanal:live:450', 'logo' => '64698815'), + 'W9' => array('stream' => 'tvheadend:W9', 'channel' => 9, 'shield' => 'mycanal:live:296', 'logo' => '2953125'), + 'TMC' => array('stream' => 'tvheadend:TMC', 'channel' => 10, 'shield' => 'mycanal:live:584', 'logo' => '66747568'), + 'TFX' => array('stream' => 'tvheadend:TFX', 'channel' => 11, 'shield' => 'mycanal:live:570', 'logo' => '66747551'), + 'NRJ12' => array('stream' => 'tvheadend:NRJ12', 'channel' => 12, 'shield' => 'mycanal:live:568', 'logo' => '21549709'), + 'LCP' => array('stream' => 'tvheadend:LCP', 'channel' => 13, 'shield' => 'mycanal:live:554', 'logo' => '94033640'), + 'France 4' => array('stream' => 'tvheadend:France 4', 'channel' => 14, 'shield' => 'mycanal:live:544', 'logo' => '67033024'), + 'CStar' => array('stream' => 'tvheadend:CSTAR', 'channel' => 17, 'shield' => 'mycanal:live:513', 'logo' => '64699011'), + 'Gulli' => array('stream' => 'tvheadend:Gulli', 'channel' => 18, 'shield' => 'mycanal:live:549', 'logo' => '61929315'), + 'RMC Story' => array('stream' => 'tvheadend:RMC STORY', 'channel' => 23, 'shield' => 'mycanal:live:571', 'logo' => '76992469'), + 'RMC Découverte' => array('stream' => 'tvheadend:RMC Découverte', 'channel' => 24, 'shield' => 'mycanal:live:595', 'logo' => '64959411'), + 'Chérie 25' => array('stream' => 'tvheadend:Chérie 25', 'channel' => 25, 'shield' => 'mycanal:live:440', 'logo' => '2953383'), + 'Paris première' => array('stream' => 'fbx:213:ld', 'channel' => 28, 'shield' => 'mycanal:live:294', 'logo' => '2953121'), + 'RTL9' => array('stream' => 'fbx:210:ld', 'channel' => 29, 'shield' => 'mycanal:live:505', 'logo' => '24419688'), + 'TV Breizh' => array('shield' => 'mycanal:live:586', 'logo' => '93561480'), + '6ter' => array('stream' => 'tvheadend:6ter', 'channel' => 22, 'shield' => 'mycanal:live:521', 'logo' => '16598429'), + 'TF1 Séries Films' => array('stream' => 'tvheadend:TF1 Séries Films', 'channel' => 20, 'shield' => 'mycanal:live:526', 'logo' => '66747478'), 'Monde', - 'TV5 Monde' => array('stream' => 'fbx:206:sd', 'channel' => 1, 'shield' => 'mycanal:live:520'), - 'France 24' => array('stream' => 'tvheadend:France 24', 'channel' => 340, 'shield' => 'mycanal:live:310'), + 'TV5 Monde' => array('stream' => 'fbx:206:sd', 'channel' => 1, 'shield' => 'mycanal:live:520', 'logo' => '14279265'), + 'France 24' => array('stream' => 'tvheadend:France 24', 'channel' => 340, 'shield' => 'mycanal:live:310', 'logo' => '18810794'), + 'BBC World News' => array('shield' => 'mycanal:live:589', 'logo' => '27443835'), + 'CNN' => array('shield' => 'mycanal:live:30', 'logo' => '13455768'), ); $shortcuts['sub-tv'] = array(); $tvplayer = config('TVPLAYER'); foreach ($tv as $name => $service) { + if ($name === 'Replay' && $tvplayer === 'shield') { + $shortcuts['sub-tv'][] = ['label' => $name, 'type' => 'sub', 'sub' => 'tv-replay']; + continue; + } + + if (isset($service['logo']) && $service['logo']) { + $name = ''; + } elseif ($name === 'Netflix') { + $name = ''; + } if (is_numeric($name)) { $shortcuts['sub-tv'][] = array('type' => 'separator', 'label' => $service); @@ -76,7 +117,7 @@ foreach ($tv as $name => $service) { } else { $shortcuts['sub-tv'][] = array('type' => 'freebox', 'url' => 'scripts/freeboxchannel.php?channel=' . $service['freebox'], 'label' => $name); } - } else if(isset($service['stream'])) { + } else if (isset($service['stream'])) { $e = explode(':', $service['stream'], 3); $protocol = $e[0]; $id = $e[1]; diff --git a/scripts/lib/cachemedia.php b/scripts/lib/cachemedia.php index a9aa90f..1a69166 100644 --- a/scripts/lib/cachemedia.php +++ b/scripts/lib/cachemedia.php @@ -1,8 +1,10 @@