]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Sun, 20 Oct 2019 19:00:30 +0000 (21:00 +0200)
committerVincent <vincent@enhydra.fr>
Sun, 20 Oct 2019 19:00:30 +0000 (21:00 +0200)
.idea/workspace.xml
scripts/lib/mediarasp.php
scripts/lib/tmdb.php
scripts/remotecmd.php
scripts/tmdb.php

index 63636066070b45616dd26aa429ca7dbfa52d7f18..177de903613f97f4ac346a0d2ddce0e2f2d1dbe2 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/pcgames.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/pcgames.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/tmdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/tmdb.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/remotecmd.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/remotecmd.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/tmdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/tmdb.php" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
       <workItem from="1571379187683" duration="3078000" />
       <workItem from="1571384814081" duration="5000" />
       <workItem from="1571569117453" duration="4627000" />
-      <workItem from="1571594532253" duration="924000" />
-    </task>
-    <task id="LOCAL-00188" summary=".">
-      <created>1562433498333</created>
-      <option name="number" value="00188" />
-      <option name="presentableId" value="LOCAL-00188" />
-      <option name="project" value="LOCAL" />
-      <updated>1562433498333</updated>
+      <workItem from="1571594532253" duration="3323000" />
     </task>
     <task id="LOCAL-00189" summary=".">
       <created>1562436226860</created>
       <option name="project" value="LOCAL" />
       <updated>1571574019435</updated>
     </task>
-    <option name="localTasksCounter" value="237" />
+    <task id="LOCAL-00237" summary=".">
+      <created>1571595588959</created>
+      <option name="number" value="00237" />
+      <option name="presentableId" value="LOCAL-00237" />
+      <option name="project" value="LOCAL" />
+      <updated>1571595588959</updated>
+    </task>
+    <option name="localTasksCounter" value="238" />
     <servers />
   </component>
   <component name="TodoView">
index ae2365ab4f91a34f4a117b93d9e64569117099f8..e03c1ecac47e894ed643131cd1d2b9e53d0372bb 100644 (file)
@@ -24,7 +24,6 @@ function remoteCmd($cmd, $device)
         } else if ($device == 'bureau') {
             execScene('bureau/auto');
         }
-
         return;
     } else if ($cmd == 'light-down') {
         if ($device == 'salon') {
index 5be9dc9dff6c4207239ed71ea1884dc0e86cf9c2..ea551979319bef9a5f996bd2d75213aa0db27c82 100644 (file)
@@ -68,7 +68,7 @@ function _getTVShows($force = false, $forceapi = false)
         global $directories;
         $library = new tvShowLibrary($directories, $forceapi);
         $res = $library->getShortcuts();
-        connectRedis()->igbset('medialibrary.tvshows', $res);
+        connectRedis()->igbsetex('medialibrary.tvshows',259200, $res);
         return $res;
     }
     $res = connectRedis()->igbget('medialibrary.tvshows');
@@ -89,7 +89,7 @@ function _getMovies($force = false, $forceapi = false)
         global $directories;
         $library = new moviesLibrary($directories, $force);
         $res = $library->getShortcuts();
-        connectRedis()->igbset('medialibrary.movies', $res);
+        connectRedis()->igbsetex('medialibrary.movies',259200 , $res);
         return $res;
     }
     $res = connectRedis()->igbget('medialibrary.movies');
@@ -159,7 +159,7 @@ class tvShowLibrary extends mediaLibrary
 
             try {
                 $tv = $client->getTvApi()->getTvshow($id, ['language' => 'fr-FR']);
-                connectRedis()->igbset('tmdb.tv.' . $id, $tv);
+                connectRedis()->igbsetex('tmdb.tv.' . $id,259200, $tv);
                 return $tv;
             } catch (Exception $e) {
                 echo $e->getMessage();
@@ -518,7 +518,7 @@ class moviesLibrary extends mediaLibrary
             $client = getTmbdClient();
             try {
                 $movie = $client->getMoviesApi()->getMovie($id, ['language' => 'fr-FR']);
-                connectRedis()->igbset('tmdb.movie.' . $id, $movie);
+                connectRedis()->igbsetex('tmdb.movie.' . $id,259200, $movie);
                 return $movie;
             } catch (Exception $e) {
                 return null;
index d270924cab9604d54b15052f9494da038ec94867..fd19c3e5e796384b7b8dba7928e2f3372dac7aa9 100644 (file)
@@ -13,6 +13,9 @@ if (!isset($_GET['device'])) {
 // We first try to send it to salon raspberry before sending a less robust ir command
 if (!remoteCmd($cmd, $_GET['device'])) {
        if ($_GET['device'] == 'salon') {
+           echo 'run '.$cmd.' with harmony';
                harmonyRequest('commands/' . $cmd, 'POST');
-       }
+       }else{
+           echo 'ok';
+    }
 }
\ No newline at end of file
index e41c600f52df5d1e48b77ca97f8a1b4d78139a68..3edcb3eae4df456b6dd66de6676340f2f21a4190 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 require_once 'import.php';
-_getTVShows(true);
-_getMovies(true);
-_getMediaRecentAdded(true);
+_getTVShows(true, true);
+_getMovies(true, true);
+_getMediaRecentAdded(true, true);
 parseMoviesLibrary();
\ No newline at end of file