]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Fri, 23 Aug 2019 23:40:09 +0000 (01:40 +0200)
committerVincent <vincent@enhydra.fr>
Fri, 23 Aug 2019 23:40:09 +0000 (01:40 +0200)
.idea/workspace.xml
index.php
scripts/lib/scenes.php
scripts/lib/squeezebox.php

index 397d972a69ee0ed5c769e84ec5a5c92553587317..806509244f09e66b30f8a2525d9b76c2d1edde22 100644 (file)
@@ -3,9 +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/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/tmdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/tmdb.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/sections.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/sections.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/index.php" beforeDir="false" afterPath="$PROJECT_DIR$/index.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/squeezebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/squeezebox.php" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
       <workItem from="1566376145799" duration="4963000" />
       <workItem from="1566402117063" duration="1534000" />
       <workItem from="1566458804773" duration="6134000" />
-      <workItem from="1566546848697" duration="3684000" />
-    </task>
-    <task id="LOCAL-00163" summary=".">
-      <created>1551088282322</created>
-      <option name="number" value="00163" />
-      <option name="presentableId" value="LOCAL-00163" />
-      <option name="project" value="LOCAL" />
-      <updated>1551088282322</updated>
+      <workItem from="1566546848697" duration="3695000" />
+      <workItem from="1566602835458" duration="736000" />
     </task>
     <task id="LOCAL-00164" summary=".">
       <created>1551125943544</created>
       <option name="project" value="LOCAL" />
       <updated>1566548210701</updated>
     </task>
-    <option name="localTasksCounter" value="212" />
+    <task id="LOCAL-00212" summary=".">
+      <created>1566551436129</created>
+      <option name="number" value="00212" />
+      <option name="presentableId" value="LOCAL-00212" />
+      <option name="project" value="LOCAL" />
+      <updated>1566551436129</updated>
+    </task>
+    <option name="localTasksCounter" value="213" />
     <servers />
   </component>
   <component name="TodoView">
index 2fc4769cbafd038a580106932be186778d12c0c8..c03df47e98f9dc2c591c90cad132d60feebceb6d 100644 (file)
--- a/index.php
+++ b/index.php
@@ -8,8 +8,10 @@ require_once "scripts/import.php";
 init();
 profile('init index', __FILE__, __LINE__);
 
-$raspberry = $_SERVER['HTTP_USER_AGENT'] == 'Tortuga Raspberry';
-$android = !!stristr($_SERVER['HTTP_USER_AGENT'], 'android');
+$ua = $_SERVER['HTTP_USER_AGENT'] ?? 'CLI';
+
+$raspberry = $ua == 'Tortuga Raspberry';
+$android = !!stristr($ua, 'android');
 
 function relativePath($p)
 {
index 0b9e89344bded5cdd2bcb5b647b5f6c8015258f9..070c1f960f20803ead46b3db1c4eacfddd655545 100644 (file)
@@ -736,7 +736,9 @@ function killCheminee($room)
 {
     // Kill current animation
     $kill = "/bin/kill $(ps aux | grep '[c]heminee_running/" . $room . "' | awk '{print $2}')";
-    return `$kill`;
+    $res = `$kill`;
+    echo 'Kill cheminĂ©e ' . $room . ' :: ' . $res;
+    return $res;
 }
 
 function chemineeLight($lightId, $room, $program = 'fire', $brightness = 1)
index 537fe7141b16c5932bae853fe9101f51c4b21d39..83273dce59758cea279af6eebb66a192fa1e2fb9 100644 (file)
@@ -29,7 +29,7 @@ function stopSqueezebox($player)
     }
 }
 
-function squeezeRequest($params, $player)
+function squeezeRequest($params, $player = '')
 {
     $redis = connectRedis();
     $queue_name = 'squeezebox_queue';