<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/media.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/media.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="SHOW_DIALOG" value="false" />
<workItem from="1605087787424" duration="33487000" />
<workItem from="1605261347643" duration="1199000" />
<workItem from="1605342171398" duration="4613000" />
- <workItem from="1605355486465" duration="15698000" />
- </task>
- <task id="LOCAL-00347" summary=".">
- <created>1602863336459</created>
- <option name="number" value="00347" />
- <option name="presentableId" value="LOCAL-00347" />
- <option name="project" value="LOCAL" />
- <updated>1602863336459</updated>
+ <workItem from="1605355486465" duration="16791000" />
</task>
<task id="LOCAL-00348" summary=".">
<created>1603131455368</created>
<option name="project" value="LOCAL" />
<updated>1605431934015</updated>
</task>
- <option name="localTasksCounter" value="396" />
+ <task id="LOCAL-00396" summary=".">
+ <created>1605432287214</created>
+ <option name="number" value="00396" />
+ <option name="presentableId" value="LOCAL-00396" />
+ <option name="project" value="LOCAL" />
+ <updated>1605432287214</updated>
+ </task>
+ <option name="localTasksCounter" value="397" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<screen x="0" y="0" width="1707" height="920" />
</state>
<state x="740" y="229" key="#com.jetbrains.php.refactoring.extractMethod.PhpExtractMethodDialog#function0/0.0.1707.920@0.0.1707.920" timestamp="1604146905948" />
- <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605431931637">
+ <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605432284758">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1605086955514" />
<state x="701" y="75" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1605188136787" />
- <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605431931637" />
+ <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605432284758" />
<state x="952" y="244" key="FileChooserDialogImpl" timestamp="1605104496549">
<screen x="0" y="0" width="2560" height="1040" />
</state>
function getMediaFolderShortcuts($mediagroup, $parentId)
{
+
+
$res['sub-' . $parentId] = array();
if (!isset($mediagroup['items'])) {
return $res;
$res['sub-' . $parentId][] = array('label' => $item['name'], 'type' => 'sub', 'sub' => $pid);
$res = array_merge($res, getMediaFolderShortcuts($item, $pid));
} else {
- $res['sub-' . $parentId][] = array('label' => $item['name'], 'type' => 'media', 'path' => $item['path']);
+ $unsupportedExt = [];
+ $unsupportedCodec = ['av1', 'hevc'];
+ if (config('VIDEOPLAYER') === 'shield') {
+ $unsupportedCodec = ['xvid'];
+ $unsupportedExt = ['avi'];
+ }
+ $e = explode('.', $item['path']);
+ $path = $item['path'];
+ if (in_array($e, $unsupportedExt) || in_array(getVideoCodec($item['path']), $unsupportedCodec)) {
+ $path = $item['x264path'];
+ }
+ $res['sub-' . $parentId][] = array('label' => $item['name'], 'type' => 'media', 'path' => $path);
}
}
continue;
}
$normPath = normPath($path);
- $results[] = array('path' => $normPath, 'x264path' => getX264Version($path, false), 'srt' => hasSRT($normPath), 'seen' => seen($normPath), 'dir' => false, 'name' => mediaName(implode(' ', $e), $context, false, $path));
+ $results[] = array('path' => $normPath, 'ext' => $ext, 'codec' => getVideoCodec($path), 'x264path' => getX264Version($path, false), 'srt' => hasSRT($normPath), 'seen' => seen($normPath), 'dir' => false, 'name' => mediaName(implode(' ', $e), $context, false, $path));
}
} else if ($value != "." && $value != ".." && $value != '@eaDir') {
$files = getMediaContents($path, $context, $seen);
$results[] = $files[0];
} else {
$normPath = normPath($path);
- $results[] = array('path' => $normPath, 'x264path' => getX264Version($path, false), 'seen' => seen($normPath), 'dir' => true, 'id' => hash('sha256', $path), 'name' => mediaName($value, $context, true, $path), 'items' => $files);
+ $results[] = array('path' => $normPath, 'ext' => $ext, 'codec' => getVideoCodec($path), 'x264path' => getX264Version($path, false), 'seen' => seen($normPath), 'dir' => true, 'id' => hash('sha256', $path), 'name' => mediaName($value, $context, true, $path), 'items' => $files);
}
}
}
function transcodeOneVideo()
{
if (getState('night') == '1') {
- return;
+ //return;
}
$list = getVideosList(true);