Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what does the letter P stand for? #1087

Open
i990049 opened this issue Nov 21, 2024 · 5 comments
Open

what does the letter P stand for? #1087

i990049 opened this issue Nov 21, 2024 · 5 comments

Comments

@i990049
Copy link

i990049 commented Nov 21, 2024

in other bt client p stand for peer, only include the unfinished users.
elementum's letter P include both the fished seeds and the unfinished peers according to the tracker. Is it possible to subtract the number of seeds from P?
wukong1732200495616

@antonsoroko
Copy link

antonsoroko commented Nov 22, 2024

@i990049

Is it possible to subtract the number of seeds from P?

for 1 (1!!!!!!) file only torrent it already does that. (not torrent with sample or .txt or season pack).
peersTotal := max(ts.GetListPeers()-ts.GetListSeeds()

see https://github.com/elgatito/elementum/blob/638d5c307b53763e752a698252ecb03de06e085a/bittorrent/torrent.go#L323-L327

	seeds := ts.GetNumSeeds()
	seedsTotal := max(ts.GetListSeeds(), ts.GetNumComplete())

	peers := ts.GetNumPeers() - ts.GetNumSeeds()
	peersTotal := max(ts.GetListPeers()-ts.GetListSeeds(), ts.GetNumComplete()+ts.GetNumIncomplete())

then open https://www.libtorrent.org/reference-Torrent_Status.html#torrent_status

num_seeds - the number of peers that are seeding that this client is currently connected to.
num_peers - the number of peers this torrent currently is connected to.
list_seeds - the number of seeds in our peer list
list_peers - the total number of peers (including seeds)
num_complete - the total number of peers that have the whole file
num_incomplete - the total number of peers that are still downloading

BUT since elementum can download 1 file from torrent that has many files, it considers peer that this file as seed, even if this peer has only this file and thus considered by tracker as peer.

example: season pack, or movie with sample.
so if i have movie file, but i do not have sample file, then for tracker i am a peer, but for you (who downloads only movie file) - i am a seed.

@i990049
Copy link
Author

i990049 commented Nov 22, 2024

other BT client use
num_complete
num_incomplete
elementum use
num_seeds
num_peers

Goldfinger 2023 BluRay 1080p x265 10bit 2Audio DDP5.1 MNHD-FRDS/
金手指.The.Goldfinger.2023.BluRay.1080p.x265.10bit.2Audio.DDP5.1.MNHD-FRDS.mkv

the torrent is one folder contain one mkv
in qbittorrent, peers=unfinished users=95-48=47
in elementum, peers=unfinished and finished users=48+47=95
is it possible to let elemenum to display unfinished users/num_incomplete 47?

@antonsoroko
Copy link

is it possible to let elemenum to display unfinished users 47?

It is possible of course. I showed you the code.

But what about multi file torrents? Read above my explanation about it. Your change will break that logic.
You will need to create complex logic for different use cases. I'm not sure that anyone want to do this.

@i990049
Copy link
Author

i990049 commented Nov 22, 2024

use
num_complete
num_incomplete
will be the same as the other BT client, no matter how many files you download.

@antonsoroko
Copy link

antonsoroko commented Nov 22, 2024

That's up to @elgatito to decide, he introduced that logic.

I mean I can make a change in code, you can make a change as well, but if elgatito will not agree - this change will not be accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants