]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Mon, 2 Nov 2020 08:51:56 +0000 (09:51 +0100)
committerVincent <vincent@enhydra.fr>
Mon, 2 Nov 2020 08:51:56 +0000 (09:51 +0100)
.idea/workspace.xml
config/remote.php
scripts/lib/lib.php
scripts/lib/remoteinfos.php
scripts/lib/shield.php

index 37ab502c94639116a5981ebd63bc2c5cc391aea8..f5d705b461068ee2c48201c68b20eca790b76182 100644 (file)
@@ -3,14 +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$/config/bureau.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/bureau.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/media.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/media.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/config/remote.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/remote.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/salon.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/salon.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/tv.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/tv.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/js/home.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/home.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/mediarasp.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/mediarasp.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/lib.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/lib.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/remoteinfos.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/remoteinfos.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" />
       <workItem from="1603811262372" duration="1988000" />
       <workItem from="1603958541180" duration="5032000" />
       <workItem from="1604042543878" duration="11137000" />
-      <workItem from="1604152329376" duration="39185000" />
-    </task>
-    <task id="LOCAL-00314" summary=".">
-      <created>1584002002804</created>
-      <option name="number" value="00314" />
-      <option name="presentableId" value="LOCAL-00314" />
-      <option name="project" value="LOCAL" />
-      <updated>1584002002805</updated>
+      <workItem from="1604152329376" duration="41433000" />
     </task>
     <task id="LOCAL-00315" summary=".">
       <created>1584344076927</created>
       <option name="project" value="LOCAL" />
       <updated>1604253174045</updated>
     </task>
-    <option name="localTasksCounter" value="363" />
+    <task id="LOCAL-00363" summary=".">
+      <created>1604304768803</created>
+      <option name="number" value="00363" />
+      <option name="presentableId" value="LOCAL-00363" />
+      <option name="project" value="LOCAL" />
+      <updated>1604304768803</updated>
+    </task>
+    <option name="localTasksCounter" value="364" />
     <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="1604253167008">
+    <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1604304758533">
       <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="1604253167008" />
+    <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1604304758533" />
     <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 a2e0adbecb733c818f56bbf2b3fdf6e9001cf638..173414a36f413c5a5e9a5ce2a41b138ef8d748a3 100644 (file)
@@ -37,12 +37,12 @@ $bricksShield = ['type' => 'shield', 'width' => 4, 'height' => 4, 'bricks' => [
     ['type' => 'remote-shield-ok', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 2],
 ]];
 
