torrent list cancel join category

This commit is contained in:
xiaomlove
2023-07-06 03:23:28 +08:00
parent 792632306e
commit bbce67a612
9 changed files with 67 additions and 10 deletions

View File

@@ -274,5 +274,21 @@ class SearchBox extends NexusModel
return implode('', $options);
}
public static function listCategoryId($searchBoxId, $glue = null): array|string|null
{
static $results = null;
if (is_null($results)) {
$results = [];
$res = genrelist($searchBoxId);
foreach ($res as $item) {
$results[] = $item['id'];
}
}
if (!is_null($glue)) {
$results = implode($glue, $results);
}
return $results;
}
}