mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 11:27:24 +08:00
ptgen not show individual fields on details page
This commit is contained in:
+1
-5
@@ -277,11 +277,7 @@ if (!$row) {
|
||||
|
||||
if (get_setting('main.enable_pt_gen_system') == 'yes' && !empty($row['pt_gen'])) {
|
||||
$ptGen = new \Nexus\PTGen\PTGen();
|
||||
$ptGenResult = $ptGen->renderDetailsPageDescription($id, json_decode($row['pt_gen'], true));
|
||||
if ($ptGenResult['update']) {
|
||||
$torrentUpdate[] = 'pt_gen = ' . sqlesc(json_encode($ptGenResult['json_arr']));
|
||||
}
|
||||
echo $ptGenResult['html'];
|
||||
$ptGen->updateTorrentPtGen($row);
|
||||
}
|
||||
if ($imdb_id)
|
||||
{
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 233 233">
|
||||
<defs>
|
||||
<linearGradient id="a" x2="50%" x1="50%" y2="100%">
|
||||
<stop stop-color="#111D2E" offset="0"/>
|
||||
<stop stop-color="#051839" offset=".21248"/>
|
||||
<stop stop-color="#0A1B48" offset=".40695"/>
|
||||
<stop stop-color="#132E62" offset=".58110"/>
|
||||
<stop stop-color="#144B7E" offset=".73760"/>
|
||||
<stop stop-color="#136497" offset=".87279"/>
|
||||
<stop stop-color="#1387B8" offset="1"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path fill="url(#a)" d="m4.8911 150.01c14.393 48.01 58.916 82.99 111.61 82.99 64.34 0 116.5-52.16 116.5-116.5 0-64.341-52.16-116.5-116.5-116.5-61.741 0-112.26 48.029-116.25 108.76 7.5391 12.66 10.481 20.49 4.6411 41.25z"/>
|
||||
<path fill="#fff" d="m110.5 87.322c0 0.196 0 0.392 0.01 0.576l-28.508 41.412c-4.618-0.21-9.252 0.6-13.646 2.41-1.937 0.79-3.752 1.76-5.455 2.88l-62.599-25.77c0.00049 0-1.4485 23.83 4.588 41.59l44.254 18.26c2.222 9.93 9.034 18.64 19.084 22.83 16.443 6.87 35.402-0.96 42.242-17.41 1.78-4.3 2.61-8.81 2.49-13.31l40.79-29.15c0.33 0.01 0.67 0.02 1 0.02 24.41 0 44.25-19.9 44.25-44.338 0-24.44-19.84-44.322-44.25-44.322-24.4 0-44.25 19.882-44.25 44.322zm-6.84 83.918c-5.294 12.71-19.9 18.74-32.596 13.45-5.857-2.44-10.279-6.91-12.83-12.24l14.405 5.97c9.363 3.9 20.105-0.54 23.997-9.9 3.904-9.37-0.525-20.13-9.883-24.03l-14.891-6.17c5.746-2.18 12.278-2.26 18.381 0.28 6.153 2.56 10.927 7.38 13.457 13.54s2.52 12.96-0.04 19.1m51.09-54.38c-16.25 0-29.48-13.25-29.48-29.538 0-16.275 13.23-29.529 29.48-29.529 16.26 0 29.49 13.254 29.49 29.529 0 16.288-13.23 29.538-29.49 29.538m-22.09-29.583c0-12.253 9.92-22.191 22.14-22.191 12.23 0 22.15 9.938 22.15 22.191 0 12.254-9.92 22.183-22.15 22.183-12.22 0-22.14-9.929-22.14-22.183z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
+5
-9
@@ -19,7 +19,7 @@ if (!$id)
|
||||
die();
|
||||
|
||||
|
||||
$res = sql_query("SELECT category, owner, filename, save_as, anonymous, picktype, picktime, added FROM torrents WHERE id = ".mysql_real_escape_string($id));
|
||||
$res = sql_query("SELECT category, owner, filename, save_as, anonymous, picktype, picktime, added, pt_gen FROM torrents WHERE id = ".mysql_real_escape_string($id));
|
||||
$row = mysql_fetch_array($res);
|
||||
$torrentAddedTimeString = $row['added'];
|
||||
if (!$row)
|
||||
@@ -28,7 +28,6 @@ if (!$row)
|
||||
if ($CURUSER["id"] != $row["owner"] && get_user_class() < $torrentmanage_class)
|
||||
bark($lang_takeedit['std_not_owner']);
|
||||
$oldcatmode = get_single_value("categories","mode","WHERE id=".sqlesc($row['category']));
|
||||
|
||||
$updateset = array();
|
||||
|
||||
//$fname = $row["filename"];
|
||||
@@ -42,15 +41,12 @@ $url = parse_imdb_id($_POST['url'] ?? '');
|
||||
* @since 1.6
|
||||
*/
|
||||
if (!empty($_POST['pt_gen'])) {
|
||||
//use PT-Gen imdb for url
|
||||
$postPtGen = $_POST['pt_gen'];
|
||||
$ptGenImdbLink = $postPtGen[\Nexus\PTGen\PTGen::SITE_IMDB]['link'] ?? '';
|
||||
if (empty($url) && !empty($ptGenImdbLink)) {
|
||||
$ptGen = new \Nexus\PTGen\PTGen();
|
||||
$ptGenImdbInfo = $ptGen->parse($ptGenImdbLink);
|
||||
$url = str_replace('tt', '', $ptGenImdbInfo['id']);
|
||||
$existsPtGenInfo = json_decode($row['pt_gen'], true) ?? [];
|
||||
$ptGen = new \Nexus\PTGen\PTGen();
|
||||
if ($postPtGen != $ptGen->getLink($existsPtGenInfo)) {
|
||||
$updateset[] = "pt_gen = " . sqlesc($postPtGen);
|
||||
}
|
||||
$updateset[] = "pt_gen = " . sqlesc(json_encode($postPtGen));
|
||||
} else {
|
||||
$updateset[] = "pt_gen = ''";
|
||||
}
|
||||
|
||||
+1
-13
@@ -293,18 +293,6 @@ foreach ($promotionrules_torrent as $rule)
|
||||
}
|
||||
}
|
||||
$dateTimeStringNow = \Carbon\Carbon::now()->toDateTimeString();
|
||||
/**
|
||||
* add PT-Gen
|
||||
* @since 1.6
|
||||
*/
|
||||
$postPtGen = $_POST['pt_gen'] ?? [];
|
||||
$ptGenImdbLink = $postPtGen[\Nexus\PTGen\PTGen::SITE_IMDB]['link'] ?? '';
|
||||
if (empty($url) && !empty($ptGenImdbLink)) {
|
||||
//use PT-Gen imdb for url
|
||||
$ptGen = new \Nexus\PTGen\PTGen();
|
||||
$ptGenImdbInfo = $ptGen->parse($ptGenImdbLink);
|
||||
$url = str_replace('tt', '', $ptGenImdbInfo['id']);
|
||||
}
|
||||
|
||||
$torrentSavePath = getFullDirectory($torrent_dir);
|
||||
if (!is_dir($torrentSavePath)) {
|
||||
@@ -315,7 +303,7 @@ if (!is_writable($torrentSavePath)) {
|
||||
}
|
||||
|
||||
$ret = sql_query("INSERT INTO torrents (filename, owner, visible, anonymous, name, size, numfiles, type, url, small_descr, descr, ori_descr, category, source, medium, codec, audiocodec, standard, processing, team, save_as, sp_state, added, last_action, nfo, info_hash, pt_gen, technical_info) VALUES (".sqlesc($fname).", ".sqlesc($CURUSER["id"]).", 'yes', ".sqlesc($anonymous).", ".sqlesc($torrent).", ".sqlesc($totallen).", ".count($filelist).", ".sqlesc($type).", ".sqlesc($url).", ".sqlesc($small_descr).", ".sqlesc($descr).", ".sqlesc($descr).", ".sqlesc($catid).", ".sqlesc($sourceid).", ".sqlesc($mediumid).", ".sqlesc($codecid).", ".sqlesc($audiocodecid).", ".sqlesc($standardid).", ".sqlesc($processingid).", ".sqlesc($teamid).", ".sqlesc($dname).", ".sqlesc($sp_state) .
|
||||
", " . sqlesc(date("Y-m-d H:i:s")) . ", " . sqlesc(date("Y-m-d H:i:s")) . ", ".sqlesc($nfo).", " . sqlesc($infohash). ", " . sqlesc(json_encode($postPtGen)) . ", " . sqlesc($_POST['technical_info'] ?? '') . ")");
|
||||
", " . sqlesc(date("Y-m-d H:i:s")) . ", " . sqlesc(date("Y-m-d H:i:s")) . ", ".sqlesc($nfo).", " . sqlesc($infohash). ", " . sqlesc($_POST['pt_gen']) . ", " . sqlesc($_POST['technical_info'] ?? '') . ")");
|
||||
if (!$ret) {
|
||||
if (mysql_errno() == 1062)
|
||||
bark($lang_takeupload['std_torrent_existed']);
|
||||
|
||||
Reference in New Issue
Block a user