révision
da09995ca8
2 fichiers modifiés avec 2 ajouts et 2 suppressions
|
@ -55,7 +55,7 @@
|
|||
<tr>
|
||||
<td>{{.Name}}</td>
|
||||
<td>{{.Hash}}</td>
|
||||
<td><a href="magnet:{{.Magnet}}"><span class="glyphicon glyphicon-magnet" aria-hidden="true"></span></a>
|
||||
<td><a href="{{.Magnet}}"><span class="glyphicon glyphicon-magnet" aria-hidden="true"></span></a>
|
||||
<a href="http://torcache.net/torrent/{{.Hash}}.torrent"><span class="glyphicon glyphicon-floppy-save" aria-hidden="true"></span></a>
|
||||
</td>
|
||||
|
||||
|
|
2
main.go
2
main.go
|
@ -144,7 +144,7 @@ func rootHandler(w http.ResponseWriter, r *http.Request) {
|
|||
for rows.Next() {
|
||||
var id, name, hash, magnet string
|
||||
rows.Scan(&id, &name, &hash)
|
||||
magnet = "?xt=urn:btih:" + hash + "&dn=" + url.QueryEscape(name) + "&tr=udp://tracker.openbittorrent.com"
|
||||
magnet = "magnet:?xt=urn:btih:" + hash + "&dn=" + url.QueryEscape(name) + "&tr=udp://tracker.openbittorrent.com"
|
||||
res := Records{
|
||||
Id: id,
|
||||
Name: name,
|
||||
|
|
Référencer dans un nouveau ticket