@extends('layout.default') @section('title') External Tracker - {{ $torrent?->name ?? 'Not Found' }} - {{ config('other.title') }} @endsection @section('meta') @endsection @section('breadcrumbs') @endsection @section('nav-tabs') @endsection @section('main') @if ($externalTorrent === true)

{{ __('torrent.torrent') }}

External tracker not enabled.
@elseif ($externalTorrent === false)

{{ __('torrent.torrent') }}

Torrent not found.
@elseif ($externalTorrent === [])

{{ __('torrent.torrent') }}

Tracker returned an error.
@else

{{ __('torrent.torrent') }} {{ __('torrent.peers') }}

@foreach ($externalTorrent['peers'] ?? [] as $peerId => $peer) @if (auth()->user()->group->is_modo || auth()->id() == $peer->user_id) @else @endif @endforeach
{{ __('common.user') }} Peer ID {{ __('torrent.progress') }} {{ __('common.upload') }} {{ __('common.download') }} {{ __('torrent.left') }} {{ __('common.ip') }} {{ __('common.port') }} {{ __('torrent.last-update') }} {{ __('common.status') }} Visible
@if (null !== ($user = \App\Models\User::find($peer['user_id']))) @if ($torrent === null) @else @endif @else User not found @endif {{ implode('', array_map(fn ($char) => ctype_print($char) ? $char : '\x' . bin2hex($char), str_split(hex2bin(explode('-', $peerId)[1])))) }} @if ($torrent === null) Torrent size not available @else @php $progress = (100 * ($peer['downloaded'] % $torrent->size)) / $torrent->size; @endphp @if (0 < $progress && $progress < 1) 1% @elseif (99 < $progress && $progress < 100) 99% @else {{ round($progress) }} @endif @endif {{ \App\Helpers\StringHelper::formatBytes($peer['uploaded'] ?? 0, 2) }} {{ \App\Helpers\StringHelper::formatBytes($peer['downloaded'] ?? 0, 2) }} {{ \App\Helpers\StringHelper::formatBytes($peer['left'] ?? 0, 2) }} {{ $peer['ip_address'] }} {{ $peer['port'] }}--- --- @php $updatedAt = \Illuminate\Support\Carbon::createFromTimestampUTC($peer['updated_at']); @endphp @if ($peer['is_active']) @if ($peer['is_seeder']) {{ __('torrent.seeder') }} @else {{ __('torrent.leecher') }} @endif @else Inactive @endif @if ($peer['is_visible']) {{ __('common.yes') }} @else {{ __('common.no') }} @endif
@section('sidebar')

{{ __('torrent.torrent') }}

{{ __('common.moderation') }}
{{ $externalTorrent['status'] }}
{{ __('torrent.seeders') }}
{{ $externalTorrent['seeders'] }}
{{ __('torrent.leechers') }}
{{ $externalTorrent['leechers'] }}
{{ __('torrent.completed-times') }}
{{ $externalTorrent['times_completed'] }}
Download Factor
{{ $externalTorrent['download_factor'] }}
Upload Factor
{{ $externalTorrent['upload_factor'] }}
Deleted
{{ $externalTorrent['is_deleted'] ? __('common.yes') : __('common.no') }}
@endsection @endif @endsection