phpcomposeryggdrasilbittorrentjs-lessalt-websymfonysphinxsocial-networkcatalogtorrentmagnetwikidistributedfederatedsqlitetracker
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
236 lines
20 KiB
236 lines
20 KiB
{% extends 'default/layout.html.twig' %} |
|
{% block title %}{% if query %}{{ query }} - {{ 'Search' | trans }} - {% endif %}{{ name }}{% endblock %} |
|
{% block main_content %} |
|
<div class="text-right"> |
|
{% if query %} |
|
<h2>{{ 'Search results' | trans }}</h2> |
|
<sub> |
|
<a class="text-color-night margin-x-4-px" href="{{ path('rss_torrents_recent', { query : query | url_encode(true) }) }}" title="RSS"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2zm0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2zm.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/> |
|
</svg> |
|
</a> |
|
</sub> |
|
{% else %} |
|
<h2>{{ 'Recent uploads' | trans }}</h2> |
|
<sub> |
|
<a class="text-color-night margin-x-4-px" href="{{ path('rss_torrents_recent') }}" title="RSS"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2zm0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2zm.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/> |
|
</svg> |
|
</a> |
|
</sub> |
|
{% endif %} |
|
</div> |
|
{% if torrents %} |
|
{% for torrent in torrents %} |
|
<div class="padding-24-px margin-y-8-px border-radius-3-px background-color-night"> |
|
<a name="{{ torrent.id }}"></a> |
|
<div class="margin-b-16-px"> |
|
<h2> |
|
<a class="text-color-default" href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> |
|
{{ torrent.file.name }} |
|
</a> |
|
</h2> |
|
{% if torrent.scrape.leechers > 0 and torrent.scrape.seeders == 0 %} |
|
<a href="{{ path('torrent_file_wanted', { torrentId : torrent.id }) }}" |
|
class="label label-green font-size-10-px position-relative display-inline-block" |
|
title="{{ 'Active leechers waiting for seeders' | trans }}"> |
|
{{ 'wanted' | trans }} |
|
</a> |
|
{% endif %} |
|
{% if torrent.status == false %} |
|
<sub class="margin-l-8-px float-right opacity-06 hover-opacity-1" title="{{ 'Disabled' | trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="m10.79 12.912-1.614-1.615a3.5 3.5 0 0 1-4.474-4.474l-2.06-2.06C.938 6.278 0 8 0 8s3 5.5 8 5.5a7.029 7.029 0 0 0 2.79-.588zM5.21 3.088A7.028 7.028 0 0 1 8 2.5c5 0 8 5.5 8 5.5s-.939 1.721-2.641 3.238l-2.062-2.062a3.5 3.5 0 0 0-4.474-4.474L5.21 3.089z"/> |
|
<path d="M5.525 7.646a2.5 2.5 0 0 0 2.829 2.829l-2.83-2.829zm4.95.708-2.829-2.83a2.5 2.5 0 0 1 2.829 2.829zm3.171 6-12-12 .708-.708 12 12-.708.708z"/> |
|
</svg> |
|
</sub> |
|
{% endif %} |
|
{% if torrent.approved == false %} |
|
<sub class="margin-l-8-px float-right opacity-06 hover-opacity-1" title="{{ 'Waiting for approve' | trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M2 1.5a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-1v1a4.5 4.5 0 0 1-2.557 4.06c-.29.139-.443.377-.443.59v.7c0 .213.154.451.443.59A4.5 4.5 0 0 1 12.5 13v1h1a.5.5 0 0 1 0 1h-11a.5.5 0 1 1 0-1h1v-1a4.5 4.5 0 0 1 2.557-4.06c.29-.139.443-.377.443-.59v-.7c0-.213-.154-.451-.443-.59A4.5 4.5 0 0 1 3.5 3V2h-1a.5.5 0 0 1-.5-.5zm2.5.5v1a3.5 3.5 0 0 0 1.989 3.158c.533.256 1.011.791 1.011 1.491v.702c0 .7-.478 1.235-1.011 1.491A3.5 3.5 0 0 0 4.5 13v1h7v-1a3.5 3.5 0 0 0-1.989-3.158C8.978 9.586 8.5 9.052 8.5 8.351v-.702c0-.7.478-1.235 1.011-1.491A3.5 3.5 0 0 0 11.5 3V2h-7z"/> |
|
</svg> |
|
</sub> |
|
{% endif %} |
|
{% if torrent.sensitive == true %} |
|
<sub class="margin-l-8-px float-right opacity-06 hover-opacity-1" title="{{ 'Sensitive' | trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="m9.97 4.88.953 3.811C10.159 8.878 9.14 9 8 9c-1.14 0-2.158-.122-2.923-.309L6.03 4.88C6.635 4.957 7.3 5 8 5s1.365-.043 1.97-.12zm-.245-.978L8.97.88C8.718-.13 7.282-.13 7.03.88L6.275 3.9C6.8 3.965 7.382 4 8 4c.618 0 1.2-.036 1.725-.098zm4.396 8.613a.5.5 0 0 1 .037.96l-6 2a.5.5 0 0 1-.316 0l-6-2a.5.5 0 0 1 .037-.96l2.391-.598.565-2.257c.862.212 1.964.339 3.165.339s2.303-.127 3.165-.339l.565 2.257 2.391.598z"/> |
|
</svg> |
|
</sub> |
|
{% endif %} |
|
{% if torrent.file.hash.v2 %} |
|
<sub class="margin-l-8-px float-right opacity-06 hover-opacity-1" title="{{ 'BitTorrent protocol version 2' | trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0ZM6.646 6.24c0-.691.493-1.306 1.336-1.306.756 0 1.313.492 1.313 1.236 0 .697-.469 1.23-.902 1.705l-2.971 3.293V12h5.344v-1.107H7.268v-.077l1.974-2.22.096-.107c.688-.763 1.287-1.428 1.287-2.43 0-1.266-1.031-2.215-2.613-2.215-1.758 0-2.637 1.19-2.637 2.402v.065h1.271v-.07Z"/> |
|
</svg> |
|
</sub> |
|
{% endif %} |
|
{% if torrent.file.hash.v1 and torrent.file.hash.v2 %} |
|
<sub class="margin-l-8-px float-right opacity-06 hover-opacity-1" title="{{ 'BitTorrent protocol version 1' | trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0ZM9.283 4.002H7.971L6.072 5.385v1.271l1.834-1.318h.065V12h1.312V4.002Z"/> |
|
</svg> |
|
</sub> |
|
{% endif %} |
|
</div> |
|
{% if torrent.keywords %} |
|
<div class="margin-b-16-px"> |
|
{% for keyword, quantity in torrent.keywords %} |
|
<a href="{{ path('torrent_search', { query : keyword | url_encode(true) }) }}"> |
|
#{{ keyword }} |
|
</a> |
|
{% endfor %} |
|
</div> |
|
{% endif %} |
|
<div class="margin-b-16-px border-bottom-default"></div> |
|
{# |
|
<sup> |
|
{{ torrent.added | format_ago }} |
|
{{ 'by' | trans }} |
|
<a href="{{ path('user_info', { userId : torrent.user.id }) }}"> |
|
<img class="border-radius-50 border-color-default vertical-align-middle margin-x-4-px" src="{{ torrent.user.identicon }}" alt="{{ 'identicon' | trans }}" /> |
|
</a> |
|
</sup> |
|
#} |
|
<span class="margin-r-4-px cursor-default" title="{{ 'Size' | trans }}"> |
|
<small> |
|
{{ torrent.file.size | format_bytes }} |
|
</small> |
|
</span> |
|
<span class="margin-l-4-px margin-r-4-px cursor-default opacity-0 parent-hover-opacity-09" title="{{ 'Seeders' | trans }}"> |
|
<svg class="vertical-align-middle" xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16"> |
|
<path fill-rule="evenodd" d="M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z"/> |
|
</svg> |
|
<small> |
|
{{ torrent.scrape.seeders }} |
|
</small> |
|
</span> |
|
<span class="margin-l-4-px margin-r-4-px cursor-default opacity-0 parent-hover-opacity-09" title="{{ 'Peers' | trans }}"> |
|
<svg class="vertical-align-middle" xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16"> |
|
<path fill-rule="evenodd" d="M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"/> |
|
</svg> |
|
<small> |
|
{{ torrent.scrape.peers }} |
|
</small> |
|
</span> |
|
<span class="margin-l-4-px margin-r-4-px cursor-default opacity-0 parent-hover-opacity-09" title="{{ 'Leechers' | trans }}"> |
|
<svg class="vertical-align-middle" xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16"> |
|
<path fill-rule="evenodd" d="M.5 6a.5.5 0 0 0-.488.608l1.652 7.434A2.5 2.5 0 0 0 4.104 16h5.792a2.5 2.5 0 0 0 2.44-1.958l.131-.59a3 3 0 0 0 1.3-5.854l.221-.99A.5.5 0 0 0 13.5 6H.5ZM13 12.5a2.01 2.01 0 0 1-.316-.025l.867-3.898A2.001 2.001 0 0 1 13 12.5ZM2.64 13.825 1.123 7h11.754l-1.517 6.825A1.5 1.5 0 0 1 9.896 15H4.104a1.5 1.5 0 0 1-1.464-1.175Z"/> |
|
<path d="m4.4.8-.003.004-.014.019a4.167 4.167 0 0 0-.204.31 2.327 2.327 0 0 0-.141.267c-.026.06-.034.092-.037.103v.004a.593.593 0 0 0 .091.248c.075.133.178.272.308.445l.01.012c.118.158.26.347.37.543.112.2.22.455.22.745 0 .188-.065.368-.119.494a3.31 3.31 0 0 1-.202.388 5.444 5.444 0 0 1-.253.382l-.018.025-.005.008-.002.002A.5.5 0 0 1 3.6 4.2l.003-.004.014-.019a4.149 4.149 0 0 0 .204-.31 2.06 2.06 0 0 0 .141-.267c.026-.06.034-.092.037-.103a.593.593 0 0 0-.09-.252A4.334 4.334 0 0 0 3.6 2.8l-.01-.012a5.099 5.099 0 0 1-.37-.543A1.53 1.53 0 0 1 3 1.5c0-.188.065-.368.119-.494.059-.138.134-.274.202-.388a5.446 5.446 0 0 1 .253-.382l.025-.035A.5.5 0 0 1 4.4.8Zm3 0-.003.004-.014.019a4.167 4.167 0 0 0-.204.31 2.327 2.327 0 0 0-.141.267c-.026.06-.034.092-.037.103v.004a.593.593 0 0 0 .091.248c.075.133.178.272.308.445l.01.012c.118.158.26.347.37.543.112.2.22.455.22.745 0 .188-.065.368-.119.494a3.31 3.31 0 0 1-.202.388 5.444 5.444 0 0 1-.253.382l-.018.025-.005.008-.002.002A.5.5 0 0 1 6.6 4.2l.003-.004.014-.019a4.149 4.149 0 0 0 .204-.31 2.06 2.06 0 0 0 .141-.267c.026-.06.034-.092.037-.103a.593.593 0 0 0-.09-.252A4.334 4.334 0 0 0 6.6 2.8l-.01-.012a5.099 5.099 0 0 1-.37-.543A1.53 1.53 0 0 1 6 1.5c0-.188.065-.368.119-.494.059-.138.134-.274.202-.388a5.446 5.446 0 0 1 .253-.382l.025-.035A.5.5 0 0 1 7.4.8Zm3 0-.003.004-.014.019a4.077 4.077 0 0 0-.204.31 2.337 2.337 0 0 0-.141.267c-.026.06-.034.092-.037.103v.004a.593.593 0 0 0 .091.248c.075.133.178.272.308.445l.01.012c.118.158.26.347.37.543.112.2.22.455.22.745 0 .188-.065.368-.119.494a3.198 3.198 0 0 1-.202.388 5.385 5.385 0 0 1-.252.382l-.019.025-.005.008-.002.002A.5.5 0 0 1 9.6 4.2l.003-.004.014-.019a4.149 4.149 0 0 0 .204-.31 2.06 2.06 0 0 0 .141-.267c.026-.06.034-.092.037-.103a.593.593 0 0 0-.09-.252A4.334 4.334 0 0 0 9.6 2.8l-.01-.012a5.099 5.099 0 0 1-.37-.543A1.53 1.53 0 0 1 9 1.5c0-.188.065-.368.119-.494.059-.138.134-.274.202-.388a5.446 5.446 0 0 1 .253-.382l.025-.035A.5.5 0 0 1 10.4.8Z"/> |
|
</svg> |
|
<small> |
|
{{ torrent.scrape.leechers }} |
|
</small> |
|
</span> |
|
<div class="float-right"> |
|
<a rel="nofollow" class="margin-l-8-px margin-r-4-px" href="{{ path('torrent_magnet', {torrentId : torrent.id}) }}" title="{{ 'Open magnet link' | trans }}"> |
|
{% if torrent.download.magnet.exist %} |
|
<svg class="vertical-align-middle" xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M15 12h-4v3h4v-3ZM5 12H1v3h4v-3ZM0 8a8 8 0 1 1 16 0v8h-6V8a2 2 0 1 0-4 0v8H0V8Z"/> |
|
</svg> |
|
{% else %} |
|
<svg class="vertical-align-middle" xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M8 1a7 7 0 0 0-7 7v3h4V8a3 3 0 0 1 6 0v3h4V8a7 7 0 0 0-7-7Zm7 11h-4v3h4v-3ZM5 12H1v3h4v-3ZM0 8a8 8 0 1 1 16 0v8h-6V8a2 2 0 1 0-4 0v8H0V8Z"/> |
|
</svg> |
|
{% endif %} |
|
</a> |
|
<small class="cursor-default" title="{{ 'Total' | trans }}"> |
|
{{ torrent.download.magnet.total }} |
|
</small> |
|
<a rel="nofollow" class="margin-l-8-px margin-r-4-px" href="{{ path('torrent_file', {torrentId : torrent.id}) }}" title="{{ 'Download torrent file' | trans }}"> |
|
{% if torrent.download.file.exist %} |
|
<svg class="vertical-align-middle" xmlns="http://www.w3.org/2000/svg" width="15" height="15" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"/> |
|
</svg> |
|
{% else %} |
|
<svg class="vertical-align-middle" xmlns="http://www.w3.org/2000/svg" width="15" height="15" fill="currentColor" viewBox="0 0 16 16"> |
|
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"/> |
|
</svg> |
|
{% endif %} |
|
</a> |
|
<small class="cursor-default" title="{{ 'Total' | trans }}"> |
|
{{ torrent.download.file.total }} |
|
</small> |
|
<a rel="nofollow" class="margin-l-8-px margin-r-4-px" href="{{ path('torrent_star_toggle', {torrentId : torrent.id}) }}" title="{{ 'Star' | trans }}"> |
|
{% if torrent.star.exist %} |
|
<svg class="vertical-align-middle" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/> |
|
</svg> |
|
{% else %} |
|
<svg class="vertical-align-middle" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.565.565 0 0 0-.163-.505L1.71 6.745l4.052-.576a.525.525 0 0 0 .393-.288L8 2.223l1.847 3.658a.525.525 0 0 0 .393.288l4.052.575-2.906 2.77a.565.565 0 0 0-.163.506l.694 3.957-3.686-1.894a.503.503 0 0 0-.461 0z"/> |
|
</svg> |
|
{% endif %} |
|
</a> |
|
<small class="cursor-default" title="{{ 'Total' | trans }}"> |
|
{{ torrent.star.total }} |
|
</small> |
|
</div> |
|
</div> |
|
{% endfor %} |
|
{% if pagination.pages > 1 %} |
|
<div class="margin-t-16-px text-right"> |
|
{{ 'Page' | trans | lower }} {{ pagination.page }} / {{ pagination.pages }} |
|
{% if query %} |
|
{% if pagination.page > 1 %} |
|
{% if pagination.page == 2 %} |
|
<a rel="nofollow" class="button margin-l-8-px" href="{{ path('torrent_search', { query : query | url_encode(true) | raw }) }}"> |
|
{{ 'Back' | trans | lower }} |
|
</a> |
|
{% else %} |
|
<a rel="nofollow" class="button margin-l-8-px" href="{{ path('torrent_search', { query : query | url_encode(true), page : pagination.page - 1 }) }}"> |
|
{{ 'Back' | trans | lower }} |
|
</a> |
|
{% endif %} |
|
{% endif %} |
|
{% if pagination.page < pagination.pages %} |
|
<a rel="nofollow" class="button margin-l-8-px" href="{{ path('torrent_search', { query : query | url_encode(true), page : pagination.page + 1 }) }}"> |
|
{{ 'Next' | trans | lower }} |
|
</a> |
|
{% endif %} |
|
{% else %} |
|
{% if pagination.page > 1 %} |
|
{% if pagination.page == 2 %} |
|
<a rel="nofollow" class="button margin-l-8-px" href="{{ path('torrent_recent') }}"> |
|
{{ 'Back' | trans | lower }} |
|
</a> |
|
{% else %} |
|
<a rel="nofollow" class="button margin-l-8-px" href="{{ path('torrent_recent', { page : pagination.page - 1 }) }}"> |
|
{{ 'Back' | trans | lower }} |
|
</a> |
|
{% endif %} |
|
{% endif %} |
|
{% if pagination.page < pagination.pages %} |
|
<a rel="nofollow" class="button margin-l-8-px" href="{{ path('torrent_recent', { page : pagination.page + 1 }) }}"> |
|
{{ 'Next' | trans | lower }} |
|
</a> |
|
{% endif %} |
|
{% endif %} |
|
</div> |
|
{% endif %} |
|
{% else %} |
|
<div class="padding-24-px margin-y-8-px border-radius-3-px background-color-night"> |
|
<div class="text-center"> |
|
<h1 class="display-block margin-b-16-px"> |
|
{{ 'Nothing found' | trans }} |
|
</h1> |
|
<div class="text-color-night margin-y-16-px"> |
|
{{ '* share new torrent file to change it' | trans }} |
|
</div> |
|
<form name="submit" method="get" action="{{ path('torrent_submit') }}"> |
|
<button class="button-green margin-y-8-px" type="submit"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v3h-3a.5.5 0 0 0 0 1h3v3a.5.5 0 0 0 1 0v-3h3a.5.5 0 0 0 0-1h-3v-3z"/> |
|
</svg> |
|
<span class="margin-x-4-px"> |
|
{{ 'Submit' | trans }} |
|
</span> |
|
</button> |
|
</form> |
|
</div> |
|
<div> |
|
{% endif %} |
|
{% endblock %} |