]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Fri, 3 Jan 2020 08:43:10 +0000 (09:43 +0100)
committerVincent <vincent@enhydra.fr>
Fri, 3 Jan 2020 08:43:10 +0000 (09:43 +0100)
.idea/workspace.xml
scripts/lib/lib.php
scripts/lib/mediarasp.php
scripts/lib/off.php
scripts/lib/raspberrycast.php [deleted file]
scripts/lib/remoteinfos.php
scripts/raspberrycast.php [deleted file]

index 30ed578af70efff0d2179963e85b4f585be404a0..900e3fa9471648a8902f6d7f56f9d6abf446e505 100644 (file)
@@ -3,10 +3,12 @@
   <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$/gradient.php" beforeDir="false" afterPath="$PROJECT_DIR$/gradient.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/gradient.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/gradient.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/mediarasp.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/mediarasp.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/youtubedl-download.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/youtubedl-download.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/off.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/off.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/raspberrycast.php" beforeDir="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/raspberrycast.php" beforeDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1577378088885" duration="2201000" />
       <workItem from="1577380387468" duration="866000" />
       <workItem from="1577785483253" duration="3506000" />
-      <workItem from="1577891426611" duration="5672000" />
-    </task>
-    <task id="LOCAL-00215" summary=".">
-      <created>1566808495062</created>
-      <option name="number" value="00215" />
-      <option name="presentableId" value="LOCAL-00215" />
-      <option name="project" value="LOCAL" />
-      <updated>1566808495062</updated>
+      <workItem from="1577891426611" duration="6029000" />
     </task>
     <task id="LOCAL-00216" summary=".">
       <created>1566888335894</created>
       <option name="project" value="LOCAL" />
       <updated>1578039845044</updated>
     </task>
-    <option name="localTasksCounter" value="264" />
+    <task id="LOCAL-00264" summary=".">
+      <created>1578040654852</created>
+      <option name="number" value="00264" />
+      <option name="presentableId" value="LOCAL-00264" />
+      <option name="project" value="LOCAL" />
+      <updated>1578040654852</updated>
+    </task>
+    <option name="localTasksCounter" value="265" />
     <servers />
   </component>
   <component name="TodoView">
     </state>
     <state x="720" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577298128269" />
     <state x="960" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1576479992407" />
-    <state x="935" y="114" key="CommitChangelistDialog2" timestamp="1578039839316">
+    <state x="935" y="114" key="CommitChangelistDialog2" timestamp="1578040649872">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="701" y="114" key="CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040" timestamp="1577381105204" />
     <state x="701" y="127" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1575647157027" />
-    <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1578039839316" />
+    <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1578040649872" />
     <state x="1114" y="443" key="NewPhpFileDialog" timestamp="1578038647334">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="732" y="343" key="com.intellij.ide.util.TipDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577380394903" />
     <state x="732" y="383" key="com.intellij.ide.util.TipDialog/0.0.1920.1160@0.0.1920.1160" timestamp="1575647093028" />
     <state x="976" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1577891427221" />
-    <state x="976" y="257" width="607" height="536" key="find.popup" timestamp="1578040021331">
+    <state x="976" y="257" width="607" height="536" key="find.popup" timestamp="1578040823081">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="732" y="257" width="607" height="536" key="find.popup/0.0.1920.1040@0.0.1920.1040" timestamp="1577380471547" />
-    <state x="976" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1578040021331" />
+    <state x="976" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1578040823081" />
   </component>
   <component name="antWorkspaceConfiguration">
     <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
index e994e1d0e7d214b9b2fe9ed11d94d223be779e08..4124b95e89cb0109a5be8a055be31df6c21389ce 100644 (file)
@@ -28,7 +28,6 @@ require_once ROOT . '/scripts/lib/db.php';
 require_once ROOT . '/scripts/lib/ecomode.php';
 require_once ROOT . '/scripts/lib/off.php';
 require_once ROOT . '/scripts/lib/ir.php';
-require_once ROOT . '/scripts/lib/raspberrycast.php';
 require_once ROOT . '/scripts/lib/playing.php';
 require_once ROOT . '/scripts/lib/bricks.php';
 require_once ROOT . '/scripts/lib/youtubedl.php';
@@ -425,8 +424,6 @@ function volume($volume, $increase = '')
         if ($p == 'squeezebox') {
             $d = 'SqueezeboxPlayer';
             $player = config('SQUEEZEBOX_PLAYER');
-        } elseif ($p == 'raspberrycast') {
-            $d = 'RaspberryCast';
         } elseif ($p == 'mediarasp') {
             $d = 'VLC';
         }
@@ -447,8 +444,6 @@ function volume($volume, $increase = '')
             } else {
                 return harmonyRequest('commands/volume-up', 'POST');
             }
