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

Seed only when I am the only seeder #182

Open
mitar opened this issue Dec 28, 2024 · 9 comments
Open

Seed only when I am the only seeder #182

mitar opened this issue Dec 28, 2024 · 9 comments

Comments

@mitar
Copy link

mitar commented Dec 28, 2024

I could not find a way to fine-tune seeding strategy? I would like to be configure seeding only when I am the only seeder, so to seed rare files, but not seed otherwise. Like an archive for less popular torrents. In library mode.

I would guess I would need a notify channel to be informed about all changes to peers and when there is no peer which seeds, I start seeding? But I am not sure if it is really possible to get full seeding information for a torrent as a client? Probably only trackers have full information?

@cenkalti
Copy link
Owner

Because of the current design, you can't see the number of seeders without starting the torrent. To find out the seeder count, the torrent client needs to send an announce request first. I'm not sure how to get the seeder count for stopped torrents.

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Jan 30, 2025
@mitar
Copy link
Author

mitar commented Jan 30, 2025

Because of the current design, you can't see the number of seeders without starting the torrent. To find out the seeder count, the torrent client needs to send an announce request first. I'm not sure how to get the seeder count for stopped torrents.

But can one the torrent client announce the torrent, but just do not upload any data until it is the only seed?

@github-actions github-actions bot removed the stale label Jan 31, 2025
@cenkalti
Copy link
Owner

cenkalti commented Feb 2, 2025

I don't think this is the right way to implement it. Imagine two clients act like this and won't upload until they're the only seeder. A third peer connecting as a leecher wouldn't download the torrent because the two seeders won't upload, each thinking the other will.

There is a method to get seeder statistics from a tracker. It's called scraping, but it hasn't been implemented in Rain yet. I think it can be added for stopped torrents too.

I've gathered some resources for future implementation:

If we just implement func Torrent.Scrape() ScrapeResult you can write your own loop to have a custom logic on when to start/stop torrents.

@mitar
Copy link
Author

mitar commented Feb 3, 2025

Great point! Thanks.

Copy link

github-actions bot commented Mar 6, 2025

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Mar 6, 2025
@mitar
Copy link
Author

mitar commented Mar 6, 2025

Unstale.

@github-actions github-actions bot removed the stale label Mar 7, 2025
Copy link

github-actions bot commented Apr 6, 2025

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Apr 6, 2025
@mitar
Copy link
Author

mitar commented Apr 6, 2025

Unstale.

@github-actions github-actions bot removed the stale label Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants