Skip to content

Commit

Permalink
Merge pull request #1107 from PyR8zdl/how-do-they-work
Browse files Browse the repository at this point in the history
Magnet support | Cleaned up code
  • Loading branch information
HDVinnie authored Feb 2, 2020
2 parents 7b66378 + d094582 commit e826d3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
12 changes: 2 additions & 10 deletions resources/views/torrent/results.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,29 +143,21 @@ class="torrent-poster-img-small show-poster" alt="@lang('torrent.poster')">
<i class="{{ config('other.font-awesome') }} fa-download"></i>
</button>
</a>
@if (config('torrent.magnet') == 1)
<a href="magnet:?dn={{ $torrent->name }}&xt=urn:btih:{{ $torrent->info_hash }}&as={{ route('torrent.download.rsskey', ['id' => $torrent->id, 'rsskey' => $user->rsskey ]) }}&tr={{ route('announce', ['passkey' => $user->passkey]) }}&xl={{ $torrent->size }}">
<button class="btn btn-primary btn-circle" type="button" data-toggle="tooltip"
data-original-title="@lang('common.magnet')">
<i class="{{ config('other.font-awesome') }} fa-magnet"></i>
</button>
</a>
@endif
@else
<a href="{{ route('download', ['id' => $torrent->id]) }}">
<button class="btn btn-primary btn-circle" type="button" data-toggle="tooltip"
data-original-title="@lang('common.download')">
<i class="{{ config('other.font-awesome') }} fa-download"></i>
</button>
</a>
@if (config('torrent.magnet') == 1)
@endif
@if (config('torrent.magnet') == 1)
<a href="magnet:?dn={{ $torrent->name }}&xt=urn:btih:{{ $torrent->info_hash }}&as={{ route('torrent.download.rsskey', ['id' => $torrent->id, 'rsskey' => $user->rsskey ]) }}&tr={{ route('announce', ['passkey' => $user->passkey]) }}&xl={{ $torrent->size }}">
<button class="btn btn-primary btn-circle" type="button" data-toggle="tooltip"
data-original-title="@lang('common.magnet')">
<i class="{{ config('other.font-awesome') }} fa-magnet"></i>
</button>
</a>
@endif
@endif

<span data-toggle="tooltip" data-original-title="Bookmark" id="torrentBookmark{{ $torrent->id }}"
Expand Down
11 changes: 2 additions & 9 deletions resources/views/torrent/torrent.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,26 +46,19 @@ class="l-breadcrumb-item-link">
<i class='{{ config("other.font-awesome") }} fa-download'></i> @lang('common.download')
</span>
</a>
@if (config('torrent.magnet') == 1)
<a href="magnet:?dn={{ $torrent->name }}&xt=urn:btih:{{ $torrent->info_hash }}&as={{ route('torrent.download.rsskey', ['id' => $torrent->id, 'rsskey' => $user->rsskey ]) }}&tr={{ route('announce', ['passkey' => $user->passkey]) }}&xl={{ $torrent->size }}" role="button" class="btn btn-labeled btn-success">
<span class='btn-label'>
<i class='{{ config("other.font-awesome") }} fa-magnet'></i> @lang('common.magnet')
</span>
</a>
@endif
@else
<a href="{{ route('download', ['id' => $torrent->id]) }}" role="button" class="btn btn-labeled btn-success">
<span class='btn-label'>
<i class='{{ config("other.font-awesome") }} fa-download'></i> @lang('common.download')
</span>
</a>
@if (config('torrent.magnet') == 1)
@endif
@if (config('torrent.magnet') == 1)
<a href="magnet:?dn={{ $torrent->name }}&xt=urn:btih:{{ $torrent->info_hash }}&as={{ route('torrent.download.rsskey', ['id' => $torrent->id, 'rsskey' => $user->rsskey ]) }}&tr={{ route('announce', ['passkey' => $user->passkey]) }}&xl={{ $torrent->size }}" role="button" class="btn btn-labeled btn-success">
<span class='btn-label'>
<i class='{{ config("other.font-awesome") }} fa-magnet'></i> @lang('common.magnet')
</span>
</a>
@endif
@endif

@if ($torrent->tmdb != 0)
Expand Down

0 comments on commit e826d3b

Please sign in to comment.