From: Vincent Date: Mon, 11 Jan 2021 08:25:04 +0000 (+0100) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=144885eae2bdb9cc61f58609ff5642d323d1ced7;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index b564800..65efb08 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,11 +3,9 @@ - - - - - + + + diff --git a/scripts/cron/cron.php b/scripts/cron/cron.php index 0776f56..5493cd1 100644 --- a/scripts/cron/cron.php +++ b/scripts/cron/cron.php @@ -198,7 +198,7 @@ function cronSqueezeCheckPlayers($cronmin) $players = ['Salon' => 'salon', 'Bureau' => 'bureau']; foreach ($players as $player => $device) { if (getSqueezePlayerStatus($player) === -1) { - if(!shieldPlayingVideo($device)) { + if (!shieldPlayingVideo($device)) { shieldRunAppAndBackHome('sbplayer', $device, 1, true); sleep(5); } @@ -352,8 +352,9 @@ function cronTraffic($cronmin, $force = false) function cronPodcasts($cronmin) { - _logSection('Podcasts'); checkSpottyLogin(); + return; + _logSection('Podcasts'); $podcasts = getSqueezeFavorites(0, 'podcasts'); if ($podcasts !== false && count($podcasts) > 0) { connectRedis()->igbset('squeezebox_podcasts', $podcasts); diff --git a/scripts/lib/shield.php b/scripts/lib/shield.php index 3e026e1..2a2ae83 100644 --- a/scripts/lib/shield.php +++ b/scripts/lib/shield.php @@ -176,6 +176,7 @@ function shieldLaunchApp($activity, $device = null) function shieldMyCanal($channel = false, $type = 'live', $device = null) { shieldRunActivity($device); + shieldKill('mycanal', $device); if ($type === 'replay') { if ($channel === 'arte') { shieldArte($device); @@ -225,7 +226,7 @@ function shieldListApps($device = null) echo shieldCommand('shell pm list', 'packages -f', $device); } -function shieldFindIntents($app, $device) +function shieldFindIntents($app, $device = null) { $app = shieldGetAppId($app); shieldCommand('shell pm dump', $app, $device); diff --git a/scripts/lib/tmdb.php b/scripts/lib/tmdb.php index 9073d42..639c68a 100644 --- a/scripts/lib/tmdb.php +++ b/scripts/lib/tmdb.php @@ -153,11 +153,22 @@ class tvShowLibrary extends mediaLibrary if ($f->isDir() || strpos($f->getFilename(), '.tmdb.id') === false) { continue; } + $file = str_replace('.tmdb.id', '', $f->getPathname()); - $dir = file_exists($file) && is_file($file) ? file_get_contents($file) : $f->getPath(); - $id = file_get_contents($f->getPathname()); - $this->tvShows[] = ['type' => 'tvshow', 'dir' => $dir, 'data' => $this->getTVShowByID($id), 'id' => $id, 'mtime' => $this->dirfilemtime($f->getPath(), true)]; + $id = file_get_contents($f->getPathname() . ''); + $data = $this->getTVShowByID($id); + $edate = explode('-', $data['last_air_date']); + $mtime = gmmktime(12, 0, 0, $edate[1], $edate[2], $edate[0]); + + if (file_exists($file.'.netflix')) { + $dir = 'netflix:' . file_get_contents($file.'.netflix'); + } else { + $dir = file_exists($file) && is_file($file) ? file_get_contents($file) : $f->getPath(); + } + + $data = $this->getTVShowByID($id); + $this->tvShows[] = ['type' => 'tvshow', 'dir' => $dir, 'data' => $data, 'id' => $id, 'mtime' => $mtime]; } } @@ -363,13 +374,13 @@ class mediaLibrary return $lastModified; } - public function _poster($path, $alt='') + public function _poster($path, $alt = '') { if (null === $path || $path === '') { - if($alt===''){ + if ($alt === '') { return ''; } - return cacheMedia('/volume1/Share/'.$alt); + return cacheMedia('/volume1/Share/' . $alt); } else { return cacheMedia('https://image.tmdb.org/t/p/w500' . $path); }