]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Wed, 21 Aug 2019 09:49:02 +0000 (11:49 +0200)
committerVincent <vincent@enhydra.fr>
Wed, 21 Aug 2019 09:49:02 +0000 (11:49 +0200)
.idea/workspace.xml
scripts/lib/medialibrary.php

index d53870792aa6e874f7f9a5214df6308329da9940..c37e09150805949684b9540badb784cd98d6e8f8 100644 (file)
@@ -2,13 +2,8 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
-      <change afterPath="$PROJECT_DIR$/scripts/spotifychecklogin.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/global.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/global.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/images/backgrounds/chambre.jpg" beforeDir="false" afterPath="$PROJECT_DIR$/images/backgrounds/chambre.jpg" 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/http.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/http.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/squeezebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/squeezebox.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/medialibrary.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/medialibrary.php" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
       <workItem from="1566131336031" duration="140000" />
       <workItem from="1566150382844" duration="1598000" />
       <workItem from="1566371220982" duration="598000" />
-      <workItem from="1566376145799" duration="2929000" />
-    </task>
-    <task id="LOCAL-00156" summary=".">
-      <created>1550738402508</created>
-      <option name="number" value="00156" />
-      <option name="presentableId" value="LOCAL-00156" />
-      <option name="project" value="LOCAL" />
-      <updated>1550738402508</updated>
+      <workItem from="1566376145799" duration="4113000" />
     </task>
     <task id="LOCAL-00157" summary=".">
       <created>1551008694281</created>
       <option name="project" value="LOCAL" />
       <updated>1566128716085</updated>
     </task>
-    <option name="localTasksCounter" value="205" />
+    <task id="LOCAL-00205" summary=".">
+      <created>1566379769047</created>
+      <option name="number" value="00205" />
+      <option name="presentableId" value="LOCAL-00205" />
+      <option name="project" value="LOCAL" />
+      <updated>1566379769047</updated>
+    </task>
+    <option name="localTasksCounter" value="206" />
     <servers />
   </component>
   <component name="TodoView">
index 890a2be0a91966338928ce3499398dbf21dbb564..ff36f6e71d0c34588211c61998d9907cdbb5499b 100644 (file)
@@ -106,6 +106,7 @@ function mediaName($name, $context, $dir, $path)
 function transcodeOneVideo()
 {
     $list = getVideosList(true);
+    print_r($list);
     foreach ($list as $item) {
 
         /** @var SplFileInfo $item */
@@ -150,11 +151,12 @@ class DirFilter extends RecursiveFilterIterator
         return new DirFilter($this->getInnerIterator()->getChildren(), $this->exclude);
     }
 }
+
 function getVideosList($shuffle = false)
 {
     global $videoExt;
     $res = array();
-    $dirit = new RecursiveDirectoryIterator('/volume1/Share/Videos');
+    $dirit = new RecursiveDirectoryIterator('/nas/Videos');
     $filtered = new DirFilter($dirit, ['@eaDir']);
     $iterator = new RecursiveIteratorIterator($filtered, RecursiveIteratorIterator::CHILD_FIRST);
     foreach ($iterator as $f) {
@@ -166,6 +168,7 @@ function getVideosList($shuffle = false)
             continue;
         }
         $path = $f->getRealPath();
+
         $codec = getVideoCodec($path);
 
         if ($codec != 'hevc') {
@@ -184,7 +187,7 @@ function getVideosList($shuffle = false)
 
 function getVideoCodec($path)
 {
-    $cacheKey = 'codec_1_' . $path;
+    $cacheKey = 'codec_3_' . $path;
     $res = getState($cacheKey, null);
     if (null === $res) {
         $codecfile = $path . '.vc';
@@ -197,8 +200,8 @@ function getVideoCodec($path)
             $res = `ffprobe -v error -select_streams v:0 -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 "$path"`;
             $res = trim($res);
         }
+        echo $path . '::' . $res . "\n";
         setState($cacheKey, $res);
-        die($res);
     }
     return $res;
 }
\ No newline at end of file