<project version="4">
<component name="ChangeListManager">
<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
- <change beforePath="$PROJECT_DIR$/.idea/php.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/php.xml" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/scripts/accordionstate.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/js/home.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/home.js" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/lib.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/lib.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/lib/medialibrary.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/medialibrary.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/lib/pc.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/pc.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.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" />
<option name="Make" enabled="true" />
</method>
</configuration>
- <configuration default="true" type="ArquillianJUnit" factoryName="" nameIsGenerated="true">
- <option name="arquillianRunConfiguration">
- <value>
- <option name="containerStateName" value="" />
- </value>
- </option>
- <option name="TEST_OBJECT" value="class" />
- <method v="2">
- <option name="Make" enabled="true" />
- </method>
- </configuration>
<configuration default="true" type="ArquillianTestNG" factoryName="">
<option name="arquillianRunConfiguration">
<value>
<workItem from="1606299989262" duration="135000" />
<workItem from="1606480003955" duration="1588000" />
<workItem from="1606647174961" duration="4677000" />
+ <workItem from="1606674601895" duration="2974000" />
</task>
<task id="LOCAL-00365" summary=".">
<created>1604307642081</created>
</state>
<state x="635" y="216" key="FileChooserDialogImpl/0.0.1707.920@0.0.1707.920" timestamp="1604227698339" />
<state x="952" y="244" key="FileChooserDialogImpl/0.0.2560.1040@0.0.2560.1040" timestamp="1605726960903" />
- <state x="1114" y="443" key="NewPhpFileDialog" timestamp="1605344146097">
+ <state x="1114" y="443" key="NewPhpFileDialog" timestamp="1606676047797">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="743" y="392" key="NewPhpFileDialog/0.0.1707.920@0.0.1707.920" timestamp="1604238041494" />
- <state x="1114" y="443" key="NewPhpFileDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1605344146097" />
+ <state x="1114" y="443" key="NewPhpFileDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1606676047797" />
<state x="546" y="120" key="SettingsEditor" timestamp="1606112187843">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="295" y="0" width="1290" height="907" key="dock-window-1/0.0.2560.1040@0.0.2560.1040" timestamp="1603274697406" />
- <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1606664599318">
+ <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1606675922613">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="651" y="227" width="550" height="534" key="find.popup/0.0.1707.920@0.0.1707.920" timestamp="1604301949692" />
- <state x="977" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1606664599318" />
+ <state x="977" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1606675922613" />
<state x="1056" y="292" key="refactoring.ChangeSignatureDialog" timestamp="1604518096294">
<screen x="0" y="0" width="2560" height="1040" />
</state>
});
$(document).on(clicktouchevent, '[data-menu]', function () {
- console.log('!!!!');
$("#iframeHolder").hide();
window.location.hash = "#/section/" + $(this).data('menu');
return false;
});
$(document).on(clickevent, 'accordion>a', function () {
- $(this).closest('accordion').toggleClass('closed');
+ var close = [];
+ var open = [];
+ var a = $(this).closest('accordion');
+ if (a.hasClass('closed')) {
+ var notClosed = $(this).closest('section').find('accordion:not(.closed)');
+ $(notClosed).each(function () {
+ close.push($(this).attr('id'));
+ });
+ $(notClosed).addClass('closed');
+
+ open.push(a.attr('id'));
+ a.removeClass('closed');
+ } else {
+ close.push(a.attr('id'));
+ a.addClass('closed');
+ }
+
+ $.ajax({
+ url: '/scripts/accordionstate.php',
+ method: 'post',
+ data: {close: close, open: open}
+ });
+
+ $('#scrollholder').scrollTo(0);
+ setTimeout(function () {
+ $('#scrollholder').scrollTo(0);
+ }, 50);
+
resize();
return false;
});
return false;
});
-
changeAddress();
initScreenSaver();
initWeather();
}
function soundsOff() {
-
$("#iframeHolder").remove();
stopSqueeze();
}
--- /dev/null
+<?php
+require_once "import.php";
+
+if (isset($_POST['close'])) {
+ foreach ($_POST['close'] as $item) {
+ setState($item, '0');
+ }
+}
+if (isset($_POST['open'])) {
+ foreach ($_POST['open'] as $item) {
+ setState($item, '1');
+ }
+}
\ No newline at end of file
return sha1(json_encode($s));
}
+function accordionClosed($accordionId)
+{
+ return getState($accordionId, '0') == '0';
+}
+
function shortcutDir($allshortcuts)
{
$res = array();
$section .= '<div class="fit">';
}
foreach ($shortcuts as $k => $s) {
- if ($s['type'] == 'accordion-end') {
- $html = '</accordion>';
- } else if ($s['type'] == 'accordion') {
- $html = '<accordion class="accordion ' . (isset($s['closed']) && $s['closed'] ? 'closed' : '') . '"><a href="#"><span>' . $s['label'] . '</span></a>';
- }
if ($s['type'] == 'clear' || $s['type'] == 'accordion' || $s['type'] == 'accordion-end') {
if ($i % 2 == 1) {
$section .= '</div>';
if ($s['type'] === 'clear') {
$section .= '<div class="clearcol"></div>';
} else if ($s['type'] === 'accordion') {
- $section .= '<accordion class="accordion ' . (isset($s['closed']) && $s['closed'] ? 'closed' : '') . '"><a><span>' . $s['label'] . '</span></a>';
+ $section .= '<accordion id="' . $s['id'] . '" class="accordion ' . (isset($s['closed']) && $s['closed'] ? 'closed' : '') . '"><a><span>' . $s['label'] . '</span></a>';
} else if ($s['type'] === 'accordion-end') {
$section .= '</accordion>';
}
$resize = getVideoHeight($path) > 1080 ? ' 1' : ' 0';
$cmd = 'C:\Scripts\convertvideo.bat "' . nasToAvion($item) . '" "' . nasToAvion($to) . '" ' . $destext . ' ' . getVideoCodec($path) . $resize;
- print_r(sshCommand($cmd, 'avion'));
return;
}
echo 'no file to transcode';
global $directories;
$library = new tvShowLibrary($directories, $forceapi);
$res = $library->getShortcuts();
- connectRedis()->igbsetex('medialibrary.tvshows', 259200, $res);
+ connectRedis()->igbsetex('medialibrary.tvshows', 1800, $res);
return $res;
}
$res = connectRedis()->igbget('medialibrary.tvshows');
global $directories;
$library = new moviesLibrary($directories, $forceapi);
$res = $library->getShortcuts();
- connectRedis()->igbsetex('medialibrary.movies', 259200, $res);
+ connectRedis()->igbsetex('medialibrary.movies', 1800, $res);
return $res;
}
$res = connectRedis()->igbget('medialibrary.movies');
{
global $videoExt;
-
$e = explode(':', $tvShow['dir']);
if ($e[0] === 'netflix') {
$res['shortcuts'][] = ['label' => $tvShow['data']['name'], 'type' => 'netflix', 'url' => '/scripts/netflix.php?id=' . $e[1], 'poster' => $this->_poster($tvShow['data']['poster_path'])];
continue;
}
- $res['subs']['sub-' . $subname][] = ['label' => $ns, 'type' => 'accordion'];
- $startIndex = count($res['subs']['sub-' . $subname]) - 2;
- $lastSeen = true;
+ $accordionId = 'acc_' . sha1($subname . '--' . $ns);
+ $res['subs']['sub-' . $subname][] = ['label' => $ns, 'type' => 'accordion', 'id' => $accordionId, 'closed' => accordionClosed($accordionId)];
for ($i = 1; $i <= $season['episode_count']; $i++) {
$es = $this->_n($i, 'e');
$exists = false;
if ($exists) {
$path = $this->_path($exists);
$res['subs']['sub-' . $subname][] = ['label' => $es, 'type' => 'media', 'srt' => hasSRT($path), 'seen' => $this->_seen($path), 'path' => $path];
- $missing = false;
} else {
$res['subs']['sub-' . $subname][] = ['label' => $es, 'type' => 'missing'];
}
- $lastSeen = $this->_seen($path);
- }
- if ($lastSeen || $missing) {
- $closed = true;
+
}
- $res['subs']['sub-' . $subname][$startIndex]['closed'] = $closed;
+
$res['subs']['sub-' . $subname][] = ['type' => 'accordion-end'];
}
}