Matt Joiner
1849048d1d
More Windows test fixes
2023-05-28 00:41:36 +10:00
Matt Joiner
dee985f9bd
Fixes for storage tests on Windows
2023-05-28 00:41:35 +10:00
Alex Sharov
caa9400c52
use rLock where can, part2 ( #767 )
2022-07-13 20:04:03 +10:00
Matt Joiner
32cdaf4ada
Update anacrolix/generics
2022-06-21 08:51:33 +10:00
Matt Joiner
eeb021b134
Use Option for cached Torrent length
...
Fixes https://github.com/anacrolix/torrent/issues/630 .
2022-05-12 13:47:12 +10:00
Matt Joiner
ff3b74ad88
Prefer UTF-8 fields when present
2022-03-17 15:07:10 +11:00
Matt Joiner
32d89830ed
Use generic pubsub
2022-03-17 14:55:55 +11:00
Matt Joiner
c442a22ac2
Provide context to readahead func
2021-11-15 00:53:42 +11:00
Matt Joiner
c6ee03f449
gofumpt
2021-11-08 14:47:01 +11:00
Matt Joiner
2c70c23ac4
Fix unnecessary modification of Torrent.CancelPieces API
...
https://github.com/anacrolix/torrent/issues/681
2021-10-29 11:52:28 +11:00
Matt Joiner
2be5a95b06
Add reasons for updateRequests to be triggered
2021-10-19 14:08:56 +11:00
Matt Joiner
81c47d5705
Upgrade Torrent.GotInfo
2021-10-07 11:50:30 +11:00
Matt Joiner
fd8995dcfd
go fmt ./...
2021-10-05 17:48:52 +11:00
YenForYang
ebb7160599
Inlineable `(*Torrent).Seeding()` ( #626 )
2021-09-15 10:28:14 +10:00
YenForYang
e105d8b57a
Inlineable `(*Torrent).SetDisplayName()` ( #625 )
2021-09-15 10:27:52 +10:00
YenForYang
542970b961
Inlineable `(*Torrent).PieceState()` ( #621 )
2021-09-15 10:14:28 +10:00
YenForYang
d00ba917c0
Inlineable `(*Torrent).AddPeers()` ( #622 )
2021-09-15 10:14:07 +10:00
YenForYang
a0fe0a087d
Inlineable `DownloadPieces()` and `CancelPieces()` ( #623 )
2021-09-15 10:13:46 +10:00
YenForYang
5c440e8929
Simplify (*Torrent).gotMetainfo ( #581 )
2021-09-13 11:41:11 +10:00
Matt Joiner
7378d50a3c
Fix Torrent.Drop to wait for storage close without client lock
2021-09-11 11:39:33 +10:00
Matt Joiner
58483ae399
Make readahead algorithm linear
2021-09-09 22:19:48 +10:00
Matt Joiner
e8b496bee6
Add default sqrt readahead algorithm
2021-09-09 22:19:48 +10:00
Matt Joiner
4912ae2781
Extract common Torrent.newReader
2021-09-09 22:19:48 +10:00
YenForYang
cce8c150c2
PieceStateRuns: reduce copying and make inlineable
...
Just a heads up: using `range` and/or `defer` prevents function inlining. This is fine for infrequently called functions and/or large functions, but for simple public methods like these, I'd assume it's better for them to be inlined.
2021-09-01 14:51:45 +10:00
Matt Joiner
e04c9a13f1
Precompute File.DisplayPath
...
This is an optimization for dir lookups in torrentfs.
2021-08-01 22:01:24 +10:00
Matt Joiner
4ab20f60b6
Improve some lock handling under panics
2021-05-14 15:36:53 +10:00
Matt Joiner
c81da2d5ee
Strictly adher to tracker announce response intervals if a torrent is private
2020-12-09 22:36:57 +11:00
Matt Joiner
cb37a914c1
Rename Peer to PeerInfo, and unexport PeerInfos
2020-05-29 19:44:48 +10:00
Matt Joiner
2f3d41765b
Fix race in Torrent.PeerConns
2020-04-16 17:21:15 +10:00
Matt Joiner
c2210c058c
Fix pending peer counts in transfer tests
...
Also expose number of peers successfully added in some method returns.
2020-04-16 14:09:45 +10:00
Matt Joiner
ea71bf770c
Expose PieceStateRun formatting
2020-02-27 16:42:33 +11:00
Matt Joiner
c855c7a366
Differentiate between storage.ClientImpl{,Closer}
2020-02-21 14:12:44 +11:00
Matt Joiner
dff436f102
Rename connection->PeerConn and fix exports
2020-02-21 11:07:50 +11:00
Matt Joiner
4104880a66
Remove unnecessary locking in Torrent.Piece
2019-12-18 16:49:15 +11:00
Yates
790ba6af3c
use path.utf8 first for some torrent ( #350 )
2019-12-08 20:35:40 +11:00
Matt Joiner
cb1bf0f413
goimports -local
2019-08-21 20:58:40 +10:00
Matt Joiner
499b2d8725
Fix race condition in Torrent.SetDisplayName
2019-03-20 11:01:56 +11:00
Matt Joiner
3920c6c325
Fix race in Torrent.String
2019-03-12 11:22:25 +11:00
Matt Joiner
9ea65d672f
Torrent.String: Quote raw names
2019-02-16 18:33:14 +11:00
Matt Joiner
366ead7d65
Switch to Client read locks for a few methods
2019-01-08 15:46:03 +11:00
Matt Joiner
fc4fab91f5
Switch to goimports import sorting
...
Used to use sortimports, but it's old, and goimports seems to have an opinion now.
2018-11-02 23:12:01 +11:00
Matt Joiner
6dd3b9c12c
Law of Demeter Client.mu
2018-07-25 13:42:28 +10:00
Matt Joiner
f5bd377941
Change pieceIndex to peer_protocol.Integer
2018-07-12 09:15:15 +10:00
Matt Joiner
a1fabaf2f8
Improve Torrent.DownloadPieces documentation
...
Was mentioned in Gitter.
2018-05-18 14:06:28 +10:00
Matt Joiner
37272a391b
Avoid race in test
2018-01-27 14:31:46 +11:00
Matt Joiner
8c6d0440c2
Improve Torrent.BytesCompleted comment
2018-01-27 14:31:46 +11:00
Matt Joiner
52524925d2
Add separate piece priorities, and cache pending pieces
...
Should fix a bug where prioritizing files is not alone sufficient to trigger downloading.
2018-01-25 17:18:36 +11:00
Matt Joiner
0b553b296f
Add File priorities
...
Fixes #220 .
2018-01-21 22:49:12 +11:00
Matt Joiner
87a033e074
Readers obtained from File.NewReader should not readahead into other Files
...
Fixes #221 . Additionally Torrent.length is a pointer and isn't set until the info is available to avoid it defaulting to zero.
2018-01-06 23:15:41 +11:00
Matt Joiner
9b718566ba
Add File.NewReader
...
Fixes #222
2018-01-06 16:37:13 +11:00