-        case 'RaspberryCast':
-            return raspberryCast('sound?vol=' . ($increase == '-' ? 'less' : 'more'));
         case 'VLC':
             return VLCCmd(['command' => 'volume', 'val' => $increase . '20'], $device);
     }
index b296a9e594f71fa72338470b603afea00ce29942..d3df1dc1476ae089d96ca6b461774b1f1ccdf550 100644 (file)
@@ -219,21 +219,6 @@ function remoteCmdMedia($cmd, $device = null, $playing = null)
         echo $res;
     }
 
-    $mapRaspberryCast = ['p' => ['url' => 'video', 'data' => ['control' => 'pause']],
-        'q' => ['url' => 'video', 'data' => ['control' => 'stop']],
-        'left' => ['url' => 'video', 'data' => ['control' => 'left']],
-        'right' => ['url' => 'video', 'data' => ['control' => 'right']],
-        '+' => ['url' => 'sound', 'data' => ['vol' => 'more']],
-        '-' => ['url' => 'sound', 'data' => ['vol' => 'less']],
-    ];
-
-    if (null === $playing || $playing == 'raspberrycast') {
-        if (isset($mapRaspberryCast[$key])) {
-            $m = $mapRaspberryCast[$key];
-            raspberryCast($m['url'], $device, $m['data']);
-        }
-    }
-
     return true;
 }
 
@@ -285,12 +270,6 @@ function mediaRaspPlayMovie($movie, $device = null)
         }
     }
 
-    try {
-        raspberryCast('video', $device, ['control' => 'stop']);
-    } catch (Exception $e) {
-
-    }
-
     addSeen($movie);
     $res = VLCPlay($movie, $device);
     mediaRaspPostPlay($device);
index e76f302a4c2f60fd78c4c425f0bf4dfe51863caf..77418d04932a9a090932787150d0ce966e22f800 100644 (file)
@@ -18,7 +18,6 @@ function off($device = null)
 function commonOff($device)
 {
     remoteCmdMedia('stop', $device);
-    raspberryCast('video', $device, ['control' => 'stop']);
     squeezeRequest('stop');
 }
 
diff --git a/scripts/lib/raspberrycast.php b/scripts/lib/raspberrycast.php
deleted file mode 100644 (file)
index 66ba643..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-function raspberryCast($command, $device = null, $data = [])
-{
-       global $devices;
-       if (null === $device) {
-               $device = config('DEVICE');
-       }
-       $d = $devices[$device];
-
-       $client = getRaspberryCastClient();
-       try {
-               $response = $client->get('http://' . $d['host'] . ':2020/' . $command, [
-                       'query' => $data
-               ]);
-       }catch (Exception $e) {
-               print_r($e);
-               return null;
-       }
-       return $response;
-}
-
-function getRaspberryCastClient()
-{
-       global $raspberrycastclient;
-       if ($raspberrycastclient == null) {
-               $raspberrycastclient = getHttpClient();
-       }
-       return $raspberrycastclient;
-}
\ No newline at end of file
index 7bf02a88be493f02339eb2824d2cd7f7ec818a4d..b9a290cdaefcdae6be0f26f54e1f255036a00ff5 100644 (file)
@@ -8,8 +8,6 @@ function remoteInfos()
         $res = squeezeboxRemoteInfos();
     } else if ($p == 'mediarasp') {
         $res = mediaraspRemoteInfos();
-    } else if ($p == 'raspberrycast') {
-        $res = raspberrycastRemoteInfos($e[1]);
     } else {
         $res = ['type' => $p, 'can_seek' => false];
     }
@@ -36,24 +34,9 @@ function remoteProgress($progress)
         return squeezeboxRemoteProgress($progress);
     } else if ($p == 'mediarasp') {
         return mediaraspRemoteProgress($progress);
-    } else if ($p == 'raspberrycast') {
-        return raspberryCastRemoteProgress($progress);
     }
 }
 
-function raspberrycastRemoteInfos($url)
-{
-    $meta = getYoutubeDLMeta($url);
-    $res = ['type' => 'raspberrycast',
-        'can_seek' => false,
-        'duration' => $meta['duration'],
-        'title' => $meta['title'],
-        'artwork' => $meta['thumbnail'],
-        'time' => ''];
-
-    return $res;
-}
-
 function mediaraspRemoteInfos()
 {
     global $directories;
diff --git a/scripts/raspberrycast.php b/scripts/raspberrycast.php
deleted file mode 100644 (file)
index 47072c8..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-require_once "import.php";
-
-if ($_GET['action'] == 'init') {
-       setPlaying('raspberrycast:' . $_GET['url'], $_GET['device']);
-       execScene($_GET['device'] . '/media/play');
-       VLCCmd(['command' => 'pl_stop'], $_GET['device']);
-       stopSqueezebox($_GET['device']);
-}
\ No newline at end of file