<project version="4">
<component name="ChangeListManager">
<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
+ <change afterPath="$PROJECT_DIR$/scripts/netflix.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/config/remote.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/remote.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/freeboxchannel.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/freeboxchannel.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/bricks.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/bricks.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/freebox.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/freebox.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/mediarasp.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/mediarasp.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/remoteinfos.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/remoteinfos.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" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/tmdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/tmdb.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/style/style.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.css" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/style/style.less" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.less" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<workItem from="1603811262372" duration="1988000" />
<workItem from="1603958541180" duration="5032000" />
<workItem from="1604042543878" duration="11137000" />
- <workItem from="1604152329376" duration="23940000" />
- </task>
- <task id="LOCAL-00311" summary=".">
- <created>1583566913948</created>
- <option name="number" value="00311" />
- <option name="presentableId" value="LOCAL-00311" />
- <option name="project" value="LOCAL" />
- <updated>1583566913949</updated>
- </task>
- <task id="LOCAL-00312" summary=".">
- <created>1583567632871</created>
- <option name="number" value="00312" />
- <option name="presentableId" value="LOCAL-00312" />
- <option name="project" value="LOCAL" />
- <updated>1583567632871</updated>
+ <workItem from="1604152329376" duration="35013000" />
</task>
<task id="LOCAL-00313" summary=".">
<created>1583689851384</created>
<option name="project" value="LOCAL" />
<updated>1604228663244</updated>
</task>
- <option name="localTasksCounter" value="360" />
+ <task id="LOCAL-00360" summary=".">
+ <created>1604237429974</created>
+ <option name="number" value="00360" />
+ <option name="presentableId" value="LOCAL-00360" />
+ <option name="project" value="LOCAL" />
+ <updated>1604237429974</updated>
+ </task>
+ <task id="LOCAL-00361" summary=".">
+ <created>1604237480617</created>
+ <option name="number" value="00361" />
+ <option name="presentableId" value="LOCAL-00361" />
+ <option name="project" value="LOCAL" />
+ <updated>1604237480617</updated>
+ </task>
+ <option name="localTasksCounter" value="362" />
<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="1604228652265">
+ <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1604237478231">
<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="1604228652265" />
+ <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1604237478231" />
<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">
<screen x="0" y="0" width="1707" height="920" />
</state>
<state x="635" y="216" key="FileChooserDialogImpl/0.0.1707.920@0.0.1707.920" timestamp="1604227698339" />
- <state x="1114" y="443" key="NewPhpFileDialog" timestamp="1603958673068">
- <screen x="0" y="0" width="2560" height="1040" />
+ <state x="743" y="392" key="NewPhpFileDialog" timestamp="1604238041494">
+ <screen x="0" y="0" width="1707" height="920" />
</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="1603958673068" />
<state x="781" y="165" key="SettingsEditor" timestamp="1596008871908">
<screen x="0" y="0" width="2560" height="1040" />
<screen x="0" y="0" width="1707" height="920" />
</state>
<state x="512" y="211" key="run.anything.popup/0.0.1707.920@0.0.1707.920" timestamp="1604146410464" />
- <state x="90" y="196" width="672" height="678" key="search.everywhere.popup" timestamp="1604043317166">
+ <state x="90" y="196" width="672" height="678" key="search.everywhere.popup" timestamp="1604252585347">
<screen x="0" y="0" width="1707" height="920" />
</state>
- <state x="90" y="196" width="672" height="678" key="search.everywhere.popup/0.0.1707.920@0.0.1707.920" timestamp="1604043317166" />
+ <state x="90" y="196" width="672" height="678" key="search.everywhere.popup/0.0.1707.920@0.0.1707.920" timestamp="1604252585347" />
+ </component>
+ <component name="XDebuggerManager">
+ <breakpoint-manager>
+ <breakpoints>
+ <line-breakpoint enabled="true" type="php">
+ <url>file://$PROJECT_DIR$/scripts/lib/freebox.php</url>
+ <option name="timeStamp" value="2" />
+ </line-breakpoint>
+ </breakpoints>
+ </breakpoint-manager>
</component>
<component name="antWorkspaceConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
['type' => 'remote-channels', 'width' => 1, 'height' => 3, 'top' => 0, 'left' => 5],
]];
-$bricksShield = ['type' => 'freebox', 'width' => 6, 'height' => 4, 'bricks' => [
+$bricksShield = ['type' => 'shield', 'width' => 4, 'height' => 4, 'bricks' => [
['type' => 'remote-volume', 'width' => 1, 'height' => 3, 'top' => 1, 'left' => 0],
['type' => 'remote-rew', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 0],
['type' => 'remote-playpause', 'width' => 2, 'height' => 1, 'top' => 0, 'left' => 1],
- ['type' => 'remote-rec', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 4],
- ['type' => 'remote-light-up', 'width' => 1, 'height' => 1, 'top' => 1, 'left' => 4],
- ['type' => 'remote-light-down', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 4],
+ ['type' => 'remote-light-down', 'width' => 1, 'height' => 1, 'top' => 1, 'left' => 3],
['type' => 'remote-fwd', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 3],
- ['type' => 'remote-free', 'width' => 2, 'height' => 1, 'top' => 3, 'left' => 4],
['type' => 'remote-up', 'width' => 1, 'height' => 1, 'top' => 1, 'left' => 2],
['type' => 'remote-left', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 1],
['type' => 'remote-down', 'width' => 1, 'height' => 1, 'top' => 3, 'left' => 2],
['type' => 'remote-right', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 3],
- ['type' => 'remote-red', 'width' => 1, 'height' => 1, 'top' => 1, 'left' => 1],
- ['type' => 'remote-blue', 'width' => 1, 'height' => 1, 'top' => 1, 'left' => 1 + 2],
- ['type' => 'remote-green', 'width' => 1, 'height' => 1, 'top' => 1 + 2, 'left' => 1],
- ['type' => 'remote-yellow', 'width' => 1, 'height' => 1, 'top' => 1 + 2, 'left' => 1 + 2],
- ['type' => 'remote-ok', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 2],
- ['type' => 'remote-channels', 'width' => 1, 'height' => 3, 'top' => 0, 'left' => 5],
+ ['type' => 'remote-shield-back', 'width' => 1, 'height' => 1, 'top' => 1, 'left' => 1],
+ ['type' => 'remote-shield-menu', 'width' => 1, 'height' => 1, 'top' => 1 + 2, 'left' => 1],
+ ['type' => 'remote-shield-home', 'width' => 1, 'height' => 1, 'top' => 1 + 2, 'left' => 1 + 2],
+ ['type' => 'remote-shield-ok', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 2],
]];
$bricksSqueezebox = ['type' => 'squeezebox', 'width' => 6, 'height' => 4, 'bricks' => [
if (isset($service['channel'])) {
$shortcuts['sub-tv'][] = array('type' => 'freebox', 'url' => 'scripts/freeboxchannel.php?channel=' . $service['channel'], 'label' => $name);
} else {
- $shortcuts['sub-tv'][] = array('type' => 'freebox', 'url' => 'scripts/freeboxchannel.php?menu=' . $service['freebox'], 'label' => $name);
+ $shortcuts['sub-tv'][] = array('type' => 'freebox', 'url' => 'scripts/freeboxchannel.php?channel=' . $service['freebox'], 'label' => $name);
}
} else {
$e = explode(':', $service['stream'], 3);
<?php
require_once "import.php";
-$currentActivity = getCurrentHarmonyActivity();
-harmonyActivity('tv');
-if (isset($_GET['channel'])) {
- $commands = array_merge(['ok', 'pause=5'], str_split((string)$_GET['channel']));
-} else if (isset($_GET['menu']) && $_GET['menu'] == 'replay') {
- $commands = ['right', 'ok', 'pause=5', 'down', 'down', 'down', 'down', 'down'];
-} else if (isset($_GET['menu']) && $_GET['menu'] == 'netflix') {
- $commands = ['right', 'down', 'down', 'down', 'ok', 'pause=25', 'ok', 'pause=5', 'down'];
-}
-$keys = array_merge(array('home', 'pause=2', 'home', 'pause=1', 'home', 'left', 'right', 'home'), $commands);
-
-if ($currentActivity != 'tv') {
- sleep(50);
-}
-print_r($keys);
-freeboxKey($keys);
+freeboxChannel($_GET['channel']);
return _fullBrickButton('search', 'blue', 'background-color:#0F49A8;color:#fff;');
}
+function getRemoteShieldHomeBrick($brick)
+{
+ return _fullBrickButton('home', 'home', 'background-color:#0F49A8;color:#fff;');
+}
+
function getRemoteYellowBrick($brick)
{
return _fullBrickButton('info-circle', 'yellow', 'background-color:#fc0;color:#fff;');
return _fullBrickButton('bars', 'green', 'background-color:#00B233;color:#fff;');
}
+function getRemoteShieldMenuBrick($brick)
+{
+ return _fullBrickButton('bars', 'menu', 'background-color:#00B233;color:#fff;');
+}
+
+function getRemoteShieldBackBrick($brick)
+{
+ return _fullBrickButton('backspace', 'back', 'background-color:#c00;color:#fff;');
+}
+
function getRemoteRedBrick($brick)
{
return _fullBrickButton('backspace', 'red', 'background-color:#c00;color:#fff;');
return _fullCustomBrickButton('OK', 'select', '', 'arrow');
}
+function getRemoteShieldOkBrick($brick)
+{
+ return _fullBrickButton('circle', 'ok', '','fas','arrow');
+}
+
function getRemoteTimelineBrick($brick)
{
$res = '<div class="remote-timeline"><div class="timeline-time">00:00</div><div class="timeline-progressbar"><div class="timeline-cursor"></div></div><div class="timeline-duration">00:00</div></div>';
return ['class' => $class, 'content' => '<a class="fullbrickbutton" style="' . $style . '" data-remote-command="' . $command['command'] . '"' . $long . ' href="#">' . $content . '</a>'];
}
-function _fullBrickButton($icon, $command, $style = "", $iconstyle = 'fas')
+function _fullBrickButton($icon, $command, $style = "", $iconstyle = 'fas',$class='')
{
if (!is_array($command)) {
$command = ['command' => $command];
if (isset($command['long'])) {
$long = ' data-remote-command-long="' . $command['long'] . '"';
}
- return '<a class="fullbrickbutton" style="' . $style . '" data-remote-command="' . $command['command'] . '"' . $long . ' href="#"><i class="' . $iconstyle . ' fa-' . $icon . '"></i></a>';
+ return ['class'=>$class,'content'=>'<a class="fullbrickbutton '.$class.'" style="' . $style . '" data-remote-command="' . $command['command'] . '"' . $long . ' href="#"><i class="' . $iconstyle . ' fa-' . $icon . '"></i></a>'];
}
function _fullArrowBrickButton($icon, $command, $style = "")
<?php
+function freeboxChannel($channel)
+{
+ if (config('DEVICE') === 'salon') {
+ $currentActivity = getCurrentHarmonyActivity();
+ harmonyActivity('tv');
+ }
+ if ($channel === 'replay') {
+ $commands = ['right', 'ok', 'pause=5', 'down', 'down', 'down', 'down', 'down'];
+ } elseif ($channel === 'netflix') {
+ $commands = ['right', 'down', 'down', 'down', 'ok', 'pause=25', 'ok', 'pause=5', 'down'];
+ } else {
+ $commands = array_merge(['ok', 'pause=5'], str_split((string)$channel));
+ }
+ $keys = array_merge(array('home', 'pause=2', 'home', 'pause=1', 'home', 'left', 'right', 'home'), $commands);
+
+ if (config('DEVICE') === 'salon') {
+ if ($currentActivity != 'tv') {
+ sleep(50);
+ }
+ }
+ print_r($keys);
+ freeboxKey($keys);
+}
+
function freeboxKey($keys, $long = false)
{
foreach ($keys as $key) {
} elseif ($s['type'] == 'media') {
$attrs['href'] = isset($s['path']) ? $s['path'] : $s['url'];
$attrs['class'] = 'media';
- } elseif ($s['type'] == 'freebox' || $s['type']==='shield') {
+ } elseif ($s['type'] == 'freebox' || $s['type'] === 'shield' || $s['type'] === 'netflix') {
$attrs['href'] = $s['url'];
- $attrs['class'] = 'ajax';
+ $attrs['class'] = 'ajax play';
$attrs['data-remote'] = "1";
} else if ($s['type'] == 'map') {
$rand = rand(1, 1000000);
return true;
}
- if ($device == 'salon') {
+ if ((($p === 'netflix' || $p === 'tv') && config('TVPLAYER') === 'shield') || config('VIDEOPLAYER') === 'shield') {
+ return shieldRemoteCommand($cmd,$device);
+ } else if ($device == 'salon') {
switch (getCurrentHarmonyActivity()) {
case 'media':
return remoteCmdMedia($cmd, $device);
if (!isAlive('bureau')) {
sleep(60);
}
- irsend('bureau', 'Projector', 'PowerOn');
+ //irsend('bureau', 'Projector', 'PowerOn');
sshRunCommand('/usr/local/bin/soundtohdmi', 'bureau', true, true);
} else if ($device == 'sdb') {
execScene('sdb/ampli/on');
function VLCPlay($fileorstream, $device = null, $timeout = 5)
{
$device = getDevice($device);
- VLCCmd(['command' => 'pl_empty'], $device, $timeout);
- if (file_exists($fileorstream)) {
- $fileorstream = 'file://' . $fileorstream;
- }
- echo $fileorstream;
- if ($device === 'bureau') {
- sshCommand('/usr/local/bin/soundtohdmi', $device, true, true);
+ if (config('VIDEOPLAYER') === 'shield') {
+ return shieldKodi($fileorstream);
+ } else {
+ VLCCmd(['command' => 'pl_empty'], $device, $timeout);
+ if (file_exists($fileorstream)) {
+ $fileorstream = 'file://' . $fileorstream;
+ }
+ echo $fileorstream;
+ if ($device === 'bureau') {
+ sshCommand('/usr/local/bin/soundtohdmi', $device, true, true);
+ }
+ return VLCCmd(['command' => 'in_play', 'input' => $fileorstream], $device, $timeout);
}
- return VLCCmd(['command' => 'in_play', 'input' => $fileorstream], $device, $timeout);
}
$p = $e[0];
if ($p == 'squeezebox') {
$res = squeezeboxRemoteInfos();
- } else if ($p == 'mediarasp') {
- $res = mediaraspRemoteInfos();
} else {
- $res = ['type' => $p, 'can_seek' => false];
+ if (($p === 'netflix' || $p === 'tv') && config('TVPLAYER') === 'shield') {
+ $res = ['type' => 'shield', 'can_seek' => false];
+ }else {
+ if ($p == 'mediarasp') {
+ if(config('VIDEOPLAYER')==='shield'){
+ $res = ['type' => 'shield', 'can_seek' => false];
+ }else {
+ $res = mediaraspRemoteInfos();
+ }
+ } else {
+ $res = ['type' => $p, 'can_seek' => false];
+ }
+ }
}
$res['playing'] = $playing;
$res['device'] = config('DEVICE');
global $shieldConnect;
if (!$shieldConnect) {
$shieldConnect = true;
- _adb('connect', SHIELD_HOST);
+ //_adb('connect', SHIELD_HOST);
}
}
shieldCommand('shell', 'input text ' . $text);
}
-function shieldKey($keys)
+function shieldKey($keys, $device = true)
{
- $map = ['right' => 'KEYCODE_DPAD_RIGHT',
+ $map = [
'up' => 'KEYCODE_DPAD_UP',
+ 'direction-up' => 'KEYCODE_DPAD_UP',
'left' => 'KEYCODE_DPAD_LEFT',
+ 'direction-left' => 'KEYCODE_DPAD_LEFT',
+ 'right' => 'KEYCODE_DPAD_RIGHT',
+ 'direction-right' => 'KEYCODE_DPAD_RIGHT',
'down' => 'KEYCODE_DPAD_DOWN',
+ 'direction-down' => 'KEYCODE_DPAD_DOWN',
'wakeup' => 'KEYCODE_WAKEUP',
'sleep' => 'KEYCODE_SLEEP',
'enter' => 'KEYCODE_ENTER',
'ok' => 'KEYCODE_ENTER',
+ 'select' => 'KEYCODE_ENTER',
'back' => 'KEYCODE_BACK',
'home' => 'KEYCODE_HOME',
- 'play' => 'KEYCODE_MEDIA_PLAY',
- 'pause' => 'KEYCODE_MEDIA_PAUSE',
+ 'pause' => 'KEYCODE_MEDIA_PLAY_PAUSE',
'stop' => 'KEYCODE_MEDIA_STOP',
'space' => 'KEYCODE_SPACE',
+ 'rewind' => 'KEYCODE_MEDIA_REWIND',
+ 'fast-rewind' => 'KEYCODE_MEDIA_REWIND',
+ 'forward' => 'KEYCODE_MEDIA_FAST_FORWARD',
+ 'fast-forward' => 'KEYCODE_MEDIA_FAST_FORWARD',
+ 'volume-up' => 'KEYCODE_VOLUME_UP',
+ 'volume-down' => 'KEYCODE_VOLUME_DOWN',
+ 'volume-mute' => 'KEYCODE_VOLUME_MUTE',
];
if (!is_array($keys)) {
$keys = [$keys];
shieldCommand('shell', ' "' . implode(' && ', $cmds) . '"');
}
-function shieldNetflix($id = null)
+function shieldNetflix($id = null, $device = null)
{
shieldHome();
+ sleep(1);
+
$url = 'http://www.netflix.com/';
if (null !== $id && $id !== 'home') {
$url .= 'watch/' . $id;
}
+
+ setPlaying('netflix', $device);
if ($id === 'home') {
shieldKill('netflix');
}
}
}
+function shieldRemoteCommand($cmd, $device = null)
+{
+ shieldKey([$cmd], $device);
+ return true;
+}
function shieldTVCommand($cmd)
{
_adb('shell am start', '-n ' . $activity);
}
-function shieldMyCanal($channel = false, $type = 'live')
+function shieldMyCanal($channel = false, $type = 'live', $device = null)
{
+ setPlaying('mycanal', $device);
if ($type === 'replay') {
if ($channel === 'arte') {
return shieldArte();
} else if ($channel === 'francetv') {
return shieldFranceTv();
}
- }
-
- $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');
-}
-
+ $url = 'https://www.canalplus.com/chaines/';
+ if ($channel !== 'home') {
+ $url += $channel;
+ }
+ } else if ($type === 'live') {
-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',
- 'ab1', 'novelas', 'tf1seriesfilms', 'infosportplus',
- 'eurosport1', 'eurosport2', 'automoto', 'equidia',
- 'lequipetv', 'comedieplus', 'olympiatv', 'nonstoppeople',
- 'parispremiere', 'teva', 'bet', 'c8',
- 'w9', 'tmc', 'tfx', 'nrj12',
- 'cstar', '6ter', 'rmcstory', 'cherie25',
- 'tv5monde', 'planeteplus', 'planetepluscrime', 'planeteplusae',
- 'voyage', 'museumtv', 'nationalgeographic', 'nationalgeographicwild',
- '', '', '', '',
- 'rmcdecouverte', '', '', '',
- '', '', '', '',
- '', '', '', '',
- '', 'france4', 'gulli', '',
- '', '', '', '',
- '', '', '', '',
- '', 'lachainemeteo', 'cnews', 'bfmtv',
- 'lci', 'franceinfo', 'lcp', 'france24',
- 'euronews', 'cnn', 'bbcworldnews', 'bfmbusiness',
- ];
- if (in_array($channel, $favorites)) {
- return hieldGetKeysToChannel($channel, $channel, 4, ['ok']);
+ $url = 'https://www.canalplus.com/live/?channel=' . $channel;
}
- return shieldGetKeysToChannel($canalchannels, $channel, 4, ['ok']);
+ setPlaying('mycanal', $device);
+ _adb('shell am start', '-a android.intent.action.VIEW -f 0x10808000 -d ' . $url . ' com.canal.android.canal/com.canal.app.common.legacy.DeepLinkActivity');
}
-function shieldGetKeysToReplayChannel($channel)
+function shieldKodi($file)
{
-
- $replaychannels = ['tf1', 'france2', 'france3', 'france5', 'm6',
- 'arte', 'polarplus', 'warnertv', 'serieclub', 'hello',
- 'tvbreizh', 'rtl9', 'ab1', 'novelas', 'eurosport',
- 'automoto', 'equidia', 'comedieplus', 'olympiatv', 'nonstoppeople',
- 'parispremiere', 'teva', 'bet', 'c8', 'w9',
- 'cstar', '6ter', 'planeteplus', 'voyage', 'museumtv',
- 'nationalgeographic', 'nationalgeographicwild', '', '', '',
- 'rmcdecouverte', '', '', '', '',
- '', '', '', '', '',
- '', '', '', 'france4', 'gulli',
-
- ];
- return shieldGetKeysToChannel($replaychannels, $channel, 5, ['ok']);
+ shieldHome();
+ _adb('shell am start', '-a android.intent.action.VIEW -d \'"' . shieldNormalizeURL($file) . '"\' -n org.xbmc.kodi/.Splash');
}
-function shieldGetKeysToChannel($list, $channel, $perline = 4, $sendAfter = [])
+function shieldNormalizeURL($input)
{
- $res = [];
- $index = array_search($channel, $list);
- if ($index === false) {
- return $res;
- }
-
- $col = $index % $perline;
- $lines = ($index - $col) / $perline;
-
- for ($i = 0; $i < $lines; $i++) {
- $res[] = 'down';
- }
- for ($i = 0; $i < $col; $i++) {
- $res[] = 'right';
+ if (strpos($input, '/nas') === 0) {
+ $input = str_replace('/nas/', '/', $input);
+ return 'smb://Share:dcfyjbcyckwydtgufjx@192.168.13.4/Share/' . $input;
}
- $res[] = array_merge($res, $sendAfter);
- return $res;
-}
-
-function shieldKodi($file)
-{
- shieldHome();
- $url = 'smb://Share:dcfyjbcyckwydtgufjx@192.168.13.4/Share/' . $file;
- _adb('shell am start', '-a android.intent.action.VIEW -d \'"' . $url . '"\' -n org.xbmc.kodi/.Splash');
+ return $input;
}
function shieldVLC($file)
{
shieldHome();
$url = 'smb://Share:dcfyjbcyckwydtgufjx@192.168.13.4/Share/' . $file;
- _adb('shell am start', '-a android.intent.action.VIEW -d \'"' . $url . '"\' -n org.videolan.vlc/.StartActivity');
+ _adb('shell am start', '-a android.intent.action.VIEW -d \'"' . shieldNormalizeURL($file) . '"\' -n org.videolan.vlc/.StartActivity');
}
function shieldListApps()
$e = explode(':', $tvShow['dir']);
if ($e[0] === 'netflix') {
- $res['shortcuts'][] = ['label' => $tvShow['data']['name'], 'type' => 'media', 'path' => $tvShow['dir'], 'poster' => $this->_poster($tvShow['data']['poster_path'])];
+ $res['shortcuts'][] = ['label' => $tvShow['data']['name'], 'type' => 'netflix', 'url' => '/scripts/netflix.php?id='.$e[1], 'poster' => $this->_poster($tvShow['data']['poster_path'])];
return;
}
--- /dev/null
+<?php
+
+require_once 'import.php';
+if (config('TVPLAYER') === 'shield') {
+ shieldNetflix($_GET['id'] ?? 'home');
+} else if (config('TVPLAYER') === 'freebox') {
+ freeboxChannel('netflix');
+}
\ No newline at end of file
z-index: 100;
color: #fff;
text-shadow: 1px 1px rgba(0, 0, 0, 0.5);
- margin: 0.05em 0;
+ margin: 0.2em 0;
}
header a .fa-tv {
-webkit-transform: scaleX(0.85);
font-weight: 400;
}
section .col > *.media:after,
-section .col > *.music:after {
+section .col > *.music:after,
+section .col > *.shield:after,
+section .col > *.netflix:after,
+section .col > *.play:after {
position: absolute;
content: "\f04b";
font-family: Font Awesome\ 5 Pro;
}
}
- &.media, &.music {
+ &.media, &.music, &.shield, &.netflix, &.play {
&:after {
position: absolute;
content: "\f04b";