Torrent::getInfoHashAsHex() removed in favor of Torrent::getInfoHash() which is now returns cached HEX string.
This commit is contained in:
parent
027476c553
commit
296850e482
|
@ -80,20 +80,8 @@ class Torrent
|
|||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns torrent info hash as HEX string
|
||||
*/
|
||||
/** Returns torrent info hash as HEX string */
|
||||
public function getInfoHash(): string
|
||||
{
|
||||
return $this->getInfoHashAsHex();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use getInfoHash() instead
|
||||
*
|
||||
* Returns torrent info hash as HEX string
|
||||
*/
|
||||
public function getInfoHashAsHex(): string
|
||||
{
|
||||
if (null === $this->infoHashHexCache) {
|
||||
$this->infoHashHexCache = bin2hex(stream_get_contents($this->infoHash));
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
{# @var torrent \App\Entity\Torrent #}
|
||||
{% for torrent in torrents %}
|
||||
<tr>
|
||||
<td><a href="{{ magnet(torrent.name, torrent.infoHashAsHex) }}">🔗</a></td>
|
||||
<td><a href="{{ magnet(torrent.name, torrent.infoHash) }}">🔗</a></td>
|
||||
<td><a href="{{ path('torrents_show', {'id': torrent.id}) }}">{{ torrent.name }}</a></td>
|
||||
<td>{{ torrent.totalSize | readable_size }}</td>
|
||||
<td>{{ torrent.discoveredOn | date('Y-m-d H:i:s')}}</td>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<tr>
|
||||
<td>Hash</td>
|
||||
<td>
|
||||
<a href="{{ magnet(torrent.name, torrent.infoHashAsHex) }}">{{ torrent.infoHashAsHex }}</a>
|
||||
<a href="{{ magnet(torrent.name, torrent.infoHash) }}">{{ torrent.infoHash }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in a new issue