add scrape info #11

This commit is contained in:
ghost 2023-10-09 01:14:41 +03:00
parent 62ad522286
commit 0609d5775f
2 changed files with 37 additions and 0 deletions

View File

@ -57,6 +57,12 @@ class TorrentController extends AbstractController
[ [
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'added' => $torrent->getAdded(), 'added' => $torrent->getAdded(),
'scrape' =>
[
'seeders' => (int) $torrent->getSeeders(),
'peers' => (int) $torrent->getPeers(),
'leechers' => (int) $torrent->getLeechers(),
],
'locales' => $torrentService->findLastTorrentLocales($torrent->getId()), 'locales' => $torrentService->findLastTorrentLocales($torrent->getId()),
'sensitive' => $torrentService->findLastTorrentSensitive($torrent->getId())->isValue(), 'sensitive' => $torrentService->findLastTorrentSensitive($torrent->getId())->isValue(),
'download' => 'download' =>

View File

@ -177,6 +177,37 @@
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
<tr>
<td colspan="2">
<div class="padding-y-8-px border-bottom-default text-right">
{{ 'Scrape'|trans }}
</div>
</td>
</tr>
<tr>
<td class="padding-t-16-px">
{{ 'Seeders'|trans }}
</td>
<td class="padding-t-16-px">
{{ torrent.scrape.seeders }}
</td>
</tr>
<tr>
<td>
{{ 'Peers'|trans }}
</td>
<td>
{{ torrent.scrape.peers }}
</td>
</tr>
<tr>
<td>
{{ 'Leechers'|trans }}
</td>
<td>
{{ torrent.scrape.leechers }}
</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>