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

Resume only torrents paused by a script #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FreddieDeWitt
Copy link
Contributor

@FreddieDeWitt FreddieDeWitt commented Oct 29, 2024

New feature:

  • The script stores all the torrents that it paused and starts seeding only the torrents that were paused by the script. This avoids the situations, when a user decided to pause certain torrents, but the script resumes them regardless after the reset.
  • The script will resume the torrents even if it was offline during the reset time. It's implemented by checking the file with paused torrents and calculating if quota for today was reached. If quota wasn't reached, but torrents are paused -> torrents need to be resumed.

Bug fixes:

  • I realized that the current script is tied too heavily to midnight. So if you changes the time to say 18:00, there are some point at which the whole calculation breaks. In the current version, I added the proper calculation that includes the reset time
  • Added two blank lines between each function according to the official style guide

@FreddieDeWitt FreddieDeWitt force-pushed the feature/resume-only-seeding-original branch 5 times, most recently from db5e8db to 73b4dc8 Compare October 29, 2024 18:45
@FreddieDeWitt FreddieDeWitt force-pushed the feature/resume-only-seeding-original branch from 73b4dc8 to 5e6c824 Compare October 29, 2024 18:51
@FreddieDeWitt FreddieDeWitt changed the title Feature/resume only seeding original Resume only torrents paused by a script Oct 29, 2024
@Tetrax-10
Copy link
Owner

Hey thanks for the PR!

Can you create different PRs for different features and fixes? So it will be easy to track them.

Resume only torrents paused by a script #4 should only have code for that and not other stuffs. Hope you understand.

@FreddieDeWitt
Copy link
Contributor Author

FreddieDeWitt commented Nov 2, 2024

Hi! Conceptually, you are absolutely right. However, in this case all of the changes are fewer than 100 lines, so I am really not sure what's the point of spliting the already small PR into even smaller chunks. I can rename the PR so that it's clear that it adds more than just the resume function.

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

Successfully merging this pull request may close these issues.

2 participants