mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2025-01-22 12:44:25 +00:00
update announce trackers list
This commit is contained in:
parent
df6896f3e5
commit
f8e7bd8c44
@ -72,6 +72,23 @@ class TorrentController extends AbstractController
|
|||||||
$user->getEvents()
|
$user->getEvents()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Create trackers list
|
||||||
|
$appTrackers = explode('|', $this->getParameter('app.trackers'));
|
||||||
|
$allTrackers = [];
|
||||||
|
|
||||||
|
foreach ($appTrackers as $tracker)
|
||||||
|
{
|
||||||
|
$allTrackers[$tracker] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($file->getAnnounceList() as $announce)
|
||||||
|
{
|
||||||
|
foreach ($announce as $tracker)
|
||||||
|
{
|
||||||
|
$allTrackers[$tracker] = $user->isYggdrasil() && !in_array($tracker, $appTrackers);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Init page
|
// Init page
|
||||||
$page = $request->get('page') ? (int) $request->get('page') : 1;
|
$page = $request->get('page') ? (int) $request->get('page') : 1;
|
||||||
|
|
||||||
@ -145,14 +162,14 @@ class TorrentController extends AbstractController
|
|||||||
'source' => $file->getSource(),
|
'source' => $file->getSource(),
|
||||||
'comment' => $file->getComment(),
|
'comment' => $file->getComment(),
|
||||||
'tree' => $file->getFileTree(),
|
'tree' => $file->getFileTree(),
|
||||||
'trackers' => $file->getAnnounceList(),
|
//'trackers' => $file->getAnnounceList(),
|
||||||
'hash' =>
|
'hash' =>
|
||||||
[
|
[
|
||||||
'v1' => $file->getInfoHashV1(false),
|
'v1' => $file->getInfoHashV1(false),
|
||||||
'v2' => $file->getInfoHashV2(false)
|
'v2' => $file->getInfoHashV2(false)
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'trackers' => explode('|', $this->getParameter('app.trackers')),
|
'trackers' => $allTrackers,
|
||||||
'activities' => $activityService->findLastActivitiesByTorrentId(
|
'activities' => $activityService->findLastActivitiesByTorrentId(
|
||||||
$torrent->getId(),
|
$torrent->getId(),
|
||||||
$user->getEvents(),
|
$user->getEvents(),
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div class="padding-y-8-px border-bottom-default text-right">
|
<div class="padding-y-8-px border-bottom-default text-right">
|
||||||
{{ 'Common' | trans }}
|
{{ 'Common' | trans }}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -283,25 +283,22 @@
|
|||||||
<div class="padding-y-8-px border-bottom-default text-right">
|
<div class="padding-y-8-px border-bottom-default text-right">
|
||||||
{{ 'Trackers' | trans }}
|
{{ 'Trackers' | trans }}
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-t-16-px">
|
<div class="padding-y-16-px">
|
||||||
{% for tracker in trackers %}
|
{% for tracker, status in trackers %}
|
||||||
<div class="padding-y-4-px">
|
<div class="padding-y-4-px">
|
||||||
{{ tracker }}
|
{% if status %}
|
||||||
</div>
|
{{ tracker }}
|
||||||
{% endfor %}
|
{% else %}
|
||||||
{% for announces in trackers %}
|
<span class="text-color-night">
|
||||||
{% for tracker in announces %}
|
|
||||||
<div class="padding-y-4-px">
|
|
||||||
{% if tracker not in trackers %}
|
|
||||||
{{ tracker }}
|
{{ tracker }}
|
||||||
<span class="float-right" title="{{ 'Blocked'|trans }}">
|
</span>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16">
|
<span class="float-right" title="{{ 'Filter on download by settings' | trans }}">
|
||||||
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2z"/>
|
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16">
|
||||||
</svg>
|
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2z"/>
|
||||||
</span>
|
</svg>
|
||||||
{% endif %}
|
</span>
|
||||||
</div>
|
{% endif %}
|
||||||
{% endfor %}
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user