tag add more customized options + NexusDB::rememter()

This commit is contained in:
xiaomlove
2022-03-28 15:58:12 +08:00
parent d15a837188
commit b613a46b8d
13 changed files with 164 additions and 33 deletions

View File

@@ -67,7 +67,10 @@ class TagRepository extends BaseRepository
foreach ($renderIdArr as $tagId) {
$value = $tagKeyById->get($tagId);
if ($value) {
$item = "<span style=\"background-color:{$value->color};color:white;border-radius:15%\">{$value->name}</span> ";
$item = sprintf(
"<span style=\"background-color:%s;color:%s;border-radius:%s;font-size:%s;margin:%s;padding:%s\">%s</span>",
$value->color, $value->font_color, $value->border_radius, $value->font_size, $value->margin, $value->padding, $value->name
);
if ($withFilterLink) {
$html .= sprintf('<a href="torrents.php?tag_id=%s">%s</a>', $tagId, $item);
} else {

View File

@@ -661,8 +661,17 @@ class TrackerRepository extends BaseRepository
}
/**
*
* @param Torrent $torrent
* @param $queries
*/
private function updateTorrent(Torrent $torrent, $queries)
{
if (empty($queries['event'])) {
do_log("no event, return", 'debug');
return;
}
$torrent->seeders = Peer::query()
->where('torrent', $torrent->id)
->where('to_go', '=',0)