add cover to torrent

This commit is contained in:
xiaomlove
2022-05-03 23:58:27 +08:00
parent 71d10de4c2
commit 130051d648
9 changed files with 144 additions and 28 deletions

View File

@@ -193,11 +193,19 @@ if(get_user_class()>=$torrentmanage_class && ($CURUSER['picker'] == 'yes' || get
$doRecommend = true;
}
if ($doRecommend) {
do_log("[DEL_HOT_CLASSIC_RESOURCES]");
\Nexus\Database\NexusDB::cache_del("hot_resources");
\Nexus\Database\NexusDB::cache_del("classic_resources");
}
}
/**
* get cover
* @since 1.7.8
*/
$descriptionArr = format_description($descr);
$cover = get_image_from_description($descriptionArr, true, false);
$updateset[] = "cover = " . sqlesc($cover);
sql_query("UPDATE torrents SET " . join(",", $updateset) . " WHERE id = $id") or sqlerr(__FILE__, __LINE__);