From: Vincent Date: Tue, 3 Nov 2020 07:05:56 +0000 (+0100) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=70146771b73ae8f555afb8631958dfd81a238b56;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a07ea15..8d03771 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,7 +3,9 @@ - + + + @@ -1279,10 +1282,10 @@ - + - + diff --git a/config/tv.php b/config/tv.php index 9fdb0b7..3f6ffbe 100644 --- a/config/tv.php +++ b/config/tv.php @@ -76,7 +76,7 @@ foreach ($tv as $name => $service) { } else { $shortcuts['sub-tv'][] = array('type' => 'freebox', 'url' => 'scripts/freeboxchannel.php?channel=' . $service['freebox'], 'label' => $name); } - } else { + } else if(isset($service['stream'])) { $e = explode(':', $service['stream'], 3); $protocol = $e[0]; $id = $e[1]; diff --git a/scripts/lib/harmony.php b/scripts/lib/harmony.php index b2d8f00..ef03b7b 100644 --- a/scripts/lib/harmony.php +++ b/scripts/lib/harmony.php @@ -43,14 +43,11 @@ function harmonyActivity($activity) if ($activity !== 'off' && $activity !== 'poweroff') { ecoMode('0'); } - if ($activity == 'tv') { - execScene('salon/freebox/on'); - } $res = harmonyRequest('activities/' . $activity, 'POST'); if ($wait > 0) { sleep($wait); } - if ($activity == 'tv' || $activity == 'media') { + if ($activity == 'tv' || $activity == 'media' || $activity == 'shield') { runAtEnd('sleep(5);harmonyDeviceCommand(\'videoprojecteur-epson\', \'power-on\');'); } return $res; diff --git a/scripts/lib/shield.php b/scripts/lib/shield.php index fe423af..3f43945 100644 --- a/scripts/lib/shield.php +++ b/scripts/lib/shield.php @@ -82,6 +82,11 @@ function shieldNetflix($id = null, $device = null) shieldHome(); sleep(1); + $device=getDevice($device); + if($device==='salon'){ + harmonyActivity('shield'); + } + $url = 'http://www.netflix.com/'; if (null !== $id && $id !== 'home') { $url .= 'watch/' . $id; @@ -140,7 +145,6 @@ function shieldLaunchApp($activity) function shieldMyCanal($channel = false, $type = 'live', $device = null) { - setPlaying('mycanal', $device); if ($type === 'replay') { if ($channel === 'arte') { return shieldArte(); @@ -152,16 +156,23 @@ function shieldMyCanal($channel = false, $type = 'live', $device = null) $url += $channel; } } else if ($type === 'live') { - $url = 'https://www.canalplus.com/live/?channel=' . $channel; } + $device=getDevice($device); + if($device==='salon'){ + harmonyActivity('shield'); + } setPlaying('mycanal', $device); _adb('shell am start', '-a android.intent.action.VIEW -f 0x10808000 -d ' . $url . ' com.canal.android.canal/com.canal.app.common.legacy.DeepLinkActivity'); } -function shieldKodi($file) +function shieldKodi($file,$device=null) { shieldHome(); + $device=getDevice($device); + if($device==='salon'){ + harmonyActivity('shield'); + } _adb('shell am start', '-a android.intent.action.VIEW -d \'"' . shieldNormalizeURL($file) . '"\' -n org.xbmc.kodi/.Splash'); }