-$bricksShieldMedia = ['type' => 'shieldMedia', 'width' => 5, 'height' => 4, 'bricks' => [
+$bricksShieldMedia = ['type' => 'shieldmedia', 'width' => 5, 'height' => 4, 'bricks' => [
     ['type' => 'remote-volume', 'width' => 1, 'height' => 3, 'top' => 1, 'left' => 0],
     ['type' => 'remote-rew', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 0],
-    ['type' => 'remote-playpause', 'width' => 2, 'height' => 1, 'top' => 0, 'left' => 1],
+    ['type' => 'remote-playpause', 'width' => 3, 'height' => 1, 'top' => 0, 'left' => 1],
     ['type' => 'remote-light-down', 'width' => 1, 'height' => 1, 'top' => 1, 'left' => 3],
-    ['type' => 'remote-fwd', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 3],
+    ['type' => 'remote-fwd', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 4],
     ['type' => 'remote-up', 'width' => 1, 'height' => 1, 'top' => 1, 'left' => 2],
     ['type' => 'remote-left', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 1],
     ['type' => 'remote-down', 'width' => 1, 'height' => 1, 'top' => 3, 'left' => 2],
@@ -51,6 +51,7 @@ $bricksShieldMedia = ['type' => 'shieldMedia', 'width' => 5, 'height' => 4, 'bri
     ['type' => 'remote-shield-menu', 'width' => 1, 'height' => 1, 'top' => 1 + 2, 'left' => 1],
     ['type' => 'remote-shield-home', 'width' => 1, 'height' => 1, 'top' => 1 + 2, 'left' => 1 + 2],
     ['type' => 'remote-shield-ok', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 2],
+    ['type' => 'remote-subtitles', 'width' => 1, 'height' => 3, 'top' => 1, 'left' => 4],
 ]];
 
 
@@ -108,4 +109,5 @@ $shortcuts['remote-raspberrycast'] = [['type' => 'bricks', 'bricks' => $bricksRa
 $shortcuts['remote-mediarasp'] = [['type' => 'bricks', 'bricks' => $bricksMediarasp]];
 $shortcuts['remote-freebox'] = [['type' => 'bricks', 'bricks' => $bricksFreebox]];
 $shortcuts['remote-omxtv'] = [['type' => 'bricks', 'bricks' => $bricksOMXRaspTV]];
-$shortcuts['remote-shield'] = [['type' => 'bricks', 'bricks' => $bricksShield]];
\ No newline at end of file
+$shortcuts['remote-shield'] = [['type' => 'bricks', 'bricks' => $bricksShield]];
+$shortcuts['remote-shieldmedia'] = [['type' => 'bricks', 'bricks' => $bricksShieldMedia]];
\ No newline at end of file
index aa6b2d633abefe30000884f780385f403ea1bad0..1f3477def60ebd7c396e9473a0ec9b036df9c73e 100644 (file)
@@ -427,22 +427,29 @@ function volume($volume, $increase = '')
         $device = $e[1];
         $d = $e[0];
     }
+    $d = mb_strtolower($d);
 
     switch ($d) {
-        case 'Raspberry':
-        case 'RaspberryPi':
+        case 'shield':
+            if ($increase == '-') {
+                shieldKey('volume-down');
+            } else {
+                shieldKey('volume-up');
+            }
+        case 'raspberry':
+        case 'raspberrypi':
             $cmd = 'amixer -c 0 -M -- sset PCM playback ' . round(max(0, min(100, $volume))) . '%' . $increase;
             return sshCommand($cmd, $device);
-        case 'SqueezeboxPlayer':
-        case 'Squeezebox':
+        case 'squeezeboplayer':
+        case 'squeezebox':
             return squeezeVolume($volume, $increase, config('SQUEEZEBOX_PLAYER'));
-        case 'Harmony':
+        case 'harmony':
             if ($increase == '-') {
                 return harmonyRequest('commands/volume-down', 'POST');
             } else {
                 return harmonyRequest('commands/volume-up', 'POST');
             }
-        case 'VLC':
+        case 'vlc':
             return VLCCmd(['command' => 'volume', 'val' => $increase . '20'], $device);
     }
 }
index 195ae1420583c3470679b85a1639f1cd3352bf40..829c73a4d647ca433f45f0c90086e625ebcef0ea 100644 (file)
@@ -12,7 +12,7 @@ function remoteInfos()
         }else {
             if ($p == 'mediarasp') {
                 if(config('VIDEOPLAYER')==='shield'){
-                    $res = ['type' => 'shield', 'can_seek' => false];
+                    $res = ['type' => 'shieldmedia', 'can_seek' => false];
                 }else {
                     $res = mediaraspRemoteInfos();
                 }
index 49bc2c586cc01751ff8fb25d8bef1c1e1eeb0606..fe423af4a9f6b15ebbd41ff86173eb65ee2868c5 100644 (file)
@@ -55,6 +55,13 @@ function shieldKey($keys, $device = true)
         'volume-up' => 'KEYCODE_VOLUME_UP',
         'volume-down' => 'KEYCODE_VOLUME_DOWN',
         'volume-mute' => 'KEYCODE_VOLUME_MUTE',
+        'subtitles-toggle' => 'KEYCODE_T',
+        'subtitles-stream-next' => 'KEYCODE_Y',
+        'subtitles-increase-delay' => 'KEYCODE_U',
+        //'subtitles-increase-delay-long' => 'subtitles-increase-delay-long',
+        'subtitles-decrease-delay' => 'KEYCODE_I',
+        //'subtitles-decrease-delay-long' => 'subtitles-decrease-delay-long',
+        'audio-track-next' => 'KEYCODE_A',
     ];
     if (!is_array($keys)) {
         $keys = [$keys];
@@ -89,6 +96,9 @@ function shieldNetflix($id = null, $device = null)
     if ($id === 'home') {
         sleep(6);
         shieldKey(['ok', 'down']);
+    } else {
+        sleep(1);
+        shieldKey(['ok']);
     }
 }