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

[Feature] Add option to set 'obsolete'-tag to private torrents that are not needed but kept anyway. #194

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from

Conversation

Dark3clipse
Copy link

Description
This feature introduces an option to tag torrents in qBittorrent that are determined to no longer be needed by the *arrs. This allows third-party tools to remove these torrents at a later stage when seeding requirements are met.

Use case
You have private trackers and want to make sure that you meet the seeding requirements before removing these torrents. Sometimes, torrents are no longer needed by the *arrs. You would like to remove these torrents after the seeding requirements are met. A tool like qbit_manage can do this for you.

However, such tools would need to know which torrents are no longer needed (obsolete) by the *arrs. By making decluttarr tag these torrents, third party tools such as qbit_manage can be used to cleanup these torrents after seeding requirements are met.

Changes

  • Add new option 'OBSOLETE_QBIT_TAG' to the configuration.
  • Create a description for the new option in the readme.
  • Add function to create the tag in qBittorrent if it doesn't exist yet.
  • Add logic in shared.py to set the tag using a post request.

@ManiMatter
Copy link
Owner

hi @Dark3clipse, thanks for your contribution.

The behavior is not entirely clear to me, here are a few thoughts.

  1. Could you please take care of the merge conflicts / rebase to the dev-branch commit
  2. I would expect that a boolean variable enables/disables this behavior, not the tag itself
  3. The tag should only be created if the feature is being used in qbit
  4. Readme is not self explanatory for me, if you maybe could take care of 2) and 3) and the update the readme, that'd be appreciated

@Dark3clipse
Copy link
Author

Thank you for the feedback, I will rework the code.

@Dark3clipse
Copy link
Author

Dark3clipse commented Dec 20, 2024

It is not clear to me what you mean with:
3. The tag should only be created if the feature is being used in qbit

We have no knowledge of what other tools are managing/using qbit (such as qbitmanage). Also, I think decluttarr should not have to know. You just set the feature to True if you want to use it imo. qbit itself is not 'using' the tags.

I do check the existence of the tag in qbittorrent (see loadScripts.py) and create it if the feature is enabled and the tag string is not empty.

@Dark3clipse
Copy link
Author

Except for your 3rd point, the code should be reworked now. Could you have another look to see if your concerns have been addressed? Thank you :)

Copy link
Owner

@ManiMatter ManiMatter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey!

Almost there I think.

Please can you have a look at my comments.
Also, I saw the unit tests failed in the github actions, pls can you check?

src/utils/loadScripts.py Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
main.py Outdated Show resolved Hide resolved
src/utils/loadScripts.py Outdated Show resolved Hide resolved
src/utils/shared.py Outdated Show resolved Hide resolved
src/utils/shared.py Outdated Show resolved Hide resolved
src/utils/shared.py Outdated Show resolved Hide resolved
@Dark3clipse
Copy link
Author

I'll need some time due to Christmas with in laws, I will come back and address the remaining work in a couple of days if that's okay. Again, thank you a lot for the feedback. Let's make this feature solid :) Wish you a nice holiday season as well.

@Dark3clipse
Copy link
Author

I've resolved the issues and applied your requested changes. Let me know what you think. Apologies for the delay, it has been a busy time for me. Also I've made sure the tests are passing now.

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