<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/bureau.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/bureau.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/rooms.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/rooms.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$/config/tv.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/tv.php" 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/shield.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/shield.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/shield.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/shield.php" afterDir="false" />
</list>
<workItem from="1603811262372" duration="1988000" />
<workItem from="1603958541180" duration="5032000" />
<workItem from="1604042543878" duration="11137000" />
- <workItem from="1604152329376" duration="17258000" />
- </task>
- <task id="LOCAL-00310" summary=".">
- <created>1583413557785</created>
- <option name="number" value="00310" />
- <option name="presentableId" value="LOCAL-00310" />
- <option name="project" value="LOCAL" />
- <updated>1583413557786</updated>
+ <workItem from="1604152329376" duration="23940000" />
</task>
<task id="LOCAL-00311" summary=".">
<created>1583566913948</created>
<option name="project" value="LOCAL" />
<updated>1604224463669</updated>
</task>
- <option name="localTasksCounter" value="359" />
+ <task id="LOCAL-00359" summary=".">
+ <created>1604228663244</created>
+ <option name="number" value="00359" />
+ <option name="presentableId" value="LOCAL-00359" />
+ <option name="project" value="LOCAL" />
+ <updated>1604228663244</updated>
+ </task>
+ <option name="localTasksCounter" value="360" />
<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="132" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1604224431367">
+ <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1604228652265">
<screen x="0" y="0" width="1707" height="920" />
</state>
- <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1604224431367" />
+ <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1604228652265" />
<state x="701" y="75" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1602171117745" />
<state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1603961854066" />
<state x="635" y="216" key="FileChooserDialogImpl" timestamp="1604227698339">
}
$tv = array(
- 'Replay' => array('freebox' => 'replay', 'shield' => 'tv:replay'),
- 'Netflix' => array('freebox' => 'netflix', 'shield' => 'netflix'),
+ 'Replay' => array('freebox' => 'replay', 'shield' => 'mycanal:replay:home'),
+ 'Netflix' => array('freebox' => 'netflix', 'shield' => 'netflix:home'),
'Infos',
- 'France Info' => array('stream' => 'tvheadend:franceinfo:', 'channel' => 27,'shield'=>'tv:live:franceinfo'),
- 'Cnews' => array('stream' => 'tvheadend:CNEWS', 'channel' => 16,'shield'=>'tv:live:cnews'),
- 'BFM TV' => array('stream' => 'tvheadend:BFM TV', 'channel' => 15,'shield'=>'tv:live:bfmtv'),
- 'BFM Business' => array('stream' => 'tvheadend:BFM Paris', 'channel' => 347,'shield'=>'tv:live:paris'),
- 'LCI' => array('stream' => 'tvheadend:LCI', 'channel' => 26,'shield'=>'tv:live:lci'),
- 'Euronews' => array('stream' => 'fbx:205:sd', 'channel' => 345,'shield'=>'tv:live:euronews'),
+ 'France Info' => array('stream' => 'tvheadend:franceinfo:', 'channel' => 27, 'shield' => 'mycanal:live:670'),
+ 'Cnews' => array('stream' => 'tvheadend:CNEWS', 'channel' => 16, 'shield' => 'mycanal:live:480'),
+ 'BFM TV' => array('stream' => 'tvheadend:BFM TV', 'channel' => 15, 'shield' => 'mycanal:live:633'),
+ 'BFM Business' => array('stream' => 'tvheadend:BFM Paris', 'channel' => 347, 'shield' => 'mycanal:live:645'),
+ 'LCI' => array('stream' => 'tvheadend:LCI', 'channel' => 26, 'shield' => 'mycanal:live:553'),
+ 'Euronews' => array('stream' => 'fbx:205:sd', 'channel' => 345, 'shield' => 'mycanal:live:324'),
'Généralistes',
- 'TF1' => array('stream' => 'tvheadend:TF1', 'channel' => 1,'shield'=>'tv:live:tf1'),
- 'France 2' => array('stream' => 'tvheadend:France 2', 'channel' => 2,'shield'=>'tv:live:france2'),
- 'France 3' => array('stream' => 'tvheadend:F3 Paris Ile-de-France', 'channel' => 3,'shield'=>'tv:live:france3'),
- 'France 5' => array('stream' => 'tvheadend:France 5', 'channel' => 5,'shield'=>'tv:live:france5'),
- 'M6' => array('stream' => 'tvheadend:M6', 'channel' => 6,'shield'=>'tv:live:m6'),
- 'Canal +' => array('stream' => 'tvheadend:CANAL+', 'channel' => 4,'shield'=>'tv:live:canalplus'),
- 'Arte' => array('stream' => 'tvheadend:Arte', 'channel' => 7,'shield'=>'tv:live:arte'),
- 'C8' => array('stream' => 'tvheadend:C8', 'channel' => 8,'shield'=>'tv:live:c8'),
- 'W9' => array('stream' => 'tvheadend:W9', 'channel' => 9,'shield'=>'tv:live:w9'),
- 'TMC' => array('stream' => 'tvheadend:TMC', 'channel' => 10,'shield'=>'tv:live:tmc'),
- 'TFX' => array('stream' => 'tvheadend:TFX', 'channel' => 11,'shield'=>'tv:live:tfx'),
- 'NRJ12' => array('stream' => 'tvheadend:NRJ12', 'channel' => 12,'shield'=>'tv:live:nrj12'),
- 'LCP' => array('stream' => 'tvheadend:LCP', 'channel' => 13,'shield'=>'tv:live:lcp'),
- 'France 4' => array('stream' => 'tvheadend:France 4', 'channel' => 14,'shield'=>'tv:live:france4'),
- 'CStar' => array('stream' => 'tvheadend:CSTAR', 'channel' => 17,'shield'=>'tv:live:cstar'),
- 'Gulli' => array('stream' => 'tvheadend:Gulli', 'channel' => 18,'shield'=>'tv:live:gulli'),
- 'RMC Story' => array('stream' => 'tvheadend:RMC STORY', 'channel' => 23,'shield'=>'tv:live:rmcstory'),
- 'RMC Découverte' => array('stream' => 'tvheadend:RMC Découverte', 'channel' => 24,'shield'=>'tv:live:rmcdecouverte'),
- 'Chérie 25' => array('stream' => 'tvheadend:Chérie 25', 'channel' => 25,'shield'=>'tv:live:cherie25'),
- 'Paris première' => array('stream' => 'fbx:213:ld', 'channel' => 28,'shield'=>'tv:live:parispremiere'),
- 'RTL9' => array('stream' => 'fbx:210:ld', 'channel' => 29,'shield'=>'tv:live:rtl9'),
- '6ter' => array('stream' => 'tvheadend:6ter', 'channel' => 22,'shield'=>'tv:live:6ter'),
- 'TF1 Séries Films' => array('stream' => 'tvheadend:TF1 Séries Films', 'channel' => 20,'shield'=>'tv:live:tf1seriesfilms'),
+ 'TF1' => array('stream' => 'tvheadend:TF1', 'channel' => 1, 'shield' => 'mycanal:live:312'),
+ 'France 2' => array('stream' => 'tvheadend:France 2', 'channel' => 2, 'shield' => 'mycanal:live:26'),
+ 'France 3' => array('stream' => 'tvheadend:F3 Paris Ile-de-France', 'channel' => 3, 'shield' => 'mycanal:live:543'),
+ 'France 5' => array('stream' => 'tvheadend:France 5', 'channel' => 5, 'shield' => 'mycanal:live:545'),
+ 'M6' => array('stream' => 'tvheadend:M6', 'channel' => 6, 'shield' => 'mycanal:live:313'),
+ 'Canal +' => array('stream' => 'tvheadend:CANAL+', 'channel' => 4, 'shield' => 'mycanal:live:601'),
+ 'Arte' => array('stream' => 'tvheadend:Arte', 'channel' => 7, 'shield' => 'mycanal:live:154'),
+ 'C8' => array('stream' => 'tvheadend:C8', 'channel' => 8, 'shield' => 'mycanal:live:450'),
+ 'W9' => array('stream' => 'tvheadend:W9', 'channel' => 9, 'shield' => 'mycanal:live:296'),
+ 'TMC' => array('stream' => 'tvheadend:TMC', 'channel' => 10, 'shield' => 'mycanal:live:584'),
+ 'TFX' => array('stream' => 'tvheadend:TFX', 'channel' => 11, 'shield' => 'mycanal:live:570'),
+ 'NRJ12' => array('stream' => 'tvheadend:NRJ12', 'channel' => 12, 'shield' => 'mycanal:live:568'),
+ 'LCP' => array('stream' => 'tvheadend:LCP', 'channel' => 13, 'shield' => 'mycanal:live:554'),
+ 'France 4' => array('stream' => 'tvheadend:France 4', 'channel' => 14, 'shield' => 'mycanal:live:544'),
+ 'CStar' => array('stream' => 'tvheadend:CSTAR', 'channel' => 17, 'shield' => 'mycanal:live:513'),
+ 'Gulli' => array('stream' => 'tvheadend:Gulli', 'channel' => 18, 'shield' => 'mycanal:live:549'),
+ 'RMC Story' => array('stream' => 'tvheadend:RMC STORY', 'channel' => 23, 'shield' => 'mycanal:live:571'),
+ 'RMC Découverte' => array('stream' => 'tvheadend:RMC Découverte', 'channel' => 24, 'shield' => 'mycanal:live:595'),
+ 'Chérie 25' => array('stream' => 'tvheadend:Chérie 25', 'channel' => 25, 'shield' => 'mycanal:live:440'),
+ 'Paris première' => array('stream' => 'fbx:213:ld', 'channel' => 28, 'shield' => 'mycanal:live:294'),
+ 'RTL9' => array('stream' => 'fbx:210:ld', 'channel' => 29, 'shield' => 'mycanal:live:505'),
+ '6ter' => array('stream' => 'tvheadend:6ter', 'channel' => 22, 'shield' => 'mycanal:live:521'),
+ 'TF1 Séries Films' => array('stream' => 'tvheadend:TF1 Séries Films', 'channel' => 20, 'shield' => 'mycanal:live:526'),
'Monde',
- 'TV5 Monde' => array('stream' => 'fbx:206:sd', 'channel' => 1,'shield'=>'tv:live:tv5monde'),
- 'France 24' => array('stream' => 'tvheadend:France 24', 'channel' => 340,'shield'=>'tv:live:france24'),
- 'TVE I' => array('stream' => 'fbx:306:sd', 'channel' => 537,'shield'=>'tv:live:tvei'));
-
+ 'TV5 Monde' => array('stream' => 'fbx:206:sd', 'channel' => 1, 'shield' => 'mycanal:live:520'),
+ 'France 24' => array('stream' => 'tvheadend:France 24', 'channel' => 340, 'shield' => 'mycanal:live:310'),
+);
$shortcuts['sub-tv'] = array();
$tvplayer = config('TVPLAYER');
foreach ($tv as $name => $service) {
- if ($tvplayer != 'freebox' && isset($service['freebox'])) {
- continue;
- }
+
if (is_numeric($name)) {
$shortcuts['sub-tv'][] = array('type' => 'separator', 'label' => $service);
} else {
- if ($tvplayer == 'freebox') {
+ if ($tvplayer === 'shield') {
+ if (isset($service['shield'])) {
+ $e = explode(':', $service['shield'], 2);
+ $shortcuts['sub-tv'][] = array('type' => 'shield', 'url' => 'scripts/shield.php?' . $e[0] . '=' . $e[1], 'label' => $name);
+ }
+ } else if ($tvplayer == 'freebox') {
if (isset($service['channel'])) {
$shortcuts['sub-tv'][] = array('type' => 'freebox', 'url' => 'scripts/freeboxchannel.php?channel=' . $service['channel'], 'label' => $name);
} else {
};
$cmds[] = 'input keyevent ' . $key;
}
- shieldCommand('shell', '"' . implode(' && ', $cmds) . '"');
+ shieldCommand('shell', ' "' . implode(' && ', $cmds) . '"');
}
function shieldNetflix($id = null)
{
shieldHome();
$url = 'http://www.netflix.com/';
- if (null !== $id) {
+ if (null !== $id && $id !== 'home') {
$url .= 'watch/' . $id;
}
+ if ($id === 'home') {
+ shieldKill('netflix');
+ }
//_adb('shell am start', ' -c android.intent.category.LEANBACK_LAUNCHER -a android.intent.action.VIEW -f 0x10808000 -e source 30 -d ' . $url . ' com.netflix.ninja/.MainActivity');
_adb('shell am start', ' -c android.intent.category.LEANBACK_LAUNCHER -a android.intent.action.VIEW -f 0x10808000 -e source 30 -d ' . $url . ' com.netflix.ninja/.MainActivity');
+ if ($id === 'home') {
+ sleep(6);
+ shieldKey(['ok', 'down']);
+ }
}
_adb('shell am start', '-n ' . $activity);
}
-function shieldTv($channel = false, $type = 'live')
+function shieldMyCanal($channel = false, $type = 'live')
{
if ($type === 'replay') {
if ($channel === 'arte') {
}
}
- shieldHome();
- $url = 'mycanaltvlauncher://startapp';
- _adb('shell am start', '-a android.intent.action.VIEW -f 0x10808000 -d ' . $url . ' com.canal.android.canal/com.canal.ui.tv.TvMainActivity');
- sleep(1);
- $keys = ['left', 'left', 'left', 'left', 'left', 'left', 'up', 'up', 'up', 'up', 'up', 'up', 'down'];
-
- if ($type === 'live') {
- $keys = array_merge($keys, ['down', 'right', 'down']);
- if ($channel) {
- $keys = array_merge($keys, shieldGetKeysToTvChannel($channel));
-
- }
- } else if ($type === 'replay') {
- $keys = array_merge($keys, ['down', 'down', 'right', 'down', 'down']);
- if ($channel) {
- $keys = array_merge($keys, shieldGetKeysToReplayChannel($channel));
- }
- }
-
- shieldKey($keys);
+ $url = 'https://www.canalplus.com/live/?channel=' . $channel;
+ _adb('shell am start', '-a android.intent.action.VIEW -f 0x10808000 -d ' . $url . ' com.canal.android.canal/com.canal.app.common.legacy.DeepLinkActivity');
}
function shieldGetKeysToTvChannel($channel)
{
+ $favorites = ['tf1', 'france2', 'france3', 'arte', 'tv5monde', 'bfmtv', 'franceinfo', 'france24'];
+
$canalchannels = ['tf1', 'france2', 'france3', 'canalplus',
'france5', 'm6', 'arte', 'polarplus',
'warnertv', 'serieclub', 'tvbreizh', 'rtl9',
'lci', 'franceinfo', 'lcp', 'france24',
'euronews', 'cnn', 'bbcworldnews', 'bfmbusiness',
];
+ if (in_array($channel, $favorites)) {
+ return hieldGetKeysToChannel($channel, $channel, 4, ['ok']);
+ }
return shieldGetKeysToChannel($canalchannels, $channel, 4, ['ok']);
}
function shieldFindIntents($app)
{
shieldConnect();
- $apps = ['kodi' => 'org.xbmc.kodi', 'vlc' => 'org.videolan.vlc', 'netflix' => 'com.netflix.ninja', 'mycanal' => 'com.canal.android.canal', 'arte' => 'tv.arte.plus7', 'francetv' => 'fr.francetv.pluzz'];
- $app = $apps[$app];
+
+ $app = shieldGetAppId($app);
_adb('shell pm dump', $app);
_adb('shell pm dump', $app . ' | grep -A 1 "MAIN" | grep ' . $app . ' | awk \'{print $2}\' | grep ' . $app);
}
+function shieldGetAppId($id = null)
+{
+ $apps = ['kodi' => 'org.xbmc.kodi', 'vlc' => 'org.videolan.vlc', 'netflix' => 'com.netflix.ninja', 'mycanal' => 'com.canal.android.canal', 'arte' => 'tv.arte.plus7', 'francetv' => 'fr.francetv.pluzz'];
+ if (null === $id) {
+ return $apps;
+ }
+ if (isset($apps[$id])) {
+ return $apps[$id];
+ }
+ return $id;
+}
+
function shieldHome()
{
$res = shieldKey('home');
return $res;
}
-function shieldKill()
+function shieldKill($app)
{
shieldConnect();
- $tokill = ['com.canal.android.canal'];
- foreach ($tokill as $item) {
- _adb('shell am', 'force-stop ' . $item);
- }
+ _adb('shell am', 'force-stop ' . shieldGetAppId($app));
}