]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Mon, 11 Jan 2021 08:25:04 +0000 (09:25 +0100)
committerVincent <vincent@enhydra.fr>
Mon, 11 Jan 2021 08:25:04 +0000 (09:25 +0100)
.idea/workspace.xml
scripts/cron/cron.php
scripts/lib/shield.php
scripts/lib/tmdb.php

index b56480039335eef22e7a568c3bf13c83adaa6af0..65efb08e57e40266f986ab56536d19a08c352151 100644 (file)
@@ -3,11 +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$/config/chambre.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/chambre.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/music.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/music.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/ecomode.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/ecomode.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/redis.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/redis.php" 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/shield.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/shield.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" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1609698147260" duration="38000" />
       <workItem from="1609950754201" duration="3352000" />
       <workItem from="1610050680817" duration="1480000" />
-    </task>
-    <task id="LOCAL-00380" summary=".">
-      <created>1605093966322</created>
-      <option name="number" value="00380" />
-      <option name="presentableId" value="LOCAL-00380" />
-      <option name="project" value="LOCAL" />
-      <updated>1605093966322</updated>
+      <workItem from="1610202160108" duration="2175000" />
+      <workItem from="1610280280433" duration="6883000" />
     </task>
     <task id="LOCAL-00381" summary=".">
       <created>1605094978427</created>
       <option name="project" value="LOCAL" />
       <updated>1609681610454</updated>
     </task>
-    <option name="localTasksCounter" value="429" />
+    <task id="LOCAL-00429" summary=".">
+      <created>1610202214223</created>
+      <option name="number" value="00429" />
+      <option name="presentableId" value="LOCAL-00429" />
+      <option name="project" value="LOCAL" />
+      <updated>1610202214223</updated>
+    </task>
+    <option name="localTasksCounter" value="430" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index 0776f5664c90ec035f959c657cebad572b4b5423..5493cd1acad7fda4bf50c863cffc728857c4e291 100644 (file)
@@ -198,7 +198,7 @@ function cronSqueezeCheckPlayers($cronmin)
     $players = ['Salon' => 'salon', 'Bureau' => 'bureau'];
     foreach ($players as $player => $device) {
         if (getSqueezePlayerStatus($player) === -1) {
-            if(!shieldPlayingVideo($device)) {
+            if (!shieldPlayingVideo($device)) {
                 shieldRunAppAndBackHome('sbplayer', $device, 1, true);
                 sleep(5);
             }
@@ -352,8 +352,9 @@ function cronTraffic($cronmin, $force = false)
 
 function cronPodcasts($cronmin)
 {
-    _logSection('Podcasts');
     checkSpottyLogin();
+    return;
+    _logSection('Podcasts');
     $podcasts = getSqueezeFavorites(0, 'podcasts');
     if ($podcasts !== false && count($podcasts) > 0) {
         connectRedis()->igbset('squeezebox_podcasts', $podcasts);
index 3e026e1de31d92198276af1e9c5907e9cca2fb00..2a2ae83b0647d893661bdab949461a232f2d5fa1 100644 (file)
@@ -176,6 +176,7 @@ function shieldLaunchApp($activity, $device = null)
 function shieldMyCanal($channel = false, $type = 'live', $device = null)
 {
     shieldRunActivity($device);
+    shieldKill('mycanal', $device);
     if ($type === 'replay') {
         if ($channel === 'arte') {
             shieldArte($device);
@@ -225,7 +226,7 @@ function shieldListApps($device = null)
     echo shieldCommand('shell pm list', 'packages -f', $device);
 }
 
-function shieldFindIntents($app, $device)
+function shieldFindIntents($app, $device = null)
 {
     $app = shieldGetAppId($app);
     shieldCommand('shell pm dump', $app, $device);
index 9073d42f05d090212d97af2b54b3f1c282b24ece..639c68af9c5c8e66dd26ec03637055e698f8d01b 100644 (file)
@@ -153,11 +153,22 @@ class tvShowLibrary extends mediaLibrary
                 if ($f->isDir() || strpos($f->getFilename(), '.tmdb.id') === false) {
                     continue;
                 }
+
                 $file = str_replace('.tmdb.id', '', $f->getPathname());
-                $dir = file_exists($file) && is_file($file) ? file_get_contents($file) : $f->getPath();
 
-                $id = file_get_contents($f->getPathname());
-                $this->tvShows[] = ['type' => 'tvshow', 'dir' => $dir, 'data' => $this->getTVShowByID($id), 'id' => $id, 'mtime' => $this->dirfilemtime($f->getPath(), true)];
+                $id = file_get_contents($f->getPathname() . '');
+                $data = $this->getTVShowByID($id);
+                $edate = explode('-', $data['last_air_date']);
+                $mtime = gmmktime(12, 0, 0, $edate[1], $edate[2], $edate[0]);
+
+                if (file_exists($file.'.netflix')) {
+                    $dir = 'netflix:' . file_get_contents($file.'.netflix');
+                } else {
+                    $dir = file_exists($file) && is_file($file) ? file_get_contents($file) : $f->getPath();
+                }
+
+                $data = $this->getTVShowByID($id);
+                $this->tvShows[] = ['type' => 'tvshow', 'dir' => $dir, 'data' => $data, 'id' => $id, 'mtime' => $mtime];
             }
         }
 
@@ -363,13 +374,13 @@ class mediaLibrary
         return $lastModified;
     }
 
-    public function _poster($path, $alt='')
+    public function _poster($path, $alt = '')
     {
         if (null === $path || $path === '') {
-            if($alt===''){
+            if ($alt === '') {
                 return '';
             }
-            return cacheMedia('/volume1/Share/'.$alt);
+            return cacheMedia('/volume1/Share/' . $alt);
         } else {
             return cacheMedia('https://image.tmdb.org/t/p/w500' . $path);
         }