<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$/scripts/lib/mediarasp.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/mediarasp.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/squeezebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/squeezebox.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<workItem from="1578759225069" duration="373000" />
<workItem from="1578771487829" duration="5723000" />
<workItem from="1579161178878" duration="2992000" />
+ <workItem from="1579457368919" duration="3620000" />
</task>
<task id="LOCAL-00229" summary=".">
<created>1568480708820</created>
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="872" y="242" key="Vcs.Push.Dialog.v2/0.0.2560.1040@0.0.2560.1040" timestamp="1578558711439" />
- <state x="976" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1579161185918">
+ <state x="976" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1579457397304">
<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="1575647093028" />
- <state x="976" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1579161185918" />
- <state x="976" y="257" width="607" height="536" key="find.popup" timestamp="1578556582887">
+ <state x="976" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1579457397304" />
+ <state x="976" y="257" width="607" height="536" key="find.popup" timestamp="1579506279995">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="732" y="257" width="607" height="536" key="find.popup/0.0.1920.1040@0.0.1920.1040" timestamp="1577380471547" />
- <state x="976" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1578556582887" />
+ <state x="976" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1579506279995" />
<state x="936" y="240" key="run.anything.popup" timestamp="1578386519646">
<screen x="0" y="0" width="2560" height="1040" />
</state>
}
$list = getVideosList(true);
+
+
foreach ($list as $item) {
/** @var SplFileInfo $item */
wakeupPC('avion');
sleep(5);
- $cmd = 'C:\Scripts\convertvideo.bat "' . nasToAvion($item) . '" "' . nasToAvion($to) . '" ' . $item->getExtension();
+ $cmd = 'C:\Scripts\convertvideo.bat "' . nasToAvion($item) . '" "' . nasToAvion($to) . '" ' . $item->getExtension() . ' ' . getVideoCodec($path);
print_r(sshCommand($cmd, 'avion'));
return;
}
+ echo 'no file to transcode';
}
function nasToAvion($path)
$dirit = new RecursiveDirectoryIterator('/nas/Videos');
$filtered = new DirFilter($dirit, ['@eaDir']);
$iterator = new RecursiveIteratorIterator($filtered, RecursiveIteratorIterator::CHILD_FIRST);
+
+ $toTranscode = ['hevc', 'vc1'];
+
foreach ($iterator as $f) {
/** @var $f SplFileInfo */
if (!$f->isFile()) {
$codec = getVideoCodec($path);
- if ($codec != 'hevc') {
+ if (!in_array($codec, $toTranscode)) {
continue;
}
if (preg_match('/[\&\[\]\|]/', $f->getFilename(), $matches)) {
return;
}
- if($player == $squeezeboxPlayers['Salon']){
+ if ($player == $squeezeboxPlayers['Salon']) {
harmonyActivity('musique-radio');
}
if ($player == $squeezeboxPlayers['Salle de bains']) {
function squeezeVolume($volume, $increase = '', $player = null)
{
- $cmd='mixer volume ' . $increase . max(0, min(100, intval($volume)));
+ $cmd = 'mixer volume ' . $increase . max(0, min(100, intval($volume)));
echo $cmd;
return squeezeRequest($cmd, $player);
}
$spottybase = '/plugins/Spotty/settings/';
$hascredentials = httpRequest(SQUEEZEBOX_SERVER . $spottybase . 'basic.html?_dc=' . time(), 'get', [], null, 10, false);
- if ($hascredentials->getStatusCode() == 302) {
+ $accounts = [
+ //SQUEEZEBOX_SPOTIFY_USERNAME => SQUEEZEBOX_SPOTIFY_PASSWORD,
+ 'v12l' => 'Lr8ka&7cs@fc%lW7',
+ 'jrme75009' => 'tortuga5009',
+ ];
+
+ $loggedIn = $hascredentials->getStatusCode() !== 302;
+ if ($loggedIn) {
+ $resp = $hascredentials->getBody();
+ foreach ($accounts as $user => $password) {
+ if (!stristr($resp, $user)) {
+ $loggedIn = false;
+ break;
+ }
+ }
+ }
+
+ if (!$loggedIn) {
global $squeezeboxPlayers;
echo 'Not logged in !<br>';
$player = $squeezeboxPlayers['Cuisine'];
- $accounts = [
- //SQUEEZEBOX_SPOTIFY_USERNAME => SQUEEZEBOX_SPOTIFY_PASSWORD,
- 'v12l' => 'Lr8ka&7cs@fc%lW7',
- 'jrme75009' => 'tortuga5009',
- ];
foreach ($accounts as $user => $password) {
echo 'Log in to Spotify with username ' . $user . "\n";
'password' => $password,
'accountId' => ''], null, 60);
print_r($res->getBody());
+ echo '<br>';
}
} else {
- echo 'Logged in :)';
+ echo 'Logged in :)<br>';
print_r($hascredentials);
print_r($hascredentials->getBody());
}