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

Ratio and seed_time #116

Open
anasty17 opened this issue Aug 4, 2022 · 15 comments
Open

Ratio and seed_time #116

anasty17 opened this issue Aug 4, 2022 · 15 comments
Assignees
Labels
feature Feature request or related

Comments

@anasty17
Copy link

anasty17 commented Aug 4, 2022

Hi, hope you doing well

Can you add seed_ratio and seed_time in download class. So we can view how much this torrent has seed time and seed ratio.

Thanks

@anasty17 anasty17 added the feature Feature request or related label Aug 4, 2022
@pawamoy
Copy link
Owner

pawamoy commented Aug 17, 2022

Hello, I'm doing OK, thank you 🙂
Could you give an example of what seed ratio and seed time should look like? Or describe them? Can they be computed from the already available fields? If yes, do you happen to know the computation? We can definitely add properties to the Download class.

@anasty17
Copy link
Author

anasty17 commented Aug 17, 2022

Download.seed_ratio will return self.upload_length / self.completed_length

Seed time: On bt_download_complete or when Download.seeder is True we should save the start_time
Then Download.seed_time will return time() - self.seed_start_time

@pawamoy
Copy link
Owner

pawamoy commented Aug 17, 2022

That's great, thanks a lot! I'll see if I can incorporate this in the code soon 🙂 A PR is also welcome of course 😄

@anasty17
Copy link
Author

Yeah i will try to read how ur code works, if it's simple and direct then i will open PR.
Thanks

@anasty17
Copy link
Author

I was reading now. I have no idea how to save the start time for seed after on_bt_download_complete in efficient way. This the only problem, the rest is very simple.

@pawamoy
Copy link
Owner

pawamoy commented Aug 26, 2022

Just so you know, I've seen your last comment but didn't get the chance to answer yet. I'll keep this closed because if aria2 doesn't provide start time, it will be hard to provide it ourselves, but I'd still like to think about it a bit :)

@anasty17
Copy link
Author

It's ok 👍

@iambeingtracked
Copy link

Hello,

I think seed ratio should be added, aria2c reports it while seeding a torrent

@pawamoy
Copy link
Owner

pawamoy commented Feb 18, 2023

Hi @iambeingtracked, would you to send a PR for it? It's a pretty easy addition 🙂

@anasty17
Copy link
Author

Hello,

I think seed ratio should be added, aria2c reports it while seeding a torrent

Yeqh seed ratio is easy to add but seed time need to save onComplete time and save it with gid

@pawamoy
Copy link
Owner

pawamoy commented Feb 18, 2023

Seed time will be much more complicated indeed. It can be done in another PR if someone wants to try and tackle it.

@anasty17
Copy link
Author

anasty17 commented Feb 18, 2023

It can be done. Add global dict key: gid, value: complete_time when download complete if not metadata. And if torrent removed check if gid in dict and remove it. But this also need to use threading.Lock with it.

@Lyken17
Copy link

Lyken17 commented Nov 28, 2023

Hi there, any progress on this thread?

@pawamoy
Copy link
Owner

pawamoy commented Nov 28, 2023

It's in my saved notifications. Pull requests are welcome 🙂

@pawamoy pawamoy reopened this Nov 30, 2023
@pawamoy pawamoy self-assigned this Nov 30, 2023
@anasty17
Copy link
Author

Maybe in couples of days
When i get some free time, I will add them for api

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

No branches or pull requests

4 participants