mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 00:01:21 +00:00
Rename bookinfoid to bookinfo_id, consoleinfoid to consoleinfo_id and pre_id to predb_id
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
2016-05-10 DariusIII
|
||||
* Chg: Rename bookinfoid to bookinfo_id, consoleinfoid to consoleinfo_id and pre_id to predb_id
|
||||
* Chg: Rename musicinfoid to musicinfo_id
|
||||
* Chg: Rename preid to predb_id in releases table and in classes and scripts.
|
||||
* Chg: Move collection deletion right after NZB is created.
|
||||
|
||||
@@ -41,8 +41,8 @@ if (isset($argv[1]) && $argv[1] === "all") {
|
||||
$pdo->queryExec(
|
||||
sprintf("
|
||||
UPDATE releases
|
||||
SET consoleinfoid = NULL, gamesinfo_id = 0, imdbid = NULL, musicinfo_id = NULL,
|
||||
bookinfoid = NULL, videos_id = 0, tv_episodes_id = 0, xxxinfo_id = 0, passwordstatus = -1, haspreview = -1,
|
||||
SET consoleinfo_id = NULL, gamesinfo_id = 0, imdbid = NULL, musicinfo_id = NULL,
|
||||
bookinfo_id = NULL, videos_id = 0, tv_episodes_id = 0, xxxinfo_id = 0, passwordstatus = -1, haspreview = -1,
|
||||
jpgstatus = 0, videostatus = 0, audiostatus = 0, nfostatus = -1
|
||||
WHERE id = %d",
|
||||
$releases['id']
|
||||
@@ -60,10 +60,10 @@ if (isset($argv[1]) && ($argv[1] === "consoles" || $argv[1] === "all")) {
|
||||
}
|
||||
if (isset($argv[2]) && $argv[2] === "true") {
|
||||
echo $pdo->log->header("Resetting all Console postprocessing");
|
||||
$where = ' WHERE consoleinfoid IS NOT NULL';
|
||||
$where = ' WHERE consoleinfo_id IS NOT NULL';
|
||||
} else {
|
||||
echo $pdo->log->header("Resetting all failed Console postprocessing");
|
||||
$where = " WHERE consoleinfoid IN (-2, 0) AND categories_id BETWEEN " . Category::GAME_ROOT . " AND " . Category::GAME_OTHER;
|
||||
$where = " WHERE consoleinfo_id IN (-2, 0) AND categories_id BETWEEN " . Category::GAME_ROOT . " AND " . Category::GAME_OTHER;
|
||||
}
|
||||
|
||||
$qry = $pdo->queryDirect("SELECT id FROM releases" . $where);
|
||||
@@ -75,7 +75,7 @@ if (isset($argv[1]) && ($argv[1] === "consoles" || $argv[1] === "all")) {
|
||||
$concount = 0;
|
||||
if ($qry instanceof \Traversable) {
|
||||
foreach ($qry as $releases) {
|
||||
$pdo->queryExec("UPDATE releases SET consoleinfoid = NULL WHERE id = " . $releases['id']);
|
||||
$pdo->queryExec("UPDATE releases SET consoleinfo_id = NULL WHERE id = " . $releases['id']);
|
||||
$consoletools->overWritePrimary("Resetting Console Releases: " . $consoletools->percentString(++$concount, $total));
|
||||
}
|
||||
}
|
||||
@@ -253,10 +253,10 @@ if (isset($argv[1]) && ($argv[1] === "books" || $argv[1] === "all")) {
|
||||
}
|
||||
if (isset($argv[2]) && $argv[2] === "true") {
|
||||
echo $pdo->log->header("Resetting all Book postprocessing");
|
||||
$where = ' WHERE bookinfoid IS NOT NULL';
|
||||
$where = ' WHERE bookinfo_id IS NOT NULL';
|
||||
} else {
|
||||
echo $pdo->log->header("Resetting all failed Book postprocessing");
|
||||
$where = " WHERE bookinfoid IN (-2, 0) AND categories_id BETWEEN " . Category::BOOKS_ROOT . " AND " . Category::BOOKS_UNKNOWN;
|
||||
$where = " WHERE bookinfo_id IN (-2, 0) AND categories_id BETWEEN " . Category::BOOKS_ROOT . " AND " . Category::BOOKS_UNKNOWN;
|
||||
}
|
||||
|
||||
$qry = $pdo->queryDirect("SELECT id FROM releases" . $where);
|
||||
@@ -264,7 +264,7 @@ if (isset($argv[1]) && ($argv[1] === "books" || $argv[1] === "all")) {
|
||||
$concount = 0;
|
||||
if ($qry instanceof \Traversable) {
|
||||
foreach ($qry as $releases) {
|
||||
$pdo->queryExec("UPDATE releases SET bookinfoid = NULL WHERE id = " . $releases['id']);
|
||||
$pdo->queryExec("UPDATE releases SET bookinfo_id = NULL WHERE id = " . $releases['id']);
|
||||
$consoletools->overWritePrimary("Resetting Book Releases: " . $consoletools->percentString(++$concount, $total));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ if (isset($argv[1]) && ($argv[1] === "true" || $argv[1] === "check")) {
|
||||
echo $pdo->log->warning("Missing preview " . $nzbpath);
|
||||
if ($argv[1] === "true") {
|
||||
$pdo->queryExec(
|
||||
sprintf("UPDATE releases SET consoleinfoid = NULL, gamesinfo_id = 0, imdbid = NULL, musicinfo_id = NULL, bookinfoid = NULL, videos_id = 0, xxxinfo_id = 0, passwordstatus = -1, haspreview = -1, jpgstatus = 0, videostatus = 0, audiostatus = 0, nfostatus = -1 WHERE id = %s", $row['id']));
|
||||
sprintf("UPDATE releases SET consoleinfo_id = NULL, gamesinfo_id = 0, imdbid = NULL, musicinfo_id = NULL, bookinfo_id = NULL, videos_id = 0, xxxinfo_id = 0, passwordstatus = -1, haspreview = -1, jpgstatus = 0, videostatus = 0, audiostatus = 0, nfostatus = -1 WHERE id = %s", $row['id']));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ $console = new Console(['Echo' => true, 'Settings' => $pdo]);
|
||||
|
||||
$res = $pdo->queryDirect(
|
||||
sprintf(
|
||||
"SELECT searchname, id FROM releases WHERE consoleinfoid IS NULL AND categories_id
|
||||
"SELECT searchname, id FROM releases WHERE consoleinfo_id IS NULL AND categories_id
|
||||
BETWEEN %s AND %s ORDER BY id DESC",
|
||||
Category::GAME_ROOT,
|
||||
Category::GAME_OTHER
|
||||
|
||||
@@ -96,17 +96,17 @@ SQL_INSERT;
|
||||
// Add hashes g
|
||||
echo $pdo->log->info("Adding predb_hashes entries");
|
||||
echo $pdo->log->info("Stage 1: UNHEX(MD5(TITLE))");
|
||||
$pdo->queryExec("INSERT IGNORE INTO predb_hashes (hash, pre_id) SELECT UNHEX(md5(title)), id from predb;");
|
||||
$pdo->queryExec("INSERT IGNORE INTO predb_hashes (hash, predb_id) SELECT UNHEX(md5(title)), id from predb;");
|
||||
echo $pdo->log->info("Stage 1: UNHEX(MD5(MD5(TITLE)))");
|
||||
$pdo->queryExec("INSERT IGNORE INTO predb_hashes (hash, pre_id) SELECT UNHEX(md5(md5(title))), id from predb;");
|
||||
$pdo->queryExec("INSERT IGNORE INTO predb_hashes (hash, predb_id) SELECT UNHEX(md5(md5(title))), id from predb;");
|
||||
echo $pdo->log->info("Stage 1: UNHEX(SHA1(TITLE))");
|
||||
$pdo->queryExec("INSERT IGNORE INTO predb_hashes (hash, pre_id) SELECT UNHEX(sha1(title)), id from predb;");
|
||||
$pdo->queryExec("INSERT IGNORE INTO predb_hashes (hash, predb_id) SELECT UNHEX(sha1(title)), id from predb;");
|
||||
|
||||
// Re-add triggers on predb
|
||||
echo $pdo->log->info("Adding predb_hashes triggers");
|
||||
$pdo->queryExec("CREATE TRIGGER insert_hashes AFTER INSERT ON predb FOR EACH ROW BEGIN INSERT INTO predb_hashes (hash, pre_id) VALUES (UNHEX(MD5(NEW.title)), NEW.id), (UNHEX(MD5(MD5(NEW.title))), NEW.id), ( UNHEX(SHA1(NEW.title)), NEW.id); END;");
|
||||
$pdo->queryExec("CREATE TRIGGER update_hashes AFTER UPDATE ON predb FOR EACH ROW BEGIN IF NEW.title != OLD.title THEN DELETE FROM predb_hashes WHERE hash IN ( UNHEX(md5(OLD.title)), UNHEX(md5(md5(OLD.title))), UNHEX(sha1(OLD.title)) ) AND pre_id = OLD.id; INSERT INTO predb_hashes (hash, pre_id) VALUES ( UNHEX(MD5(NEW.title)), NEW.id ), ( UNHEX(MD5(MD5(NEW.title))), NEW.id ), ( UNHEX(SHA1(NEW.title)), NEW.id ); END IF; END;");
|
||||
$pdo->queryExec("CREATE TRIGGER delete_hashes BEGIN DELETE FROM predb_hashes WHERE hash IN ( UNHEX(md5(OLD.title)), UNHEX(md5(md5(OLD.title))), UNHEX(sha1(OLD.title)) ) AND pre_id = OLD.id; END;");
|
||||
$pdo->queryExec("CREATE TRIGGER insert_hashes AFTER INSERT ON predb FOR EACH ROW BEGIN INSERT INTO predb_hashes (hash, predb_id) VALUES (UNHEX(MD5(NEW.title)), NEW.id), (UNHEX(MD5(MD5(NEW.title))), NEW.id), ( UNHEX(SHA1(NEW.title)), NEW.id); END;");
|
||||
$pdo->queryExec("CREATE TRIGGER update_hashes AFTER UPDATE ON predb FOR EACH ROW BEGIN IF NEW.title != OLD.title THEN DELETE FROM predb_hashes WHERE hash IN ( UNHEX(md5(OLD.title)), UNHEX(md5(md5(OLD.title))), UNHEX(sha1(OLD.title)) ) AND predb_id = OLD.id; INSERT INTO predb_hashes (hash, predb_id) VALUES ( UNHEX(MD5(NEW.title)), NEW.id ), ( UNHEX(MD5(MD5(NEW.title))), NEW.id ), ( UNHEX(SHA1(NEW.title)), NEW.id ); END IF; END;");
|
||||
$pdo->queryExec("CREATE TRIGGER delete_hashes BEGIN DELETE FROM predb_hashes WHERE hash IN ( UNHEX(md5(OLD.title)), UNHEX(md5(md5(OLD.title))), UNHEX(sha1(OLD.title)) ) AND predb_id = OLD.id; END;");
|
||||
|
||||
$pdo->queryExec("TRUNCATE TABLE predb_imports");
|
||||
} else {
|
||||
|
||||
@@ -89,9 +89,9 @@ function categorizeRelease($where, $update = true, $echooutput = false)
|
||||
tv_episodes_id = 0,
|
||||
imdbid = NULL,
|
||||
musicinfo_id = NULL,
|
||||
consoleinfoid = NULL,
|
||||
consoleinfo_id = NULL,
|
||||
gamesinfo_id = 0,
|
||||
bookinfoid = NULL,
|
||||
bookinfo_id = NULL,
|
||||
anidbid = NULL,
|
||||
xxxinfo_id = 0,
|
||||
categories_id = %d
|
||||
|
||||
@@ -159,14 +159,14 @@ function preName($argv, $argc)
|
||||
if ($propername == true) {
|
||||
$pdo->queryExec(
|
||||
sprintf(
|
||||
"UPDATE releases SET videos_id = 0, tv_episodes_id = 0, imdbid = NULL, musicinfo_id = NULL, consoleinfoid = NULL, bookinfoid = NULL, anidbid = NULL, "
|
||||
"UPDATE releases SET videos_id = 0, tv_episodes_id = 0, imdbid = NULL, musicinfo_id = NULL, consoleinfo_id = NULL, bookinfo_id = NULL, anidbid = NULL, "
|
||||
. "iscategorized = 1, isrenamed = 1, searchname = %s, categories_id = %d, predb_id = " . $preid . " WHERE id = %d", $pdo->escapeString($cleanName), $determinedcat, $row['id']
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$pdo->queryExec(
|
||||
sprintf(
|
||||
"UPDATE releases SET videos_id = 0, tv_episodes_id = 0, imdbid = NULL, musicinfo_id = NULL, consoleinfoid = NULL, bookinfoid = NULL, anidbid = NULL, "
|
||||
"UPDATE releases SET videos_id = 0, tv_episodes_id = 0, imdbid = NULL, musicinfo_id = NULL, consoleinfo_id = NULL, bookinfo_id = NULL, anidbid = NULL, "
|
||||
. "iscategorized = 1, searchname = %s, categories_id = %d, predb_id = " . $preid . " WHERE id = %d", $pdo->escapeString($cleanName), $determinedcat, $row['id']
|
||||
)
|
||||
);
|
||||
@@ -251,7 +251,7 @@ function resetSearchnames()
|
||||
global $pdo;
|
||||
echo $pdo->log->header("Resetting blank searchnames.");
|
||||
$bad = $pdo->queryDirect(
|
||||
"UPDATE releases SET videos_id = 0, tv_episodes_id = 0, imdbid = NULL, musicinfo_id = NULL, consoleinfoid = NULL, bookinfoid = NULL, anidbid = NULL, "
|
||||
"UPDATE releases SET videos_id = 0, tv_episodes_id = 0, imdbid = NULL, musicinfo_id = NULL, consoleinfo_id = NULL, bookinfo_id = NULL, anidbid = NULL, "
|
||||
. "predb_id = 0, searchname = name, isrenamed = 0, iscategorized = 0 WHERE searchname = ''"
|
||||
);
|
||||
$tot = $bad->rowCount();
|
||||
@@ -260,7 +260,7 @@ function resetSearchnames()
|
||||
}
|
||||
echo $pdo->log->header("Resetting searchnames that are 8 characters or less.");
|
||||
$run = $pdo->queryDirect(
|
||||
"UPDATE releases SET videos_id = 0, tv_episodes_id = 0, imdbid = NULL, musicinfo_id = NULL, consoleinfoid = NULL, bookinfoid = NULL, anidbid = NULL, "
|
||||
"UPDATE releases SET videos_id = 0, tv_episodes_id = 0, imdbid = NULL, musicinfo_id = NULL, consoleinfo_id = NULL, bookinfo_id = NULL, anidbid = NULL, "
|
||||
. "predb_id = 0, searchname = name, isrenamed = 0, iscategorized = 0 WHERE LENGTH(searchname) <= 8 AND LENGTH(name) > 8"
|
||||
);
|
||||
$total = $run->rowCount();
|
||||
|
||||
+6
-6
@@ -188,7 +188,7 @@ class Books
|
||||
SELECT SQL_CALC_FOUND_ROWS boo.id,
|
||||
GROUP_CONCAT(r.id ORDER BY r.postdate DESC SEPARATOR ',') AS grp_release_id
|
||||
FROM bookinfo boo
|
||||
LEFT JOIN releases r ON boo.id = r.bookinfoid
|
||||
LEFT JOIN releases r ON boo.id = r.bookinfo_id
|
||||
WHERE r.nzbstatus = 1
|
||||
AND boo.cover = 1
|
||||
AND boo.title != ''
|
||||
@@ -233,14 +233,14 @@ class Books
|
||||
GROUP_CONCAT(r.grabs ORDER BY r.postdate DESC SEPARATOR ',') AS grp_release_grabs,
|
||||
GROUP_CONCAT(df.failed ORDER BY r.postdate DESC SEPARATOR ',') AS grp_release_failed,
|
||||
boo.*,
|
||||
r.bookinfoid,
|
||||
r.bookinfo_id,
|
||||
g.name AS group_name,
|
||||
rn.id AS nfoid
|
||||
FROM releases r
|
||||
LEFT OUTER JOIN groups g ON g.id = r.groupid
|
||||
LEFT OUTER JOIN release_nfos rn ON rn.releaseid = r.id
|
||||
LEFT OUTER JOIN dnzb_failures df ON df.release_id = r.id
|
||||
INNER JOIN bookinfo boo ON boo.id = r.bookinfoid
|
||||
INNER JOIN bookinfo boo ON boo.id = r.bookinfo_id
|
||||
WHERE boo.id IN (%s)
|
||||
AND r.id IN (%s)
|
||||
AND %s
|
||||
@@ -392,7 +392,7 @@ class Books
|
||||
SELECT searchname, id, categories_id
|
||||
FROM releases
|
||||
WHERE nzbstatus = 1 %s
|
||||
AND bookinfoid IS NULL
|
||||
AND bookinfo_id IS NULL
|
||||
AND categories_id in (%s)
|
||||
ORDER BY postdate
|
||||
DESC LIMIT %d', $this->renamed, $bookids[$i], $this->bookqty)
|
||||
@@ -454,9 +454,9 @@ class Books
|
||||
}
|
||||
|
||||
// Update release.
|
||||
$this->pdo->queryExec(sprintf('UPDATE releases SET bookinfoid = %d WHERE id = %d', $bookId, $arr['id']));
|
||||
$this->pdo->queryExec(sprintf('UPDATE releases SET bookinfo_id = %d WHERE id = %d', $bookId, $arr['id']));
|
||||
} else { // Could not parse release title.
|
||||
$this->pdo->queryExec(sprintf('UPDATE releases SET bookinfoid = %d WHERE id = %d', -2, $arr['id']));
|
||||
$this->pdo->queryExec(sprintf('UPDATE releases SET bookinfo_id = %d WHERE id = %d', -2, $arr['id']));
|
||||
if ($this->echooutput) {
|
||||
echo '.';
|
||||
}
|
||||
|
||||
+5
-5
@@ -186,7 +186,7 @@ class Console
|
||||
con.id,
|
||||
GROUP_CONCAT(r.id ORDER BY r.postdate DESC SEPARATOR ',') AS grp_release_id
|
||||
FROM consoleinfo con
|
||||
LEFT JOIN releases r ON con.id = r.consoleinfoid
|
||||
LEFT JOIN releases r ON con.id = r.consoleinfo_id
|
||||
WHERE r.nzbstatus = 1
|
||||
AND con.title != ''
|
||||
AND con.cover = 1
|
||||
@@ -231,7 +231,7 @@ class Console
|
||||
GROUP_CONCAT(r.grabs ORDER BY r.postdate DESC SEPARATOR ',') AS grp_release_grabs,
|
||||
GROUP_CONCAT(df.failed ORDER BY r.postdate DESC SEPARATOR ',') AS grp_release_failed,
|
||||
con.*,
|
||||
r.consoleinfoid,
|
||||
r.consoleinfo_id,
|
||||
g.name AS group_name,
|
||||
genres.title AS genre,
|
||||
rn.id AS nfoid
|
||||
@@ -239,7 +239,7 @@ class Console
|
||||
LEFT OUTER JOIN groups g ON g.id = r.groupid
|
||||
LEFT OUTER JOIN release_nfos rn ON rn.releaseid = r.id
|
||||
LEFT OUTER JOIN dnzb_failures df ON df.release_id = r.id
|
||||
INNER JOIN consoleinfo con ON con.id = r.consoleinfoid
|
||||
INNER JOIN consoleinfo con ON con.id = r.consoleinfo_id
|
||||
INNER JOIN genres ON con.genreid = genres.id
|
||||
WHERE con.id IN (%s)
|
||||
AND r.id IN (%s)
|
||||
@@ -760,7 +760,7 @@ class Console
|
||||
SELECT searchname, id
|
||||
FROM releases
|
||||
WHERE nzbstatus = %d %s
|
||||
AND consoleinfoid IS NULL %s
|
||||
AND consoleinfo_id IS NULL %s
|
||||
ORDER BY postdate DESC
|
||||
LIMIT %d',
|
||||
NZB::NZB_ADDED,
|
||||
@@ -829,7 +829,7 @@ class Console
|
||||
$this->pdo->queryExec(
|
||||
sprintf('
|
||||
UPDATE releases
|
||||
SET consoleinfoid = %d
|
||||
SET consoleinfo_id = %d
|
||||
WHERE id = %d %s',
|
||||
$gameId,
|
||||
$arr['id'],
|
||||
|
||||
@@ -252,7 +252,7 @@ class MiscSorter
|
||||
$this->_setProcSorter(self::PROC_SORTER_DONE, $id);
|
||||
}
|
||||
|
||||
if ($type !== '' && in_array($type, ['bookinfoid', 'consoleinfoid', 'imdbid', 'musicinfo_id'])) {
|
||||
if ($type !== '' && in_array($type, ['bookinfo_id', 'consoleinfo_id', 'imdbid', 'musicinfo_id'])) {
|
||||
$this->pdo->queryExec(
|
||||
sprintf('
|
||||
UPDATE releases
|
||||
@@ -478,9 +478,9 @@ class MiscSorter
|
||||
}
|
||||
|
||||
if ($audiobook) {
|
||||
$ok = $this->dodbupdate($id, $name, $bookId, 'bookinfoid');
|
||||
$ok = $this->dodbupdate($id, $name, $bookId, 'bookinfo_id');
|
||||
} else {
|
||||
$ok = $this->dodbupdate($id, $name, $bookId, 'bookinfoid');
|
||||
$ok = $this->dodbupdate($id, $name, $bookId, 'bookinfo_id');
|
||||
}
|
||||
|
||||
return $ok;
|
||||
@@ -570,7 +570,7 @@ class MiscSorter
|
||||
$rel = $this->_doAmazonLocal('consoleinfo', (string)$response->Items->Item->ASIN);
|
||||
|
||||
if ($rel !== false) {
|
||||
$ok = $this->dodbupdate($id, $name, $rel['id'], 'consoleinfoid');
|
||||
$ok = $this->dodbupdate($id, $name, $rel['id'], 'consoleinfo_id');
|
||||
} else {
|
||||
$consoleId = $this->console->
|
||||
updateConsoleInfo([
|
||||
@@ -579,7 +579,7 @@ class MiscSorter
|
||||
'platform' => (string)$response->Items->Item->ItemAttributes->Platform
|
||||
]
|
||||
);
|
||||
$ok = $this->dodbupdate($id, $name, $consoleId, 'consoleinfoid');
|
||||
$ok = $this->dodbupdate($id, $name, $consoleId, 'consoleinfo_id');
|
||||
}
|
||||
|
||||
return $ok;
|
||||
|
||||
@@ -691,7 +691,7 @@ class NameFixer
|
||||
sprintf('
|
||||
UPDATE releases
|
||||
SET videos_id = 0, tv_episodes_id = 0, imdbid = NULL, musicinfo_id = NULL,
|
||||
consoleinfoid = NULL, bookinfoid = NULL, anidbid = NULL, predb_id = %d,
|
||||
consoleinfo_id = NULL, bookinfo_id = NULL, anidbid = NULL, predb_id = %d,
|
||||
searchname = %s, %s categories_id = %d
|
||||
WHERE id = %d',
|
||||
$preId,
|
||||
@@ -708,7 +708,7 @@ class NameFixer
|
||||
sprintf('
|
||||
UPDATE releases
|
||||
SET videos_id = 0, tv_episodes_id = 0, imdbid = NULL, musicinfo_id = NULL,
|
||||
consoleinfoid = NULL, bookinfoid = NULL, anidbid = NULL, predb_id = %d,
|
||||
consoleinfo_id = NULL, bookinfo_id = NULL, anidbid = NULL, predb_id = %d,
|
||||
searchname = %s, iscategorized = 1, categories_id = %d
|
||||
WHERE id = %d',
|
||||
$preId,
|
||||
@@ -1005,7 +1005,7 @@ class NameFixer
|
||||
$row = $pdo->queryOneRow(
|
||||
sprintf("
|
||||
SELECT p.id AS predb_id, p.title, p.source
|
||||
FROM predb p INNER JOIN predb_hashes h ON h.pre_id = p.id
|
||||
FROM predb p INNER JOIN predb_hashes h ON h.predb_id = p.id
|
||||
WHERE h.hash = UNHEX(%s)
|
||||
LIMIT 1",
|
||||
$pdo->escapeString($hash)
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ Class RSS
|
||||
LEFT OUTER JOIN movieinfo m ON m.imdbid = r.imdbid AND m.title != ''
|
||||
LEFT OUTER JOIN musicinfo mu ON mu.id = r.musicinfo_id
|
||||
LEFT OUTER JOIN genres mug ON mug.id = mu.genreid
|
||||
LEFT OUTER JOIN consoleinfo co ON co.id = r.consoleinfoid
|
||||
LEFT OUTER JOIN consoleinfo co ON co.id = r.consoleinfo_id
|
||||
LEFT OUTER JOIN genres cog ON cog.id = co.genreid %s
|
||||
LEFT OUTER JOIN tv_episodes tve ON tve.id = r.tv_episodes_id
|
||||
WHERE r.passwordstatus %s
|
||||
|
||||
@@ -1478,15 +1478,15 @@ class Releases
|
||||
public function getNewestConsole()
|
||||
{
|
||||
return $this->pdo->query(
|
||||
"SELECT r.consoleinfoid, r.guid, r.name, r.searchname, r.size, r.completion,
|
||||
"SELECT r.consoleinfo_id, r.guid, r.name, r.searchname, r.size, r.completion,
|
||||
r.postdate, r.categories_id, r.comments, r.grabs,
|
||||
con.cover
|
||||
FROM releases r
|
||||
INNER JOIN consoleinfo con ON r.consoleinfoid = con.id
|
||||
INNER JOIN consoleinfo con ON r.consoleinfo_id = con.id
|
||||
WHERE r.categories_id BETWEEN " . Category::GAME_ROOT . " AND " . Category::GAME_OTHER . "
|
||||
AND con.id > 0
|
||||
AND con.cover > 0
|
||||
AND r.id in (select max(id) from releases where consoleinfoid > 0 group by consoleinfoid)
|
||||
AND r.id in (select max(id) from releases where consoleinfo_id > 0 group by consoleinfo_id)
|
||||
ORDER BY r.postdate DESC
|
||||
LIMIT 35"
|
||||
);
|
||||
@@ -1545,16 +1545,16 @@ class Releases
|
||||
public function getNewestBooks()
|
||||
{
|
||||
return $this->pdo->query(
|
||||
"SELECT r.bookinfoid, r.guid, r.name, r.searchname, r.size, r.completion,
|
||||
"SELECT r.bookinfo_id, r.guid, r.name, r.searchname, r.size, r.completion,
|
||||
r.postdate, r.categories_id, r.comments, r.grabs,
|
||||
b.url, b.cover, b.title as booktitle, b.author
|
||||
FROM releases r
|
||||
INNER JOIN bookinfo b ON r.bookinfoid = b.id
|
||||
INNER JOIN bookinfo b ON r.bookinfo_id = b.id
|
||||
WHERE r.categories_id BETWEEN " . Category::BOOKS_ROOT . " AND " . Category::BOOKS_UNKNOWN . "
|
||||
OR r.categories_id = " . Category::MUSIC_AUDIOBOOK ."
|
||||
AND b.id > 0
|
||||
AND b.cover > 0
|
||||
AND r.id in (select max(id) from releases where bookinfoid > 0 group by bookinfoid)
|
||||
AND r.id in (select max(id) from releases where bookinfo_id > 0 group by bookinfo_id)
|
||||
ORDER BY r.postdate DESC
|
||||
LIMIT 24", true, NN_CACHE_EXPIRY_LONG
|
||||
);
|
||||
|
||||
@@ -273,8 +273,8 @@ class RequestIDLocal extends RequestID
|
||||
$this->pdo->queryExec(
|
||||
sprintf('
|
||||
UPDATE releases SET
|
||||
videos_id = 0, tv_episodes_id = 0, imdbid = NULL, musicinfo_id = NULL, consoleinfoid = NULL,
|
||||
bookinfoid = NULL, anidbid = NULL, predb_id = %d, reqidstatus = %d, isrenamed = 1,
|
||||
videos_id = 0, tv_episodes_id = 0, imdbid = NULL, musicinfo_id = NULL, consoleinfo_id = NULL,
|
||||
bookinfo_id = NULL, anidbid = NULL, predb_id = %d, reqidstatus = %d, isrenamed = 1,
|
||||
iscategorized = 1, searchname = %s, categories_id = %d
|
||||
WHERE id = %d',
|
||||
$this->_newTitle['id'],
|
||||
|
||||
@@ -289,7 +289,7 @@ class RequestIDWeb extends RequestID
|
||||
$this->pdo->queryExec(
|
||||
sprintf('
|
||||
UPDATE releases
|
||||
SET videos_id = 0, tv_episodes_id = 0, imdbid = NULL, musicinfo_id = NULL, consoleinfoid = NULL, bookinfoid = NULL, anidbid = NULL,
|
||||
SET videos_id = 0, tv_episodes_id = 0, imdbid = NULL, musicinfo_id = NULL, consoleinfo_id = NULL, bookinfo_id = NULL, anidbid = NULL,
|
||||
reqidstatus = %d, isrenamed = 1, proc_files = 1, searchname = %s, categories_id = %d,
|
||||
predb_id = %d
|
||||
WHERE id = %d',
|
||||
|
||||
+2
-2
@@ -390,9 +390,9 @@ class Tmux
|
||||
SUM(IF(nzbstatus = 1 AND categories_id = %d AND anidbid IS NULL,1,0)) AS processanime,
|
||||
SUM(IF(nzbstatus = 1 AND categories_id BETWEEN %d AND %d AND imdbid IS NULL,1,0)) AS processmovies,
|
||||
SUM(IF(nzbstatus = 1 AND categories_id IN (%d, %d, %d) AND musicinfo_id IS NULL,1,0)) AS processmusic,
|
||||
SUM(IF(nzbstatus = 1 AND categories_id BETWEEN %d AND %d AND consoleinfoid IS
|
||||
SUM(IF(nzbstatus = 1 AND categories_id BETWEEN %d AND %d AND consoleinfo_id IS
|
||||
NULL,1,0)) AS processconsole,
|
||||
SUM(IF(nzbstatus = 1 AND categories_id IN (%s) AND bookinfoid IS NULL,1,0)) AS processbooks,
|
||||
SUM(IF(nzbstatus = 1 AND categories_id IN (%s) AND bookinfo_id IS NULL,1,0)) AS processbooks,
|
||||
SUM(IF(nzbstatus = 1 AND categories_id = %d AND gamesinfo_id = 0,1,0)) AS processgames,
|
||||
SUM(IF(nzbstatus = 1 AND categories_id BETWEEN %d AND %d AND xxxinfo_id = 0,1,0)) AS processxxx,
|
||||
SUM(IF(1=1 %s,1,0)) AS processnfo,
|
||||
|
||||
@@ -2471,7 +2471,7 @@ class ProcessAdditional
|
||||
'
|
||||
UPDATE releases
|
||||
SET videos_id = 0, tv_episodes_id = 0, imdbid = NULL, musicinfo_id = NULL,
|
||||
consoleinfoid = NULL, bookinfoid = NULL, anidbid = NULL, predb_id = 0,
|
||||
consoleinfo_id = NULL, bookinfo_id = NULL, anidbid = NULL, predb_id = 0,
|
||||
searchname = %s, isrenamed = 1, iscategorized = 1, proc_files = 1, categories_id = %d
|
||||
WHERE id = %d',
|
||||
$newTitle,
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# Rename pre_id to predb_id in line with lithium conventions.
|
||||
ALTER TABLE predb_hashes
|
||||
CHANGE COLUMN pre_id predb_id INT(11) UNSIGNED NOT NULL
|
||||
COMMENT 'id, of the predb entry, this hash belongs to';
|
||||
@@ -2299,7 +2299,7 @@ CREATE TABLE IF NOT EXISTS parts (
|
||||
DROP TABLE IF EXISTS predb_hashes;
|
||||
CREATE TABLE IF NOT EXISTS predb_hashes (
|
||||
hash varbinary(20) NOT NULL DEFAULT '',
|
||||
pre_id INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
predb_id INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (hash)
|
||||
)
|
||||
ENGINE = MyISAM
|
||||
@@ -2344,11 +2344,11 @@ DROP TRIGGER IF EXISTS update_hashes;
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE TRIGGER delete_hashes AFTER DELETE ON predb FOR EACH ROW BEGIN DELETE FROM predb_hashes WHERE hash IN ( UNHEX(md5(OLD.title)), UNHEX(md5(md5(OLD.title))), UNHEX(sha1(OLD.title)) ) AND pre_id = OLD.id; END $$
|
||||
CREATE TRIGGER delete_hashes AFTER DELETE ON predb FOR EACH ROW BEGIN DELETE FROM predb_hashes WHERE hash IN ( UNHEX(md5(OLD.title)), UNHEX(md5(md5(OLD.title))), UNHEX(sha1(OLD.title)) ) AND predb_id = OLD.id; END $$
|
||||
|
||||
CREATE TRIGGER insert_hashes AFTER INSERT ON predb FOR EACH ROW BEGIN INSERT INTO predb_hashes (hash, pre_id) VALUES (UNHEX(MD5(NEW.title)), NEW.id), (UNHEX(MD5(MD5(NEW.title))), NEW.id), ( UNHEX(SHA1(NEW.title)), NEW.id); END $$
|
||||
CREATE TRIGGER insert_hashes AFTER INSERT ON predb FOR EACH ROW BEGIN INSERT INTO predb_hashes (hash, predb_id) VALUES (UNHEX(MD5(NEW.title)), NEW.id), (UNHEX(MD5(MD5(NEW.title))), NEW.id), ( UNHEX(SHA1(NEW.title)), NEW.id); END $$
|
||||
|
||||
CREATE TRIGGER update_hashes AFTER UPDATE ON predb FOR EACH ROW BEGIN IF NEW.title != OLD.title THEN DELETE FROM predb_hashes WHERE hash IN ( UNHEX(md5(OLD.title)), UNHEX(md5(md5(OLD.title))), UNHEX(sha1(OLD.title)) ) AND pre_id = OLD.id; INSERT INTO predb_hashes (hash, pre_id) VALUES ( UNHEX(MD5(NEW.title)), NEW.id ), ( UNHEX(MD5(MD5(NEW.title))), NEW.id ), ( UNHEX(SHA1(NEW.title)), NEW.id ); END IF; END $$
|
||||
CREATE TRIGGER update_hashes AFTER UPDATE ON predb FOR EACH ROW BEGIN IF NEW.title != OLD.title THEN DELETE FROM predb_hashes WHERE hash IN ( UNHEX(md5(OLD.title)), UNHEX(md5(md5(OLD.title))), UNHEX(sha1(OLD.title)) ) AND predb_id = OLD.id; INSERT INTO predb_hashes (hash, predb_id) VALUES ( UNHEX(MD5(NEW.title)), NEW.id ), ( UNHEX(MD5(MD5(NEW.title))), NEW.id ), ( UNHEX(SHA1(NEW.title)), NEW.id ); END IF; END $$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
@@ -2443,8 +2443,8 @@ CREATE TABLE IF NOT EXISTS releases (
|
||||
imdbid MEDIUMINT(7) UNSIGNED zerofill DEFAULT NULL,
|
||||
episodeinfoid INT(11) DEFAULT NULL,
|
||||
musicinfo_id INT(11) DEFAULT NULL,
|
||||
consoleinfoid INT(11) DEFAULT NULL,
|
||||
bookinfoid INT(11) DEFAULT NULL,
|
||||
consoleinfo_id INT(11) DEFAULT NULL,
|
||||
bookinfo_id INT(11) DEFAULT NULL,
|
||||
anidbid INT(11) DEFAULT NULL,
|
||||
reqid VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
releasenfoid INT(11) DEFAULT NULL,
|
||||
@@ -2483,9 +2483,9 @@ CREATE TABLE IF NOT EXISTS releases (
|
||||
KEY ix_releases_imdbid (imdbid),
|
||||
KEY ix_releases_xxxinfo_id (xxxinfo_id),
|
||||
KEY ix_releases_musicinfoid (musicinfo_id,passwordstatus),
|
||||
KEY ix_releases_consoleinfoid (consoleinfoid),
|
||||
KEY ix_releases_consoleinfoid (consoleinfo_id),
|
||||
KEY ix_releases_gamesinfo_id (gamesinfo_id),
|
||||
KEY ix_releases_bookinfoid (bookinfoid),
|
||||
KEY ix_releases_bookinfoid (bookinfo_id),
|
||||
KEY ix_releases_anidbid (anidbid),
|
||||
KEY ix_releases_preid_searchname (predb_id,searchname),
|
||||
KEY ix_releases_haspreview_passwordstatus (haspreview,passwordstatus),
|
||||
|
||||
@@ -618,7 +618,7 @@ CREATE TABLE sharing (
|
||||
|
||||
DROP TABLE IF EXISTS predbhash;
|
||||
CREATE TABLE predbhash (
|
||||
pre_id INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
predb_id INT(11) UNSIGNED NOT NULL DEFAULT '0',
|
||||
hash VARBINARY(20) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (hash)
|
||||
)
|
||||
@@ -661,26 +661,26 @@ CREATE TABLE predb_imports (
|
||||
DEFAULT CHARSET =utf8
|
||||
COLLATE =utf8_unicode_ci;
|
||||
|
||||
INSERT INTO predbhash (pre_id, hash) (SELECT id, CONCAT_WS(',', MD5(title), MD5(MD5(title)), SHA1(title)) FROM prehash);
|
||||
INSERT INTO predbhash (predb_id, hash) (SELECT id, CONCAT_WS(',', MD5(title), MD5(MD5(title)), SHA1(title)) FROM prehash);
|
||||
|
||||
DELIMITER $$
|
||||
CREATE TRIGGER insert_hashes AFTER INSERT ON prehash FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO predbhash (hash, pre_id) VALUES (UNHEX(MD5(NEW.title)), NEW.id), (UNHEX(MD5(MD5(NEW.title))), NEW.id), ( UNHEX(SHA1(NEW.title)), NEW.id);
|
||||
INSERT INTO predbhash (hash, predb_id) VALUES (UNHEX(MD5(NEW.title)), NEW.id), (UNHEX(MD5(MD5(NEW.title))), NEW.id), ( UNHEX(SHA1(NEW.title)), NEW.id);
|
||||
END; $$
|
||||
|
||||
CREATE TRIGGER update_hashes AFTER UPDATE ON prehash FOR EACH ROW
|
||||
BEGIN
|
||||
IF NEW.title != OLD.title
|
||||
THEN
|
||||
DELETE FROM predbhash WHERE hash IN ( UNHEX(md5(OLD.title)), UNHEX(md5(md5(OLD.title))), UNHEX(sha1(OLD.title)) ) AND pre_id = OLD.id;
|
||||
INSERT INTO predbhash (hash, pre_id) VALUES ( UNHEX(MD5(NEW.title)), NEW.id ), ( UNHEX(MD5(MD5(NEW.title))), NEW.id ), ( UNHEX(SHA1(NEW.title)), NEW.id );
|
||||
DELETE FROM predbhash WHERE hash IN ( UNHEX(md5(OLD.title)), UNHEX(md5(md5(OLD.title))), UNHEX(sha1(OLD.title)) ) AND predb_id = OLD.id;
|
||||
INSERT INTO predbhash (hash, predb_id) VALUES ( UNHEX(MD5(NEW.title)), NEW.id ), ( UNHEX(MD5(MD5(NEW.title))), NEW.id ), ( UNHEX(SHA1(NEW.title)), NEW.id );
|
||||
END IF;
|
||||
END; $$
|
||||
|
||||
CREATE TRIGGER delete_hashes AFTER DELETE ON prehash FOR EACH ROW
|
||||
BEGIN
|
||||
DELETE FROM predbhash WHERE hash IN ( UNHEX(md5(OLD.title)), UNHEX(md5(md5(OLD.title))), UNHEX(sha1(OLD.title)) ) AND pre_id = OLD.id;
|
||||
DELETE FROM predbhash WHERE hash IN ( UNHEX(md5(OLD.title)), UNHEX(md5(md5(OLD.title))), UNHEX(sha1(OLD.title)) ) AND predb_id = OLD.id;
|
||||
END; $$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
@@ -110,15 +110,15 @@ if (isset($_GET["id"]))
|
||||
}
|
||||
|
||||
$book = '';
|
||||
if ($data['bookinfoid'] != '') {
|
||||
if ($data['bookinfo_id'] != '') {
|
||||
$b = new Books();
|
||||
$book = $b->getBookInfo($data['bookinfoid']);
|
||||
$book = $b->getBookInfo($data['bookinfo_id']);
|
||||
}
|
||||
|
||||
$con = '';
|
||||
if ($data['consoleinfoid'] != '') {
|
||||
if ($data['consoleinfo_id'] != '') {
|
||||
$c = new Console();
|
||||
$con = $c->getConsoleInfo($data['consoleinfoid']);
|
||||
$con = $c->getConsoleInfo($data['consoleinfo_id']);
|
||||
}
|
||||
|
||||
$AniDBAPIArray = '';
|
||||
|
||||
@@ -195,7 +195,7 @@ if (isset($_GET['type'])) {
|
||||
if (isset($_GET['md5']) && strlen($_GET['title']) === 32) {
|
||||
$db = new newznab\db\Settings();
|
||||
$preData = $db->query(
|
||||
sprintf('SELECT * FROM predb p INNER JOIN predb_hashes ph ON ph.pre_id = p.id WHERE MATCH(hashes) AGAINST (%s) %s %s %s LIMIT %d OFFSET %d',
|
||||
sprintf('SELECT * FROM predb p INNER JOIN predb_hashes ph ON ph.predb_id = p.id WHERE MATCH(hashes) AGAINST (%s) %s %s %s LIMIT %d OFFSET %d',
|
||||
$db->escapeString($_GET['md5']),
|
||||
$newer,
|
||||
$older,
|
||||
@@ -212,7 +212,7 @@ if (isset($_GET['type'])) {
|
||||
if (isset($_GET['sha1']) && strlen($_GET['sha1']) === 40) {
|
||||
$db = new newznab\db\Settings();
|
||||
$preData = $db->query(
|
||||
sprintf('SELECT * FROM predb p INNER JOIN predb_hashes ph ON ph.pre_id = p.id WHERE MATCH(hashes) AGAINST (%s) %s %s %s LIMIT %d OFFSET %d',
|
||||
sprintf('SELECT * FROM predb p INNER JOIN predb_hashes ph ON ph.predb_id = p.id WHERE MATCH(hashes) AGAINST (%s) %s %s %s LIMIT %d OFFSET %d',
|
||||
$db->escapeString($_GET['sha1']),
|
||||
$newer,
|
||||
$older,
|
||||
|
||||
@@ -73,14 +73,14 @@
|
||||
<div class="col-md-2 small-gutter-left">
|
||||
<a title="View details"
|
||||
href="{$smarty.const.WWW_TOP}/details/{$mguid[$m@index]}">
|
||||
<img src="{$smarty.const.WWW_TOP}/covers/book/{if $result.cover == 1}{$result.bookinfoid}.jpg{else}{$smarty.const.WWW_THEMES}/shared/images/no-cover.png{/if}"
|
||||
<img src="{$smarty.const.WWW_TOP}/covers/book/{if $result.cover == 1}{$result.bookinfo_id}.jpg{else}{$smarty.const.WWW_THEMES}/shared/images/no-cover.png{/if}"
|
||||
width="140" border="0"
|
||||
alt="{$result.author|escape:"htmlall"} - {$result.title|escape:"htmlall"}"/>{if isset($mfailed[$m@index]) && $mfailed[$m@index] > 0} <i class="fa fa-exclamation-circle" style="color: red" title="This release has failed to download for some users"></i>{/if}
|
||||
</a>
|
||||
{if isset($result.url) && $result.url != ""}<a
|
||||
class="label label-default" target="_blank"
|
||||
href="{$site->dereferrer_link}{$result.url}"
|
||||
name="amazon{$result.bookinfoid}" title="View amazon page">
|
||||
name="amazon{$result.bookinfo_id}" title="View amazon page">
|
||||
Amazon</a>{/if}
|
||||
{if isset($mnfo[$m@index]) && $mnfo[$m@index] > 0}<a
|
||||
href="{$smarty.const.WWW_TOP}/nfo/{$mguid[$m@index]}"
|
||||
|
||||
@@ -73,14 +73,14 @@
|
||||
<div class="col-md-2 small-gutter-left">
|
||||
<a title="View details"
|
||||
href="{$smarty.const.WWW_TOP}/details/{$mguid[$m@index]}">
|
||||
<img src="{$smarty.const.WWW_TOP}/covers/console/{if $result.cover == 1}{$result.consoleinfoid}.jpg{else}{$smarty.const.WWW_THEMES}/shared/images/no-cover.png{/if}"
|
||||
<img src="{$smarty.const.WWW_TOP}/covers/console/{if $result.cover == 1}{$result.consoleinfo_id}.jpg{else}{$smarty.const.WWW_THEMES}/shared/images/no-cover.png{/if}"
|
||||
width="140" border="0"
|
||||
alt="{$result.title|escape:"htmlall"}"/>{if !empty($mfailed[$m@index])} <i class="fa fa-exclamation-circle" style="color: red" title="This release has failed to download for some users"></i>{/if}
|
||||
</a>
|
||||
{if $result.url != ""}<a class="label label-default"
|
||||
target="_blank"
|
||||
href="{$site->dereferrer_link}{$result.url}"
|
||||
name="amazon{$result.consoleinfoid}"
|
||||
name="amazon{$result.consoleinfo_id}"
|
||||
title="View Amazon page">
|
||||
Amazon</a>{/if}
|
||||
{if $result.nfoid > 0}<a
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
href="{$smarty.const.WWW_TOP}/details/{$result.guid}">
|
||||
{if $type == 'Console'}
|
||||
<img width="130px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/console/{$result.consoleinfoid}.jpg"/>
|
||||
src="{$smarty.const.WWW_TOP}/covers/console/{$result.consoleinfo_id}.jpg"/>
|
||||
{elseif $type == 'Movies'}
|
||||
<img width="140px" height="205px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/movies/{$result.imdbid}-cover.jpg"/>
|
||||
@@ -55,7 +55,7 @@
|
||||
src="{$smarty.const.WWW_TOP}/covers/music/{$result.musicinfo_id}.jpg"/>
|
||||
{elseif $type == 'Books'}
|
||||
<img height="140px" width="205px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/book/{$result.bookinfoid}.jpg"/>
|
||||
src="{$smarty.const.WWW_TOP}/covers/book/{$result.bookinfo_id}.jpg"/>
|
||||
{elseif $type == 'PC'}
|
||||
<img height="130px" width="130px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/games/{$result.gamesinfo_id}.jpg"/>
|
||||
|
||||
@@ -258,8 +258,8 @@
|
||||
<a href="#" name="name{$result.musicinfo_id}" title="View music info"
|
||||
class="modal_music label label-default" rel="music">Cover</a>
|
||||
{/if}
|
||||
{if $result.consoleinfoid > 0}
|
||||
<a href="#" name="name{$result.consoleinfoid}" title="View console info"
|
||||
{if $result.consoleinfo_id > 0}
|
||||
<a href="#" name="name{$result.consoleinfo_id}" title="View console info"
|
||||
class="modal_console label label-default" rel="console">Cover</a>
|
||||
{/if}
|
||||
{if $result.videos_id > 0}
|
||||
|
||||
@@ -86,12 +86,12 @@
|
||||
<td class="mid">
|
||||
<div class="movcover">
|
||||
<a class="title" href="{$site->dereferrer_link}{$result.url}">
|
||||
<img class="shadow img-polaroid" src="{$smarty.const.WWW_TOP}/covers/book/{if $result.cover == 1}{$result.bookinfoid}.jpg{else}no-cover.jpg{/if}" width="120" border="0" alt="{$result.author|escape:"htmlall"} - {$result.title|escape:"htmlall"}" />
|
||||
<img class="shadow img-polaroid" src="{$smarty.const.WWW_TOP}/covers/book/{if $result.cover == 1}{$result.bookinfo_id}.jpg{else}no-cover.jpg{/if}" width="120" border="0" alt="{$result.author|escape:"htmlall"} - {$result.title|escape:"htmlall"}" />
|
||||
|
||||
</a>
|
||||
<div class="movextra">
|
||||
<div style="text-align: center;">
|
||||
{if $result.url != ""}<a class="rndbtn badge badge-amaz" target="_blank" href="{$site->dereferrer_link}{$result.url}" name="amazon{$result.bookinfoid}" title="View amazon page">Amazon</a>{/if}
|
||||
{if $result.url != ""}<a class="rndbtn badge badge-amaz" target="_blank" href="{$site->dereferrer_link}{$result.url}" name="amazon{$result.bookinfo_id}" title="View amazon page">Amazon</a>{/if}
|
||||
<a class="rndbtn badge" href="{$smarty.const.WWW_TOP}/browse?g={$result.group_name}" title="Browse releases in {$result.group_name|replace:"alt.binaries":"a.b"}">Grp</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -133,11 +133,11 @@
|
||||
{if $result.musicinfo_id > 0}
|
||||
<a href="#" name="name{$result.musicinfo_id}" title="View music info" class="modal_music badge badge-success halffade" rel="music" >Cover</a>
|
||||
{/if}
|
||||
{if $result.consoleinfoid > 0}
|
||||
<a href="#" name="name{$result.consoleinfoid}" title="View console info" class="modal_console badge badge-success halffade" rel="console" >Cover</a>
|
||||
{if $result.consoleinfo_id > 0}
|
||||
<a href="#" name="name{$result.consoleinfo_id}" title="View console info" class="modal_console badge badge-success halffade" rel="console" >Cover</a>
|
||||
{/if}
|
||||
{if $result.bookinfoid > 0}
|
||||
<a href="#" name="name{$result.bookinfoid}" title="View book info" class="modal_book badge badge-success halffade" rel="console" >Cover</a>
|
||||
{if $result.bookinfo_id > 0}
|
||||
<a href="#" name="name{$result.bookinfo_id}" title="View book info" class="modal_book badge badge-success halffade" rel="console" >Cover</a>
|
||||
{/if}
|
||||
{if $result.videos_id > 0}
|
||||
<a class="badge badge-inverse halffade" href="{$smarty.const.WWW_TOP}/series/{$result.videos_id}">View Series</a>
|
||||
|
||||
@@ -134,14 +134,14 @@
|
||||
<div class="movcover">
|
||||
<div style="text-align: center;">
|
||||
<a class="title" title="View details" href="{$smarty.const.WWW_TOP}/details/{$mguid[$m@index]}">
|
||||
<img class="shadow img img-polaroid" src="{$smarty.const.WWW_TOP}/covers/console/{if isset($result.cover) && $result.cover == 1}{$result.consoleinfoid}.jpg{else}no-cover.jpg{/if}"
|
||||
<img class="shadow img img-polaroid" src="{$smarty.const.WWW_TOP}/covers/console/{if isset($result.cover) && $result.cover == 1}{$result.consoleinfo_id}.jpg{else}no-cover.jpg{/if}"
|
||||
width="120" border="0" alt="{$result.title|escape:"htmlall"}"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="movextra">
|
||||
<div style="text-align: center;">
|
||||
{if {$mnfo[$m@index]} > 0}<a href="{$smarty.const.WWW_TOP}/nfo/{$mguid[$m@index]}" title="View Nfo" class="rndbtn modal_nfo badge" rel="nfo">Nfo</a>{/if}
|
||||
{if $result.url != ""}<a class="rndbtn badge badge-amaz" target="_blank" href="{$site->dereferrer_link}{$result.url}" name="amazon{$result.consoleinfoid}" title="View amazon page">Amazon</a>{/if}
|
||||
{if $result.url != ""}<a class="rndbtn badge badge-amaz" target="_blank" href="{$site->dereferrer_link}{$result.url}" name="amazon{$result.consoleinfo_id}" title="View amazon page">Amazon</a>{/if}
|
||||
<a class="rndbtn badge" href="{$smarty.const.WWW_TOP}/browse?g={$mgrp[$m@index]}" title="Browse releases in {$mgrp[$m@index]|replace:"alt.binaries":"a.b"}">Grp</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
href="{$smarty.const.WWW_TOP}/details/{$result.guid}">
|
||||
{if $type == 'Console'}
|
||||
<img width="130px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/console/{$result.consoleinfoid}.jpg"/>
|
||||
src="{$smarty.const.WWW_TOP}/covers/console/{$result.consoleinfo_id}.jpg"/>
|
||||
{elseif $type == 'Movies'}
|
||||
<img width="140px" height="205px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/movies/{$result.imdbid}-cover.jpg"/>
|
||||
@@ -57,7 +57,7 @@
|
||||
src="{$smarty.const.WWW_TOP}/covers/music/{$result.musicinfo_id}.jpg"/>
|
||||
{elseif $type == 'Books'}
|
||||
<img height="140px" width="205px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/book/{$result.bookinfoid}.jpg"/>
|
||||
src="{$smarty.const.WWW_TOP}/covers/book/{$result.bookinfo_id}.jpg"/>
|
||||
{elseif $type == 'PC'}
|
||||
<img height="130px" width="130px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/games/{$result.gamesinfo_id}.jpg"/>
|
||||
|
||||
@@ -218,10 +218,10 @@
|
||||
{if $result.musicinfo_id > 0}
|
||||
<a href="#" name="name{$result.musicinfo_id}" title="View music info" class="modal_music badge badge-success halffade" rel="music" >Cover</a>
|
||||
{/if}
|
||||
{if $result.consoleinfoid > 0}
|
||||
<a href="#" name="name{$result.consoleinfoid}" title="View console info" class="modal_console badge badge-success halffade" rel="console" >Cover</a>{/if}
|
||||
{if $result.bookinfoid > 0}
|
||||
<a href="#" name="name{$result.bookinfoid}" title="View book info" class="modal_book badge badge-success halffade" rel="console" >Cover</a>
|
||||
{if $result.consoleinfo_id > 0}
|
||||
<a href="#" name="name{$result.consoleinfo_id}" title="View console info" class="modal_console badge badge-success halffade" rel="console" >Cover</a>{/if}
|
||||
{if $result.bookinfo_id > 0}
|
||||
<a href="#" name="name{$result.bookinfo_id}" title="View book info" class="modal_book badge badge-success halffade" rel="console" >Cover</a>
|
||||
{/if}
|
||||
{if $result.videos_id > 0}
|
||||
<a class="badge badge-inverse halffade" href="{$smarty.const.WWW_TOP}/series/{$result.videos_id}" title="View all episodes">View Series</a>
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<div class="col-md-2 small-gutter-left">
|
||||
<a title="View details"
|
||||
href="{$smarty.const.WWW_TOP}/details/{$mguid[$m@index]}">
|
||||
<img src="{$smarty.const.WWW_TOP}/covers/book/{if $result.cover == 1}{$result.bookinfoid}.jpg{else}{$smarty.const.WWW_THEMES}/shared/images/no-cover.png{/if}"
|
||||
<img src="{$smarty.const.WWW_TOP}/covers/book/{if $result.cover == 1}{$result.bookinfo_id}.jpg{else}{$smarty.const.WWW_THEMES}/shared/images/no-cover.png{/if}"
|
||||
width="140" border="0"
|
||||
alt="{$result.author|escape:"htmlall"} - {$result.title|escape:"htmlall"}"/>{if isset($mfailed[$m@index]) && $mfailed[$m@index] > 0}
|
||||
<i class="fa fa-exclamation-circle" style="color: red"
|
||||
@@ -89,7 +89,7 @@
|
||||
{if isset($result.url) && $result.url != ""}<a
|
||||
class="label label-primary" target="_blank"
|
||||
href="{$site->dereferrer_link}{$result.url}"
|
||||
name="amazon{$result.bookinfoid}" title="View amazon page">
|
||||
name="amazon{$result.bookinfo_id}" title="View amazon page">
|
||||
Amazon</a>{/if}
|
||||
{if isset($mnfo[$m@index]) && $mnfo[$m@index] > 0}<a
|
||||
href="{$smarty.const.WWW_TOP}/nfo/{$mguid[$m@index]}"
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<div class="col-md-2 small-gutter-left">
|
||||
<a title="View details"
|
||||
href="{$smarty.const.WWW_TOP}/details/{$mguid[$m@index]}">
|
||||
<img src="{$smarty.const.WWW_TOP}/covers/console/{if $result.cover == 1}{$result.consoleinfoid}.jpg{else}{$smarty.const.WWW_THEMES}/shared/images/no-cover.png{/if}"
|
||||
<img src="{$smarty.const.WWW_TOP}/covers/console/{if $result.cover == 1}{$result.consoleinfo_id}.jpg{else}{$smarty.const.WWW_THEMES}/shared/images/no-cover.png{/if}"
|
||||
width="140" border="0"
|
||||
alt="{$result.title|escape:"htmlall"}"/>{if !empty($mfailed[$m@index])}
|
||||
<i class="fa fa-exclamation-circle" style="color: red"
|
||||
@@ -88,7 +88,7 @@
|
||||
{if $result.url != ""}<a class="label label-primary"
|
||||
target="_blank"
|
||||
href="{$site->dereferrer_link}{$result.url}"
|
||||
name="amazon{$result.consoleinfoid}"
|
||||
name="amazon{$result.consoleinfo_id}"
|
||||
title="View Amazon page">
|
||||
Amazon</a>{/if}
|
||||
{if $result.nfoid > 0}<a
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
href="{$smarty.const.WWW_TOP}/details/{$result.guid}">
|
||||
{if $type == 'Console'}
|
||||
<img width="130px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/console/{$result.consoleinfoid}.jpg"/>
|
||||
src="{$smarty.const.WWW_TOP}/covers/console/{$result.consoleinfo_id}.jpg"/>
|
||||
{elseif $type == 'Movies'}
|
||||
<img width="140px" height="205px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/movies/{$result.imdbid}-cover.jpg"/>
|
||||
@@ -55,7 +55,7 @@
|
||||
src="{$smarty.const.WWW_TOP}/covers/music/{$result.musicinfo_id}.jpg"/>
|
||||
{elseif $type == 'Books'}
|
||||
<img height="140px" width="205px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/book/{$result.bookinfoid}.jpg"/>
|
||||
src="{$smarty.const.WWW_TOP}/covers/book/{$result.bookinfo_id}.jpg"/>
|
||||
{elseif $type == 'PC'}
|
||||
<img height="130px" width="130px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/games/{$result.gamesinfo_id}.jpg"/>
|
||||
|
||||
@@ -272,8 +272,8 @@
|
||||
<a href="#" name="name{$result.musicinfo_id}" title="View music info"
|
||||
class="modal_music label label-primary" rel="music">Cover</a>
|
||||
{/if}
|
||||
{if $result.consoleinfoid > 0}
|
||||
<a href="#" name="name{$result.consoleinfoid}" title="View console info"
|
||||
{if $result.consoleinfo_id > 0}
|
||||
<a href="#" name="name{$result.consoleinfo_id}" title="View console info"
|
||||
class="modal_console label label-primary" rel="console">Cover</a>
|
||||
{/if}
|
||||
{if $result.videos_id > 0}
|
||||
|
||||
@@ -73,14 +73,14 @@
|
||||
<div class="col-md-2 small-gutter-left">
|
||||
<a title="View details"
|
||||
href="{$smarty.const.WWW_TOP}/details/{$mguid[$m@index]}">
|
||||
<img src="{$smarty.const.WWW_TOP}/covers/book/{if $result.cover == 1}{$result.bookinfoid}.jpg{else}{$smarty.const.WWW_THEMES}/shared/images/no-cover.png{/if}"
|
||||
<img src="{$smarty.const.WWW_TOP}/covers/book/{if $result.cover == 1}{$result.bookinfo_id}.jpg{else}{$smarty.const.WWW_THEMES}/shared/images/no-cover.png{/if}"
|
||||
width="140" border="0"
|
||||
alt="{$result.author|escape:"htmlall"} - {$result.title|escape:"htmlall"}"/>{if isset($mfailed[$m@index]) && $mfailed[$m@index] > 0} <i class="fa fa-exclamation-circle" style="color: red" title="This release has failed to download for some users"></i>{/if}
|
||||
</a>
|
||||
{if isset($result.url) && $result.url != ""}<a
|
||||
class="label label-default" target="_blank"
|
||||
href="{$site->dereferrer_link}{$result.url}"
|
||||
name="amazon{$result.bookinfoid}" title="View amazon page">
|
||||
name="amazon{$result.bookinfo_id}" title="View amazon page">
|
||||
Amazon</a>{/if}
|
||||
{if isset($mnfo[$m@index]) && $mnfo[$m@index] > 0}<a
|
||||
href="{$smarty.const.WWW_TOP}/nfo/{$mguid[$m@index]}"
|
||||
|
||||
@@ -73,14 +73,14 @@
|
||||
<div class="col-md-2 small-gutter-left">
|
||||
<a title="View details"
|
||||
href="{$smarty.const.WWW_TOP}/details/{$mguid[$m@index]}">
|
||||
<img src="{$smarty.const.WWW_TOP}/covers/console/{if $result.cover == 1}{$result.consoleinfoid}.jpg{else}{$smarty.const.WWW_THEMES}/shared/images/no-cover.png{/if}"
|
||||
<img src="{$smarty.const.WWW_TOP}/covers/console/{if $result.cover == 1}{$result.consoleinfo_id}.jpg{else}{$smarty.const.WWW_THEMES}/shared/images/no-cover.png{/if}"
|
||||
width="140" border="0"
|
||||
alt="{$result.title|escape:"htmlall"}"/>{if !empty($mfailed[$m@index])} <i class="fa fa-exclamation-circle" style="color: red" title="This release has failed to download for some users"></i>{/if}
|
||||
</a>
|
||||
{if $result.url != ""}<a class="label label-default"
|
||||
target="_blank"
|
||||
href="{$site->dereferrer_link}{$result.url}"
|
||||
name="amazon{$result.consoleinfoid}"
|
||||
name="amazon{$result.consoleinfo_id}"
|
||||
title="View Amazon page">
|
||||
Amazon</a>{/if}
|
||||
{if $result.nfoid > 0}<a
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
href="{$smarty.const.WWW_TOP}/details/{$result.guid}">
|
||||
{if $type == 'Console'}
|
||||
<img width="130px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/console/{$result.consoleinfoid}.jpg"/>
|
||||
src="{$smarty.const.WWW_TOP}/covers/console/{$result.consoleinfo_id}.jpg"/>
|
||||
{elseif $type == 'Movies'}
|
||||
<img width="140px" height="205px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/movies/{$result.imdbid}-cover.jpg"/>
|
||||
@@ -55,7 +55,7 @@
|
||||
src="{$smarty.const.WWW_TOP}/covers/music/{$result.musicinfo_id}.jpg"/>
|
||||
{elseif $type == 'Books'}
|
||||
<img height="140px" width="205px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/book/{$result.bookinfoid}.jpg"/>
|
||||
src="{$smarty.const.WWW_TOP}/covers/book/{$result.bookinfo_id}.jpg"/>
|
||||
{elseif $type == 'PC'}
|
||||
<img height="130px" width="130px" alt=""
|
||||
src="{$smarty.const.WWW_TOP}/covers/games/{$result.gamesinfo_id}.jpg"/>
|
||||
|
||||
@@ -258,8 +258,8 @@
|
||||
<a href="#" name="name{$result.musicinfo_id}" title="View music info"
|
||||
class="modal_music label label-default" rel="music">Cover</a>
|
||||
{/if}
|
||||
{if $result.consoleinfoid > 0}
|
||||
<a href="#" name="name{$result.consoleinfoid}" title="View console info"
|
||||
{if $result.consoleinfo_id > 0}
|
||||
<a href="#" name="name{$result.consoleinfo_id}" title="View console info"
|
||||
class="modal_console label label-default" rel="console">Cover</a>
|
||||
{/if}
|
||||
{if $result.videos_id > 0}
|
||||
|
||||
@@ -38,12 +38,12 @@
|
||||
{/if}
|
||||
{if isset($release.co_cover) && $release.co_cover == 1}
|
||||
<img style="margin-left:10px;margin-bottom:10px;float:right;"
|
||||
src="{$serverroot}covers/console/{$release.consoleinfoid}.jpg" width="120" border="0"
|
||||
src="{$serverroot}covers/console/{$release.consoleinfo_id}.jpg" width="120" border="0"
|
||||
alt="{$release.searchname|escape:"htmlall"}"/>
|
||||
{/if}
|
||||
{if isset($release.bo_cover) && $release.bo_cover == 1}
|
||||
<img style="margin-left:10px;margin-bottom:10px;float:right;"
|
||||
src="{$serverroot}covers/book/{$release.bookinfoid}.jpg" width="120" border="0"
|
||||
src="{$serverroot}covers/book/{$release.bookinfo_id}.jpg" width="120" border="0"
|
||||
alt="{$release.searchname|escape:"htmlall"}"/>
|
||||
{/if}
|
||||
<ul>
|
||||
@@ -119,7 +119,7 @@
|
||||
{/if}
|
||||
{/if}
|
||||
{if isset($release.parentCategoryid) && $release.parentCategoryid == {$catClass::GAME_ROOT}}
|
||||
{if $release.consoleinfoid > 0}
|
||||
{if $release.consoleinfo_id > 0}
|
||||
<li>Console Info:
|
||||
<ul>
|
||||
{if $release.co_url != ""}
|
||||
|
||||
Reference in New Issue
Block a user