From: Vincent Date: Mon, 16 Nov 2020 09:08:37 +0000 (+0100) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=3dbb3fb926d7cabe5dd27a54e46da4b5d01f868a;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 25b049b..31711c2 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,7 +3,11 @@ - + + + + + @@ -1285,16 +1289,17 @@ - - + + - + + - + diff --git a/config/chambre.php b/config/chambre.php index 3979316..6d79a57 100644 --- a/config/chambre.php +++ b/config/chambre.php @@ -19,5 +19,5 @@ if (DISPLAYINTERFACE) { $favoriteslights = $c['favorites']; include "default.php"; - $nav = ['home', 'lights', 'music', 'fan', 'remote', 'coffee', 'switch', 'settings', 'alert', 'off']; + $nav = ['home', 'lights', 'music','remote', 'coffee', 'switch', 'settings', 'alert', 'off']; } \ No newline at end of file diff --git a/scripts/lib/off.php b/scripts/lib/off.php index dbae0fc..75168a8 100644 --- a/scripts/lib/off.php +++ b/scripts/lib/off.php @@ -28,7 +28,6 @@ function offSalon() stopHarmony(); shieldKillAll('salon'); shieldSleep('salon'); - harmonyDeviceCommand('videoprojecteur-epson', 'power-off'); } function offBureau() diff --git a/scripts/lib/tmdb.php b/scripts/lib/tmdb.php index 1e7d38b..5da815f 100644 --- a/scripts/lib/tmdb.php +++ b/scripts/lib/tmdb.php @@ -116,10 +116,16 @@ class tvShowLibrary extends mediaLibrary protected $tvShows = []; protected $force = false; + protected $tmdbclient; + protected $find; public function __construct($directories, $force = false) { $this->force = $force; + + $this->tmdbclient = getTmbdClient(); + $this->find = $this->tmdbclient->getFindApi(); + foreach ($directories as $directory) { if ($directory['context'] != 'tvshow') { continue; @@ -131,6 +137,20 @@ class tvShowLibrary extends mediaLibrary @rename($f->getPathname(), str_replace('.tmbd.id', '.tmdb.id', $f->getPathname())); continue; } + if ($f->isDir() && !file_exists($f->getPath() . '/.tmdb.id') && strpos($f->getPath(), '.tt') !== false) { + + $e = explode('.', $f->getPath()); + $last = array_pop($e); + $r = $this->find->findBy($last, ['external_source' => 'imdb_id']); + + foreach ($r['tv_results'] as $tv_result) { + if (isset($tv_result['id'])) { + file_put_contents($f->getPath() . '/.tmdb.id', $tv_result['id']); + break; + } + } + continue; + } if ($f->isDir() || strpos($f->getFilename(), '.tmdb.id') === false) { continue; } diff --git a/style/style.css b/style/style.css index 40a1c1e..f2f4da5 100644 --- a/style/style.css +++ b/style/style.css @@ -46,10 +46,10 @@ body #splash { } #burger { position: fixed; - left: -100px; - top: -100px; - width: 200px; - height: 200px; + right: 10vh; + bottom: 10vh; + width: 20vh; + height: 20vh; background-color: #000; border-radius: 50% 50%; z-index: 2; @@ -57,9 +57,9 @@ body #splash { #burger i { position: absolute; color: #fff; - right: 45px; - bottom: 45px; - font-size: 40px; + right: 6.3vh; + bottom: 6.3vh; + font-size: 7.7vh; } #mainnav a { text-align: center; diff --git a/style/style.less b/style/style.less index 03a683c..a33a9b6 100644 --- a/style/style.less +++ b/style/style.less @@ -55,11 +55,11 @@ body { } #burger { - @w: 200px; - @o: unit(@w/-2, px); + @w: 20vh; + @o: unit(@w/2, vh); position: fixed; - left: @o; - top: @o; + right: @o; + bottom: @o; width: @w; height: @w; background-color: #000; @@ -67,11 +67,12 @@ body { z-index: 2; i { + @f: unit((@w/200)*63, vh); position: absolute; color: #fff; - right: 45px; - bottom: 45px; - font-size: 40px; + right: @f; + bottom: @f; + font-size: unit(@f/45*55, vh); } }