diff --git a/server/torr/storage/torrstor/storage.go b/server/torr/storage/torrstor/storage.go index 0c3ba5c..9fcf069 100644 --- a/server/torr/storage/torrstor/storage.go +++ b/server/torr/storage/torrstor/storage.go @@ -30,10 +30,10 @@ func (s *Storage) OpenTorrent(info *metainfo.Info, infoHash metainfo.Hash) (stor ch := NewCache(s.capacity, s) ch.Init(info, infoHash) s.caches[infoHash] = ch -// return ch, nil + // return ch, nil return storage2.TorrentImpl{ - Piece: ch.Piece, - Close: ch.Close, + Piece: ch.Piece, + Close: ch.Close, }, nil } diff --git a/server/web/api/utils/link.go b/server/web/api/utils/link.go index 8868ec9..266b066 100644 --- a/server/web/api/utils/link.go +++ b/server/web/api/utils/link.go @@ -24,7 +24,7 @@ func ParseFile(file multipart.File) (*torrent.TorrentSpec, error) { return nil, err } -// mag := minfo.Magnet(info.Name, minfo.HashInfoBytes()) + // mag := minfo.Magnet(info.Name, minfo.HashInfoBytes()) mag := minfo.Magnet(nil, &info) return &torrent.TorrentSpec{ InfoBytes: minfo.InfoBytes, @@ -106,7 +106,7 @@ func fromHttp(link string) (*torrent.TorrentSpec, error) { if err != nil { return nil, err } -// mag := minfo.Magnet(info.Name, minfo.HashInfoBytes()) + // mag := minfo.Magnet(info.Name, minfo.HashInfoBytes()) mag := minfo.Magnet(nil, &info) return &torrent.TorrentSpec{ @@ -130,7 +130,7 @@ func fromFile(path string) (*torrent.TorrentSpec, error) { return nil, err } -// mag := minfo.Magnet(info.Name, minfo.HashInfoBytes()) + // mag := minfo.Magnet(info.Name, minfo.HashInfoBytes()) mag := minfo.Magnet(nil, &info) return &torrent.TorrentSpec{ InfoBytes: minfo.InfoBytes, diff --git a/server/web/pages/route.go b/server/web/pages/route.go index be25fd9..09be4d2 100644 --- a/server/web/pages/route.go +++ b/server/web/pages/route.go @@ -28,7 +28,7 @@ func getTorrents(c *gin.Context) { mi := metainfo.MetaInfo{ AnnounceList: ts.Trackers, } -// mag := mi.Magnet(ts.DisplayName, ts.InfoHash) + // mag := mi.Magnet(ts.DisplayName, ts.InfoHash) mag := mi.Magnet(&ts.InfoHash, &metainfo.Info{Name: ts.DisplayName}) http += "
" }