]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Fri, 3 Apr 2020 07:36:26 +0000 (09:36 +0200)
committerVincent <vincent@enhydra.fr>
Fri, 3 Apr 2020 07:36:26 +0000 (09:36 +0200)
.idea/workspace.xml
scripts/lib/tmdb.php

index 412f554043d9f07246798ff6e96f4f6c59b353bc..01ab3815fdafa74650442a3715a55e438782cd92 100644 (file)
@@ -3,8 +3,6 @@
   <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$/composer.lock" beforeDir="false" afterPath="$PROJECT_DIR$/composer.lock" 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" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
       <workItem from="1584532787349" duration="769000" />
       <workItem from="1584953069578" duration="777000" />
       <workItem from="1585434477042" duration="1802000" />
-      <workItem from="1585667444927" duration="1515000" />
-    </task>
-    <task id="LOCAL-00269" summary=".">
-      <created>1578388778339</created>
-      <option name="number" value="00269" />
-      <option name="presentableId" value="LOCAL-00269" />
-      <option name="project" value="LOCAL" />
-      <updated>1578388778339</updated>
+      <workItem from="1585667444927" duration="2130000" />
+      <workItem from="1585852937701" duration="6000" />
+      <workItem from="1585852958281" duration="1865000" />
     </task>
     <task id="LOCAL-00270" summary=".">
       <created>1578429849669</created>
       <option name="project" value="LOCAL" />
       <updated>1585553503260</updated>
     </task>
-    <option name="localTasksCounter" value="318" />
+    <task id="LOCAL-00318" summary=".">
+      <created>1585669021651</created>
+      <option name="number" value="00318" />
+      <option name="presentableId" value="LOCAL-00318" />
+      <option name="project" value="LOCAL" />
+      <updated>1585669021651</updated>
+    </task>
+    <option name="localTasksCounter" value="319" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="1019" y="324" key="#com.intellij.fileTypes.FileTypeChooser/0.0.2560.1040@0.0.2560.1040" timestamp="1581415995312" />
-    <state x="960" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog" timestamp="1583062669525">
+    <state x="960" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog" timestamp="1585852940968">
       <screen x="0" y="0" width="2560" height="1040" />
     </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="1583062669525" />
-    <state x="935" y="114" width="1170" height="972" key="CommitChangelistDialog2" timestamp="1585553434432">
+    <state x="960" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1585852940968" />
+    <state x="935" y="114" width="1170" height="972" key="CommitChangelistDialog2" timestamp="1585668990500">
       <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" width="1170" height="972" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1582220569877" />
-    <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1585553434432" />
+    <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1585668990500" />
     <state x="92" y="92" width="2376" height="856" key="DiffContextDialog" timestamp="1580377344165">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="873" y="242" key="Vcs.Push.Dialog.v2/0.0.2560.1040@0.0.2560.1040" timestamp="1584350540478" />
-    <state x="1456" y="240" key="com.intellij.ide.util.TipDialog" timestamp="1585667487752">
+    <state x="1456" y="240" key="com.intellij.ide.util.TipDialog" timestamp="1585852964408">
       <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="1582201881167" />
-    <state x="1456" y="240" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1585667487752" />
+    <state x="1456" y="240" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1585852964408" />
     <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1584360859362">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
index 6b1af179a64c96ee1618dd22eef2dd4503da4f35..14e167014f77e71559b77646ba3788d4d3f9da1c 100644 (file)
@@ -72,7 +72,7 @@ function _getTVShows($force = false, $forceapi = false)
         global $directories;
         $library = new tvShowLibrary($directories, $forceapi);
         $res = $library->getShortcuts();
-        connectRedis()->igbsetex('medialibrary.tvshows',259200, $res);
+        connectRedis()->igbsetex('medialibrary.tvshows', 259200, $res);
         return $res;
     }
     $res = connectRedis()->igbget('medialibrary.tvshows');
@@ -93,7 +93,7 @@ function _getMovies($force = false, $forceapi = false)
         global $directories;
         $library = new moviesLibrary($directories, $forceapi);
         $res = $library->getShortcuts();
-        connectRedis()->igbsetex('medialibrary.movies',259200 , $res);
+        connectRedis()->igbsetex('medialibrary.movies', 259200, $res);
         return $res;
     }
     $res = connectRedis()->igbget('medialibrary.movies');
@@ -163,7 +163,7 @@ class tvShowLibrary extends mediaLibrary
 
             try {
                 $tv = $client->getTvApi()->getTvshow($id, ['language' => 'fr-FR']);
-                connectRedis()->igbsetex('tmdb.tv.' . $id,259200, $tv);
+                connectRedis()->igbsetex('tmdb.tv.' . $id, 259200, $tv);
                 return $tv;
             } catch (Exception $e) {
                 echo $e->getMessage();
@@ -522,7 +522,7 @@ class moviesLibrary extends mediaLibrary
             $client = getTmbdClient();
             try {
                 $movie = $client->getMoviesApi()->getMovie($id, ['language' => 'fr-FR']);
-                connectRedis()->igbsetex('tmdb.movie.' . $id,259200, $movie);
+                connectRedis()->igbsetex('tmdb.movie.' . $id, 259200, $movie);
                 return $movie;
             } catch (Exception $e) {
                 return null;
@@ -574,9 +574,11 @@ function parseMoviesLibrary()
             if (strpos($last, 'tt') === 0) {
                 $f = $find->findBy($last, ['external_source' => 'imdb_id']);
                 foreach ($f['movie_results'] as $movie_result) {
-                    $tmdbid = $movie_result['id'];
-                    break;
+                    if (isset($movie_result['id'])) {
+                        $tmdbid = $movie_result['id'];
+                    }
                 }
+                echo $tmdbid;
             } else {
                 $s = $search->searchMovies($basename);
                 if ($s['total_results'] == 0) {
@@ -584,17 +586,15 @@ function parseMoviesLibrary()
                 } else {
                     $results = $s['results'];
                     foreach ($results as $result) {
-                        $tmdbid = $result['id'];
-                        break;
+                        if (isset($result['id'])) {
+                            $tmdbid = $result['id'];
+                        }
                     }
                 }
             }
 
             file_put_contents($tmdbfile, $tmdbid);
             $i++;
-            if ($i >= 10) {
-                break;
-            }
         }
     }
 }
\ No newline at end of file