Fixed if torrentsEnabled on the other templates.

This commit is contained in:
Travis McCrea 2024-08-20 18:28:28 +07:00
parent dcd71d0bba
commit 363bace4d8
3 changed files with 8 additions and 7 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ annastorrents
torrents.db
torrents.db-shm
torrents.db-wal
assets/torrents

View File

@ -1122,7 +1122,7 @@ func getTemplateContent(name string) string {
<td>{{.StatusLabel}}</td>
<td><a href="{{.MagnetLink | urlsafe}}">Magnet</a></td>
<td>
{{if $.Torrents}}
{{if torrentsEnabled}}
<a href="/assets/torrents/{{.BTIH}}.torrent">Torrent</a>
{{else}}
<a href="{{.URL}}">Torrent</a>
@ -1148,7 +1148,7 @@ func getTemplateContent(name string) string {
<tr><td>Size</td><td>{{.FormattedDataSize}}</td></tr>
<tr><td>Magnet Link</td><td><a href="{{.MagnetLink | urlsafe}}">Magnet</a></td></tr>
<tr><td>Torrent Link</td><td>
{{if $.Torrents}}
{{if torrentsEnabled}}
<a href="/assets/torrents/{{.BTIH}}.torrent">Torrent</a>
{{else}}
<a href="{{.URL}}">Torrent</a>

Binary file not shown.