<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/global.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/global.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/squeezebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/squeezebox.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/shield.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/shield.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/servers/logcat.php" beforeDir="false" afterPath="$PROJECT_DIR$/servers/logcat.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/remoteinfos.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/remoteinfos.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/squeeze.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/squeeze.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="1607439614302" duration="1182000" />
<workItem from="1607546452054" duration="634000" />
<workItem from="1607872973632" duration="1438000" />
- <workItem from="1607932840253" duration="4147000" />
- </task>
- <task id="LOCAL-00373" summary=".">
- <created>1604522275963</created>
- <option name="number" value="00373" />
- <option name="presentableId" value="LOCAL-00373" />
- <option name="project" value="LOCAL" />
- <updated>1604522275963</updated>
+ <workItem from="1607932840253" duration="5614000" />
+ <workItem from="1607945700829" duration="1423000" />
</task>
<task id="LOCAL-00374" summary=".">
<created>1604568864147</created>
<option name="project" value="LOCAL" />
<updated>1607933724636</updated>
</task>
- <option name="localTasksCounter" value="422" />
+ <task id="LOCAL-00422" summary=".">
+ <created>1607938357925</created>
+ <option name="number" value="00422" />
+ <option name="presentableId" value="LOCAL-00422" />
+ <option name="project" value="LOCAL" />
+ <updated>1607938357925</updated>
+ </task>
+ <option name="localTasksCounter" value="423" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
$players = ['Salon' => 'salon', 'Bureau' => 'bureau'];
foreach ($players as $player => $device) {
if (getSqueezePlayerStatus($player) === -1) {
- shieldRunAppAndBackHome('sbplayer', $device, 1, true);
- sleep(5);
+ if(!shieldPlayingVideo($device)) {
+ shieldRunAppAndBackHome('sbplayer', $device, 1, true);
+ sleep(5);
+ }
}
}
}
function shieldRunActivity($device = null)
{
$device = getDevice($device);
+ $onlySound = in_array(shieldGetCurrentApp($device), ['spotify']);
+
if ($device['id'] === 'salon') {
- harmonyActivity('tv');
+ if ($onlySound) {
+ harmonyActivity('musique');
+ } else {
+ harmonyActivity('tv');
+ }
} else if ($device['id'] === 'bureau' || $device['id'] === 'bureausun') {
- execScene('bureau/media/play');
+ if ($onlySound) {
+ execScene('bureau/sound/on');
+ } else {
+ execScene('bureau/media/play');
+ }
}
}
shieldLaunchApp('fr.francetv.pluzz/fr.francetv.androidtv.main.MainActivity', $device);
}
-function shieldLaunchApp($activity, $device=null)
+function shieldLaunchApp($activity, $device = null)
{
shieldHome($device);
if (strpos($activity, '.') === false) {
$activity = shieldGetAppId($activity);
}
- shieldCommand('shell monkey', '-p ' . $activity.' 1', $device);
+ shieldCommand('shell monkey', '-p ' . $activity . ' 1', $device);
} else {
shieldCommand('shell am start', '-n ' . $activity, $device);
}
];
}
+function shieldPlayingVideo($device = null)
+{
+ $videoApps = ['kodi', 'vlc', 'mycanal', 'netflix', 'arte', 'francetv', 'gamecast', 'twitch', 'youtube', 'dailymotion', 'vimeo', 'steamlink'];
+ return in_array(shieldGetCurrentApp($device), $videoApps);
+}
+
function shieldRunAppAndBackHome($app, $device = null, $waitBeforeBack = 1, $backToSleep = true)
{
$s = 'maskShield' . ucfirst($d['id']) . 'Wakeup';
setState($s, '1');
}
- echo 'shieldLaunchApp :: '.$app."\n";
+ echo 'shieldLaunchApp :: ' . $app . "\n";
shieldLaunchApp($app, $device);
sleep($waitBeforeBack);
- echo 'shieldHome'."\n";
+ echo 'shieldHome' . "\n";
shieldHome($device);
if ($backToSleep) {
shieldSleep($device);
}
-
function _adb($command, $params = '', $device = null)
{
$c = _adbcmd($command, $params, $device);
} else if ($player == $squeezeboxPlayers['Salle de bains']) {
execScene('sdb/ampli/on');
} else if ($player == $squeezeboxPlayers['Bureau']) {
- exec('bureau/sound/on');
+ execScene('bureau/sound/on');
setState('maskShieldBureauWakeup', '1');
} else if ($player == $squeezeboxPlayers['Chambre']) {
denon(true);
<?php
require_once "import.php";
+
header('Content-Type: application/json');
-echo remoteInfos();
-exit;
\ No newline at end of file
+$res = remoteInfos();
+ob_end_clean();
+die($res);
\ No newline at end of file
} elseif ($_GET['player'] == 'Salle de bains') {
execScene('sdb/ampli/on');
} else if ($_GET['player'] === 'Bureau') {
+ execScene('bureau/sound/on');
setState('maskShieldBureauWakeup', '1');
}
setPlaying('squeezebox');