本文整理匯總了PHP中Releases::searchbyImdbId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Releases::searchbyImdbId方法的具體用法?PHP Releases::searchbyImdbId怎麽用?PHP Releases::searchbyImdbId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Releases
的用法示例。
在下文中一共展示了Releases::searchbyImdbId方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isset
$reldata = $releases->searchAudio(isset($_GET["artist"]) ? $_GET["artist"] : "", isset($_GET["album"]) ? $_GET["album"] : "", isset($_GET["label"]) ? $_GET["label"] : "", isset($_GET["track"]) ? $_GET["track"] : "", isset($_GET["year"]) ? $_GET["year"] : "", $genreId, $offset, $limit, $categoryId, $maxage);
$page->smarty->assign('offset', $offset);
$page->smarty->assign('releases', $reldata);
$output = trim($page->smarty->fetch('apiresult.tpl'));
printOutput($relData, $outputXML, $page, $offset);
break;
// Search movie releases.
// Search movie releases.
case 'm':
verifyEmptyParameter('q');
verifyEmptyParameter('imdbid');
$maxAge = maxAge();
$page->users->addApiRequest($uid, $_SERVER['REQUEST_URI'], $hosthash);
$offset = offset();
$imdbId = isset($_GET['imdbid']) ? $_GET['imdbid'] : '-1';
$relData = $releases->searchbyImdbId($imdbId, $offset, limit(), isset($_GET['q']) ? $_GET['q'] : '', categoryid(), $maxAge);
addCoverURL($relData, function ($release) {
return Utility::getCoverURL(['type' => 'movies', 'id' => $release['imdbid']]);
});
addLanguage($relData, $page->settings);
printOutput($relData, $outputXML, $page, $offset);
break;
// Get NZB.
// Get NZB.
case 'g':
if (!isset($_GET['id'])) {
showApiError(200, 'Missing parameter (id is required for downloading an NZB)');
}
$relData = $releases->getByGuid($_GET['id']);
if ($relData) {
header('Location:' . WWW_TOP . '/getnzb?i=' . $uid . '&r=' . $apiKey . '&id=' . $relData['guid'] . (isset($_GET['del']) && $_GET['del'] == '1' ? '&del=1' : ''));
示例2: showApiError
showApiError(200);
}
$genre = "";
if (isset($_GET["genre"])) {
$genre = $_GET["genre"];
}
$users->addApiRequest($uid, $_SERVER['REQUEST_URI'], $hosthash);
$limit = 100;
if (isset($_GET["limit"]) && is_numeric($_GET["limit"]) && $_GET["limit"] < 100) {
$limit = $_GET["limit"];
}
$offset = 0;
if (isset($_GET["offset"]) && is_numeric($_GET["offset"])) {
$offset = $_GET["offset"];
}
$reldata = $releases->searchbyImdbId(isset($_GET["imdbid"]) ? $_GET["imdbid"] : "-1", $offset, $limit, isset($_GET["q"]) ? $_GET["q"] : "", $categoryId, $genre, $maxage);
$page->smarty->assign('offset', $offset);
$page->smarty->assign('releases', $reldata);
$page->smarty->assign('rsshead', $page->smarty->fetch('rssheader.tpl'));
$output = trim($page->smarty->fetch('apiresult.tpl'));
if ($outputtype == "xml") {
header("Content-type: text/xml");
echo $output;
} else {
header('Content-type: application/json');
echo json_encode(responseXmlToObject($output));
}
break;
//
// search music releases
//
示例3: maxAge
$maxAge = maxAge();
$page->users->addApiRequest($uid, $_SERVER['REQUEST_URI']);
$offset = offset();
$relData = $releases->searchbyRageId(isset($_GET['rid']) ? $_GET['rid'] : '-1', isset($_GET['season']) ? $_GET['season'] : '', isset($_GET['ep']) ? $_GET['ep'] : '', $offset, limit(), isset($_GET['q']) ? $_GET['q'] : '', categoryID(), $maxAge);
addLanguage($relData, $page->settings);
printOutput($relData, $outputXML, $page, $offset);
break;
// Search movie releases.
// Search movie releases.
case 'm':
verifyEmptyParameter('q');
verifyEmptyParameter('imdbid');
$maxAge = maxAge();
$page->users->addApiRequest($uid, $_SERVER['REQUEST_URI']);
$offset = offset();
$relData = $releases->searchbyImdbId(isset($_GET['imdbid']) ? $_GET['imdbid'] : '-1', $offset, limit(), isset($_GET['q']) ? $_GET['q'] : '', categoryID(), $maxAge);
addLanguage($relData, $page->settings);
printOutput($relData, $outputXML, $page, $offset);
break;
// Get NZB.
// Get NZB.
case 'g':
if (!isset($_GET['id'])) {
showApiError(200, 'Missing parameter (id is required for downloading an NZB)');
}
$relData = $releases->getByGuid($_GET['id']);
if ($relData) {
header('Location:' . WWW_TOP . '/getnzb?i=' . $uid . '&r=' . $apiKey . '&id=' . $relData['guid'] . (isset($_GET['del']) && $_GET['del'] == '1' ? '&del=1' : ''));
} else {
showApiError(300, 'No such item (the guid you provided has no release in our database)');
}