/** * Try to get media info xml from a video file. * * @param string $fileLocation * * @return bool */ protected function _getMediaInfo($fileLocation) { if (!$this->_processMediaInfo) { return false; } // Look for the video file. if (is_file($fileLocation)) { // Run media info on it. $xmlArray = Misc::runCmd($this->_killString . $this->pdo->getSetting('mediainfopath') . '" --Output=XML "' . $fileLocation . '"'); // Check if we got it. if (is_array($xmlArray)) { // Convert it to string. $xmlArray = implode("\n", $xmlArray); if (!preg_match('/<track type="(Audio|Video)">/i', $xmlArray)) { return false; } // Insert it into the DB. $this->_releaseExtra->addFull($this->_release['id'], $xmlArray); $this->_releaseExtra->addFromXml($this->_release['id'], $xmlArray); if ($this->_echoCLI) { $this->_echo('m', 'primaryOver', false); } return true; } } return false; }
<?php use nzedb\ReleaseExtra; if (!$page->users->isLoggedIn()) { $page->show403(); } if (!isset($_REQUEST['id'])) { $page->show404(); } $re = new ReleaseExtra($page->settings); $redata = $re->getBriefByGuid($_REQUEST['id']); if (!$redata) { print 'No media info'; } else { print "<table>\n"; if ($redata["videocodec"] != "" && $redata["containerformat"] != "") { $redata["videocodec"] = $re->makeCodecPretty($redata["videocodec"]); print "<tr><th>Format:</th><td>" . htmlentities($redata["videocodec"], ENT_QUOTES) . " - " . htmlentities($redata["containerformat"], ENT_QUOTES) . "</td></tr>\n"; } if ($redata["videoduration"] != "") { print "<tr><th>Duration:</th><td>" . htmlentities($redata["videoduration"], ENT_QUOTES) . "</td></tr>\n"; } if ($redata["size"] != "") { print "<tr><th>Resolution:</th><td>" . htmlentities($redata["size"], ENT_QUOTES) . "</td></tr>\n"; } if ($redata["videoaspect"] != "") { print "<tr><th>Aspect Ratio:</th><td>" . htmlentities($redata["videoaspect"], ENT_QUOTES) . "</td></tr>\n"; } if ($redata["audio"] != "" && $redata["audio"] != ", ") { print "<tr><th>Audio Languages:</th><td>" . htmlentities($redata["audio"], ENT_QUOTES) . "</td></tr>\n"; }
$trailer = !isset($mov['trailer']) || empty($mov['trailer']) || $mov['trailer'] == '' ? $movie->getTrailer($data['imdbid']) : $mov['trailer']; if ($trailer) { $mov['trailer'] = sprintf("<iframe width=\"%d\" height=\"%d\" src=\"%s\"></iframe>", $page->settings->getSetting('trailers_size_x'), $page->settings->getSetting('trailers_size_y'), $trailer); } } } } if ($data['xxxinfo_id'] != '' && $data['xxxinfo_id'] != 0) { $XXX = new XXX(['Settings' => $page->settings]); $xxx = $XXX->getXXXInfo($data['xxxinfo_id']); if ($xxx && isset($xxx['title'])) { $xxx['title'] = str_replace(['/', '\\'], '', $xxx['title']); $xxx['actors'] = $XXX->makeFieldLinks($xxx, 'actors'); $xxx['genre'] = $XXX->makeFieldLinks($xxx, 'genre'); $xxx['director'] = $XXX->makeFieldLinks($xxx, 'director'); if (isset($xxx['trailers'])) { $xxx['trailers'] = $XXX->insertSwf($xxx['classused'], $xxx['trailers']); } } else { $xxx = false; } } $user = $page->users->getById($page->users->currentUserId()); $re = new ReleaseExtra($page->settings); $page->smarty->assign(['anidb' => $data['anidbid'] > 0 ? (new AniDB(['Settings' => $page->settings]))->getAnimeInfo($data['anidbid']) : '', 'boo' => $data['bookinfoid'] != '' ? (new Books(['Settings' => $page->settings]))->getBookInfo($data['bookinfoid']) : '', 'con' => $data['consoleinfoid'] != '' ? (new Console(['Settings' => $page->settings]))->getConsoleInfo($data['consoleinfoid']) : '', 'game' => $data['gamesinfo_id'] != '' ? (new Games(['Settings' => $page->settings]))->getgamesInfo($data['gamesinfo_id']) : '', 'movie' => $mov, 'music' => $data['musicinfoid'] != '' ? (new Music(['Settings' => $page->settings]))->getMusicInfo($data['musicinfoid']) : '', 'pre' => (new PreDb(['Settings' => $page->settings]))->getForRelease($data['preid']), 'show' => $criteria, 'xxx' => $xxx, 'comments' => $rc->getComments($data['id']), 'cpapi' => $user['cp_api'], 'cpurl' => $user['cp_url'], 'nfo' => $releases->getReleaseNfo($data['id'], false), 'release' => $data, 'reAudio' => $re->getAudio($data['id']), 'reSubs' => $re->getSubs($data['id']), 'reVideo' => $re->getVideo($data['id']), 'similars' => $releases->searchSimilar($data['id'], $data['searchname'], 6, $page->userdata['categoryexclusions']), 'privateprofiles' => $page->settings->getSetting('privateprofiles') == 1 ? true : false, 'releasefiles' => (new ReleaseFiles($page->settings))->get($data['id']), 'searchname' => $releases->getSimilarName($data['searchname']), 'failed' => $fail->getFailedCount($data['guid'])]); $page->meta_title = 'View NZB'; $page->meta_keywords = 'view,nzb,description,details'; $page->meta_description = 'View NZB for' . $data['searchname']; $page->content = $page->smarty->fetch('viewnzb.tpl'); $page->render(); }
use nzedb\XXX; if (!$page->users->isLoggedIn()) { $page->show403(); } if (isset($_GET['id'])) { $releases = new Releases(['Settings' => $page->settings]); $data = $releases->getByGuid($_GET['id']); if (!$data) { $page->show404(); } $rc = new ReleaseComments($page->settings); if ($page->isPostBack()) { $rc->addComment($data['id'], $_POST['txtAddComment'], $page->users->currentUserId(), $_SERVER['REMOTE_ADDR']); } $nfo = $releases->getReleaseNfo($data['id'], false); $re = new ReleaseExtra($page->settings); $reVideo = $re->getVideo($data['id']); $reAudio = $re->getAudio($data['id']); $reSubs = $re->getSubs($data['id']); $comments = $rc->getComments($data['id']); $similars = $releases->searchSimilar($data['id'], $data['searchname'], 6, $page->userdata['categoryexclusions']); $rage = $ani = $mov = $mus = $con = $game = $xxx = $boo = ''; if ($data['rageid'] != '') { $tvrage = new TvRage(['Settings' => $page->settings]); $rageinfo = $tvrage->getByRageID($data['rageid']); if (count($rageinfo) > 0) { $seriesnames = $seriesdescription = $seriescountry = $seriesgenre = $seriesimg = $seriesid = []; foreach ($rageinfo as $r) { $seriesnames[] = $r['releasetitle']; if (!empty($r['description'])) { $seriesdescription[] = $r['description'];