]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Mon, 17 Feb 2020 10:13:33 +0000 (11:13 +0100)
committerVincent <vincent@enhydra.fr>
Mon, 17 Feb 2020 10:13:33 +0000 (11:13 +0100)
.idea/workspace.xml
scripts/lib/ecomode.php
scripts/lib/medialibrary.php
scripts/lib/mediarasp.php
scripts/lib/scenes.php

index 8f44d1767e015e6f75d35a4fdddbdc095ae607f3..635fba0f390f31eaae74fb9f4b5532537a56372c 100644 (file)
@@ -3,7 +3,10 @@
   <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/ecomode.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/ecomode.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/medialibrary.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/medialibrary.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/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1581367617869" duration="13144000" />
       <workItem from="1581444247533" duration="1843000" />
       <workItem from="1581497023317" duration="687000" />
-      <workItem from="1581498312758" duration="629000" />
-    </task>
-    <task id="LOCAL-00249" summary=".">
-      <created>1574967000583</created>
-      <option name="number" value="00249" />
-      <option name="presentableId" value="LOCAL-00249" />
-      <option name="project" value="LOCAL" />
-      <updated>1574967000583</updated>
+      <workItem from="1581498312758" duration="1364000" />
+      <workItem from="1581536987017" duration="2548000" />
+      <workItem from="1581869390232" duration="1823000" />
+      <workItem from="1581934013298" duration="383000" />
     </task>
     <task id="LOCAL-00250" summary=".">
       <created>1575617712737</created>
       <option name="project" value="LOCAL" />
       <updated>1581497112479</updated>
     </task>
-    <option name="localTasksCounter" value="298" />
+    <task id="LOCAL-00298" summary=".">
+      <created>1581499773377</created>
+      <option name="number" value="00298" />
+      <option name="presentableId" value="LOCAL-00298" />
+      <option name="project" value="LOCAL" />
+      <updated>1581499773377</updated>
+    </task>
+    <option name="localTasksCounter" value="299" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="872" y="242" key="Vcs.Push.Dialog.v2/0.0.2560.1040@0.0.2560.1040" timestamp="1580377827629" />
-    <state x="976" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1581498312890">
+    <state x="976" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1581934020071">
       <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="1581444247619" />
-    <state x="976" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1581498312890" />
+    <state x="976" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1581934020071" />
     <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1581412193715">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
index 3836064b928ec37bfd7c3b6539834b089252222a..14a8ca5f17850e7daeab5d7815a3773dfeb1640e 100644 (file)
@@ -30,6 +30,11 @@ function nightmode($mode)
     setState('night', (!!$mode) ? '1' : '0');
 }
 
+function getNightMode()
+{
+    return getState('night') == '1';
+}
+
 function getEcoMode()
 {
     $res = getState('ecomode');
index 6f20fb8baf23371ec69062466a8dcf1dbd3c17ff..e7bfc0b1540ee96b329b4d48cf278236f0b7216f 100644 (file)
@@ -134,15 +134,17 @@ function transcodeOneVideo()
         /** @var SplFileInfo $item */
         $path = $item->getRealPath();
         $to = preg_replace('/\.' . $item->getExtension() . '$/', '.x264.' . $item->getExtension(), $path);
-        if (file_exists($to) && videosHaveSameDuration($path, $to)) {
+        if (file_exists($to) && filesize($to) > 0 && videosHaveSameDuration($path, $to)) {
             continue;
         }
 
         set_time_limit(0);
         ignore_user_abort(true);
 
-        wakeupPC('avion');
-        sleep(5);
+        if (!getNightMode()) {
+            wakeupPC('avion');
+            sleep(15);
+        }
 
         $cmd = 'C:\Scripts\convertvideo.bat "' . nasToAvion($item) . '" "' . nasToAvion($to) . '" ' . $item->getExtension() . ' ' . getVideoCodec($path);
         print_r(sshCommand($cmd, 'avion'));
index 5bcb3761d230281b9fce1e89466204159970bcb3..fa0c5bc07040879f79dc85a279e2768109dc9b34 100644 (file)
@@ -294,7 +294,7 @@ function addSeen($movie)
 
     $cacheFile = ROOT . '/cache/seen.json';
     if (!count($seen)) {
-        $seen = json_decode(file_get_contents($cacheFile));
+        $seen = json_decode(file_get_contents($cacheFile),true);
     }
 
     $seen[str_replace('/nas/', '/volume1/Share/', $movie)] = true;
index cb1eb4914221b16d4486a80b22a8b01d88e62917..6bff83522bd52d163dd28dd02e5c798b50e1838c 100644 (file)
@@ -37,10 +37,10 @@ $scenes = [
         ['type' => 'ifttt', 'event' => 'coffee_on'],
     ],
     'chambre/deshumidificateur/on' => [
-        ['type' => 'domoticz', 'device' => '1062', 'command' => true, 'priority' => true],
+        ['type' => 'domoticz', 'device' => '1062', 'command' => true],
     ],
     'chambre/deshumidificateur/off' => [
-        ['type' => 'domoticz', 'device' => '1062', 'command' => false, 'priority' => true],
+        ['type' => 'domoticz', 'device' => '1062', 'command' => false],
     ],
     'chambre/raspberry/on' => [
         ['type' => 'insteon', 'command' => '0?1138=I=0=0'],