From 9b97f08275f7ae2e56f129cfb8fafdb9ec979c07 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 25 Mar 2026 12:13:35 +0100 Subject: [PATCH] . --- .idea/workspace.xml | 16 ++++++--- config/bureau.php | 1 - config/lit.php | 2 -- config/remote.php | 39 --------------------- config/sdb.php | 2 -- js/home.js | 44 ------------------------ scripts/lib/lib.php | 1 - scripts/lib/remoteinfos.php | 67 +++---------------------------------- scripts/mediarasp.php | 22 ------------ style/remote.less | 25 -------------- style/style.css | 19 ----------- 11 files changed, 16 insertions(+), 222 deletions(-) delete mode 100644 scripts/mediarasp.php diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a83b2bd..70c1310 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -6,9 +6,15 @@ - - - + + + + + + + + + diff --git a/config/bureau.php b/config/bureau.php index 93e88fc..af6c292 100644 --- a/config/bureau.php +++ b/config/bureau.php @@ -2,7 +2,6 @@ config('ROOM_NAME', 'Bureau'); config('ROOM', 'bureau'); config('SQUEEZEBOX_PLAYER', 'Bureau'); -config('VIDEOPLAYER', 'mediarasp'); config('VOLUME_DEVICE', 'harmony'); config('VOLUME_STEP', 3); config('SLEEPTYPE', 'screensaver'); diff --git a/config/lit.php b/config/lit.php index 0ba1cd4..533ec84 100644 --- a/config/lit.php +++ b/config/lit.php @@ -1,8 +1,6 @@ 'squeezebox', 'width' => 6, 'height' => 4, 'brick ['type' => 'remote-light-down', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 5], ]]; -$bricksMediarasp = ['type' => 'mediarasp', 'width' => 7, 'height' => 4, 'bricks' => [ - ['type' => 'remote-volume', 'width' => 1, 'height' => 3, 'top' => 0, 'left' => 0], - ['type' => 'remote-subtitles', 'width' => 1, 'height' => 3, 'top' => 0, 'left' => 6], - ['type' => 'remote-rew', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 1], - ['type' => 'remote-playpause', 'width' => 2, 'height' => 1, 'top' => 0, 'left' => 2], - ['type' => 'remote-fwd', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 4], - ['type' => 'remote-stop', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 5], - ['type' => 'remote-infos', 'width' => 4, 'height' => 2, 'top' => 1, 'left' => 1], - ['type' => 'remote-light-up', 'width' => 1, 'height' => 1, 'top' => 1, 'left' => 5], - ['type' => 'remote-light-down', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 5], - ['type' => 'remote-timeline', 'width' => 7, 'height' => 1, 'top' => 3, 'left' => 0], -]]; - -$bricksRaspberryCast = ['type' => 'raspberrycast', 'width' => 6, 'height' => 4, 'bricks' => [ - ['type' => 'remote-volume', 'width' => 1, 'height' => 3, 'top' => 0, 'left' => 0], - ['type' => 'remote-rew', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 1], - ['type' => 'remote-playpause', 'width' => 2, 'height' => 1, 'top' => 0, 'left' => 2], - ['type' => 'remote-fwd', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 4], - ['type' => 'remote-stop', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 5], - ['type' => 'remote-infos', 'width' => 4, 'height' => 2, 'top' => 1, 'left' => 1], - ['type' => 'remote-light-up', 'width' => 1, 'height' => 1, 'top' => 1, 'left' => 5], - ['type' => 'remote-light-down', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 5], - ['type' => 'remote-timeline', 'width' => 6, 'height' => 1, 'top' => 3, 'left' => 0], -]]; - -$bricksOMXRaspTV = ['type' => 'omxtv', 'width' => 6, 'height' => 4, 'bricks' => [ - ['type' => 'remote-volume', 'width' => 1, 'height' => 3, 'top' => 0, 'left' => 0], - ['type' => 'remote-rew', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 1], - ['type' => 'remote-playpause', 'width' => 2, 'height' => 1, 'top' => 0, 'left' => 2], - ['type' => 'remote-fwd', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 4], - ['type' => 'remote-stop', 'width' => 1, 'height' => 1, 'top' => 0, 'left' => 5], - ['type' => 'remote-pip', 'width' => 4, 'height' => 2, 'top' => 1, 'left' => 1], - ['type' => 'remote-light-up', 'width' => 1, 'height' => 1, 'top' => 1, 'left' => 5], - ['type' => 'remote-light-down', 'width' => 1, 'height' => 1, 'top' => 2, 'left' => 5], - ['type' => 'remote-timeline', 'width' => 6, 'height' => 1, 'top' => 3, 'left' => 0], -]]; $shortcuts['remote-squeezebox'] = [['type' => 'bricks', 'bricks' => $bricksSqueezebox]]; -$shortcuts['remote-raspberrycast'] = [['type' => 'bricks', 'bricks' => $bricksRaspberryCast]]; -$shortcuts['remote-mediarasp'] = [['type' => 'bricks', 'bricks' => $bricksMediarasp]]; $shortcuts['remote-freebox'] = [['type' => 'bricks', 'bricks' => $bricksFreebox]]; -$shortcuts['remote-omxtv'] = [['type' => 'bricks', 'bricks' => $bricksOMXRaspTV]]; $shortcuts['remote-shield'] = [['type' => 'bricks', 'bricks' => $bricksShield]]; $shortcuts['remote-shieldmedia'] = [['type' => 'bricks', 'bricks' => $bricksShieldMedia]]; \ No newline at end of file diff --git a/config/sdb.php b/config/sdb.php index 5546b47..fe32823 100644 --- a/config/sdb.php +++ b/config/sdb.php @@ -6,8 +6,6 @@ config('SLEEPSCREEN', 30); config('SCREENSAVER_BRIGHTNESS', 100); config('SLEEPTYPE', 'screensaver'); config('SCREENSAVER', 'weatherstation'); -config('VIDEOPLAYER', 'mediarasp-small'); -config('TVPLAYER', 'mediarasp-small'); config('VOLUME', 60); config('VOLUME_DEVICE', 'Squeezebox'); config('VOLUME_STEP', 3); diff --git a/js/home.js b/js/home.js index f67c476..4495737 100644 --- a/js/home.js +++ b/js/home.js @@ -216,36 +216,6 @@ $(function () { return false; }); - $(document).on(clickevent, '.media', function () { - displayLoader($(this)); - if (CONFIG.VIDEOPLAYER === 'mediarasp-small') { - stopSqueeze(); - screenOn(true); - resize(); - videoPlaying = true; - $("#scrollholder").scrollLeft(0); - screenOn(true); - } - - var href = $(this).attr('href'); - var attr; - if (href.indexOf('://') === -1) { - attr = '&file=' + encodeURIComponent('/nas' + href); - } else { - attr = '&url=' + encodeURIComponent(href); - } - if (CONFIG.VIDEOPLAYER === 'mediarasp-small') { - attr += '&small=1'; - } - - $.get('/scripts/mediarasp.php?action=play&device=' + CONFIG.VIDEOPLAYER_DEVICE + attr, function () { - window.location = '#/section/remote'; - hideLoader(); - }).fail(function () { - hideLoader(); - }); - return false; - }); $(document).on(clickevent, '.harmonyactivity', function () { displayLoader($(this)); @@ -257,18 +227,6 @@ $(function () { return false; }); - $(document).on(clickevent, '.raspberrycast', function () { - var url = window.prompt('Entrer l\'URL de la vidéo', ''); - if (url == null || url == '') { - return false; - } - - $.get('/scripts/mediarasp.php?action=play&device=' + CONFIG.DEVICE + '&cast=' + encodeURIComponent(url), function () { - window.location = '#/section/remote' - }); - return false; - }); - $(document).on(clickevent, '[data-screenoff]', function () { screenOff(); return true; @@ -991,8 +949,6 @@ function updateRemote() { function getRemoteUpdateTime(data) { if (!data) { return 1000; - } else if (data.type === 'mediarasp') { - return 5000; } else if (data.type === 'squeezebox') { return 2000; } diff --git a/scripts/lib/lib.php b/scripts/lib/lib.php index 1982403..3cc12cc 100644 --- a/scripts/lib/lib.php +++ b/scripts/lib/lib.php @@ -15,7 +15,6 @@ require_once ROOT . '/scripts/lib/hue.php'; require_once ROOT . '/scripts/lib/harmony.php'; require_once ROOT . '/scripts/lib/scenes.php'; require_once ROOT . '/scripts/lib/squeezebox.php'; -require_once ROOT . '/scripts/lib/mediarasp.php'; require_once ROOT . '/scripts/lib/http.php'; require_once ROOT . '/scripts/lib/pc.php'; require_once ROOT . '/scripts/lib/time.php'; diff --git a/scripts/lib/remoteinfos.php b/scripts/lib/remoteinfos.php index a50a57b..c4041b7 100644 --- a/scripts/lib/remoteinfos.php +++ b/scripts/lib/remoteinfos.php @@ -18,17 +18,14 @@ function remoteInfos() $res = squeezeboxRemoteInfos(); } else { if (config('TVPLAYER') === 'shield') { - $res = ['type' => 'shield', 'can_seek' => false]; + $res = ['type' => 'shield', 'can_seek' => false]; } else { - if (($p === 'netflix' || $p === 'tv' || $p==='amazonprime') && config('TVPLAYER') === 'shield') { + if (($p === 'netflix' || $p === 'tv' || $p === 'amazonprime') && config('TVPLAYER') === 'shield') { $res = ['type' => 'shield', 'can_seek' => false]; } else { - if ($p == 'mediarasp' || $p === 'shieldmedia') { - if (config('VIDEOPLAYER') === 'shield') { - $res = ['type' => 'shieldmedia', 'can_seek' => false]; - } else { - $res = mediaraspRemoteInfos(); - } + if ($p === 'shieldmedia') { + $res = ['type' => 'shieldmedia', 'can_seek' => false]; + } else { $res = ['type' => $p, 'can_seek' => false]; } @@ -63,54 +60,9 @@ function remoteProgress($progress) $p = $e[0]; if ($p == 'squeezebox') { return squeezeboxRemoteProgress($progress); - } else if ($p == 'mediarasp') { - return mediaraspRemoteProgress($progress); } } -function mediaraspRemoteInfos() -{ - global $directories; - - $res['type'] = 'mediarasp'; - $res['can_seek'] = false; - $res['duration'] = ''; - $res['time'] = ''; - $res['title'] = ''; - $res['artwork'] = ''; - $res['status'] = ''; - - $d = getDevice(); - $playlist = simplexml_load_string(VLCCmd(['query' => 'requests/playlist.xml'], $d)); - $s = (string)VLCCmd(['query' => 'requests/status.xml'], $d); - $status = simplexml_load_string($s); - - $leaf = $playlist->xpath('//leaf[@current="current"]'); - if (count($leaf) > 0) { - $source = str_replace('file://', '', (string)$leaf[0]['uri']); - } else { - return $res; - } - - $res['can_seek'] = true; - $res['duration'] = intval((string)$status->xpath('//length')[0]); - $res['time'] = intval((string)$status->xpath('//time')[0]); - $res['status'] = $s; - - $playing = getPlaying(); - $e = explode(':', $playing, 3); - - if (count($e) === 3 && $e[0] === 'mediarasp' && $e[1] === 'cast') { - $meta = getYoutubeDLMeta($e[2]); - $res['title'] = $meta['title']; - $res['artwork'] = $meta['thumbnail']; - } else { - $res = array_merge($res, getTitleAndArtwork($source)); - } - - return $res; -} - function getTitleAndArtwork($source) { global $directories; @@ -181,12 +133,3 @@ function squeezeboxRemoteProgress($progress) } return $infos; } - -function mediaraspRemoteProgress($progress) -{ - $infos = mediaraspRemoteInfos(); - $infos['time'] = $progress * $infos['duration']; - - VLCCmd(['command' => 'seek', 'val' => ($progress * 100) . '%']); - return $infos; -} \ No newline at end of file diff --git a/scripts/mediarasp.php b/scripts/mediarasp.php deleted file mode 100644 index d5fecb3..0000000 --- a/scripts/mediarasp.php +++ /dev/null @@ -1,22 +0,0 @@ - .info.lock .icon { top: 0; left: 0; } -.bricks[data-type="mediarasp"] .brick .c .remote-infos, -.bricks[data-type="raspberrycast"] .brick .c .remote-infos { - padding: 0; -} -.bricks[data-type="mediarasp"] .brick .c .remote-infos .h, -.bricks[data-type="raspberrycast"] .brick .c .remote-infos .h { - height: 100%; - background-size: cover; - border-radius: 5px; -} -.bricks[data-type="mediarasp"] .brick .c .remote-infos .h .title, -.bricks[data-type="raspberrycast"] .brick .c .remote-infos .h .title { - bottom: 10%; - color: #fff; - mix-blend-mode: exclusion; - max-width: 80%; - left: 10%; - white-space: normal; -} .bricks .brick { overflow: hidden; position: absolute; -- 2.39.5