revert to old engine

This commit is contained in:
nikk gitanes
2021-07-20 07:44:44 +03:00
parent 8355ad3794
commit 2ec43233fb
16 changed files with 98 additions and 878 deletions

View File

@@ -24,7 +24,8 @@ func ParseFile(file multipart.File) (*torrent.TorrentSpec, error) {
return nil, err
}
mag := minfo.Magnet(nil, &info)
mag := minfo.Magnet(info.Name, minfo.HashInfoBytes())
// mag := minfo.Magnet(nil, &info)
return &torrent.TorrentSpec{
InfoBytes: minfo.InfoBytes,
Trackers: [][]string{mag.Trackers},
@@ -105,7 +106,8 @@ func fromHttp(link string) (*torrent.TorrentSpec, error) {
if err != nil {
return nil, err
}
mag := minfo.Magnet(nil, &info)
mag := minfo.Magnet(info.Name, minfo.HashInfoBytes())
// mag := minfo.Magnet(nil, &info)
return &torrent.TorrentSpec{
InfoBytes: minfo.InfoBytes,
@@ -128,7 +130,8 @@ func fromFile(path string) (*torrent.TorrentSpec, error) {
return nil, err
}
mag := minfo.Magnet(nil, &info)
mag := minfo.Magnet(info.Name, minfo.HashInfoBytes())
// mag := minfo.Magnet(nil, &info)
return &torrent.TorrentSpec{
InfoBytes: minfo.InfoBytes,
Trackers: [][]string{mag.Trackers},