mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-05 07:20:58 +08:00
torrent detail show tags
This commit is contained in:
@@ -3320,10 +3320,7 @@ function torrenttable($rows, $variant = "torrent", $searchBoxId = 0) {
|
||||
|
||||
$torrentSeedingLeechingStatus = $torrent->listLeechingSeedingStatus($CURUSER['id'], $torrentIdArr);
|
||||
$tagRep = new \App\Repositories\TagRepository();
|
||||
$tagCollection = $tagRep->createBasicQuery()->get();
|
||||
$tagIdStr = $tagCollection->implode('id', ',') ?: '0';
|
||||
$torrentTagCollection = \App\Models\TorrentTag::query()->whereIn('torrent_id', $torrentIdArr)->orderByRaw("field(tag_id,$tagIdStr)")->get();
|
||||
$tagKeyById = $tagCollection->keyBy('id');
|
||||
$torrentTagCollection = \App\Models\TorrentTag::query()->whereIn('torrent_id', $torrentIdArr)->get();
|
||||
$torrentTagResult = $torrentTagCollection->groupBy('torrent_id');
|
||||
$showCover = false;
|
||||
$showSeedBoxIcon = get_setting('seed_box.enabled') == 'yes';
|
||||
@@ -3573,7 +3570,7 @@ foreach ($rows as $row)
|
||||
*/
|
||||
$tagOwns = $torrentTagResult->get($id);
|
||||
if ($tagOwns) {
|
||||
$tags = $tagRep->renderSpan($tagKeyById, $tagOwns->pluck('tag_id')->toArray());
|
||||
$tags = $tagRep->renderSpan($tagOwns->pluck('tag_id')->toArray());
|
||||
} else {
|
||||
$tags = '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user