]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Tue, 3 Nov 2020 07:05:56 +0000 (08:05 +0100)
committerVincent <vincent@enhydra.fr>
Tue, 3 Nov 2020 07:05:56 +0000 (08:05 +0100)
.idea/workspace.xml
config/tv.php
scripts/lib/harmony.php
scripts/lib/shield.php

index a07ea15f940831a6daac9e14feb5916379b221ca..8d0377124f9165692ed699727bf3a320a3e96d86 100644 (file)
@@ -3,7 +3,9 @@
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/domoticz_device_event.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/domoticz_device_event.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/tv.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/tv.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/harmony.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/harmony.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/shield.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/shield.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1603811262372" duration="1988000" />
       <workItem from="1603958541180" duration="5032000" />
       <workItem from="1604042543878" duration="11137000" />
-      <workItem from="1604152329376" duration="42004000" />
-    </task>
-    <task id="LOCAL-00316" summary=".">
-      <created>1584361013567</created>
-      <option name="number" value="00316" />
-      <option name="presentableId" value="LOCAL-00316" />
-      <option name="project" value="LOCAL" />
-      <updated>1584361013567</updated>
+      <workItem from="1604152329376" duration="42646000" />
+      <workItem from="1604347943058" duration="1403000" />
     </task>
     <task id="LOCAL-00317" summary=".">
       <created>1585553503259</created>
       <option name="project" value="LOCAL" />
       <updated>1604307121401</updated>
     </task>
-    <option name="localTasksCounter" value="365" />
+    <task id="LOCAL-00365" summary=".">
+      <created>1604307642081</created>
+      <option name="number" value="00365" />
+      <option name="presentableId" value="LOCAL-00365" />
+      <option name="project" value="LOCAL" />
+      <updated>1604307642081</updated>
+    </task>
+    <option name="localTasksCounter" value="366" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
       <screen x="0" y="0" width="1707" height="920" />
     </state>
     <state x="740" y="229" key="#com.jetbrains.php.refactoring.extractMethod.PhpExtractMethodDialog#function0/0.0.1707.920@0.0.1707.920" timestamp="1604146905948" />
-    <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1604307094414">
+    <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1604307637401">
       <screen x="0" y="0" width="1707" height="920" />
     </state>
-    <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1604307094414" />
+    <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1604307637401" />
     <state x="701" y="75" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1602171117745" />
     <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1603961854066" />
     <state x="635" y="216" key="FileChooserDialogImpl" timestamp="1604227698339">
index 9fdb0b73c4187acb7a7e0e794e0e448d44ab8af4..3f6ffbefaa6cb4396d0cd7000ed32ead594b80c5 100644 (file)
@@ -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];
index b2d8f00913c7825cbdba70d210130189bc213e12..ef03b7bdd9cba1bed14e6fd5dddd36a457f4995b 100644 (file)
@@ -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;
index fe423af4a9f6b15ebbd41ff86173eb65ee2868c5..3f4394553729c99dc1588d6ff2532a1d52dd6ccd 100644 (file)
@@ -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');
 }