-
Notifications
You must be signed in to change notification settings - Fork 23
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
Added the ability to include uncategorized torrents. #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Gabisonfire, thank you very much for the PR and your interest in this small software :)
I think your idea is great and of course you're covering a case I didn't have in mind. However, I think this is not an edge case and Uncategorized
torrents should be always counted (as they're the default category).
So, I think you can simplify it by just dropping the configuration file, it will be pretty simple as the only lines you shoud keep are 129 and almost entire line 131 (minus the self.INCLUDE_UNCATEGORIZED
part)
What do you think?
Sure makes sense! Just pushed with the configs removed. I'm opening another issue for a seperate topic as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just another minor thing that I think you forgot to remove 😄
qbittorrent_exporter/exporter.py
Outdated
@@ -166,7 +168,8 @@ def main(): | |||
"username": os.environ.get("QBITTORRENT_USER", ""), | |||
"password": os.environ.get("QBITTORRENT_PASS", ""), | |||
"exporter_port": int(os.environ.get("EXPORTER_PORT", "8000")), | |||
"log_level": os.environ.get("EXPORTER_LOG_LEVEL", "INFO") | |||
"log_level": os.environ.get("EXPORTER_LOG_LEVEL", "INFO"), | |||
"include_uncategorized": os.environ.get("QBITTORRENT_INCLUDE_UNCATEGORIZED", "false"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes no sense anymore 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look a commit above your comment: b4aefff
:P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, maybe my comment wasn't clear enough. The changes to these lines are not needed anymore since including uncategorized torrents is the default setting. Hence, it doesn't make sense to add include_uncategorized
to the config dictionary. It's also not used in all the code, so there's no reason to keep this. Hope it's clear now 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhh my bad, I'll fix that tonight
Thank you very much @Gabisonfire ! I'll prepare a release soon |
Have you considered automating your release with github actions? This is what I use https://github.com/Gabisonfire/raincoat/blob/master/.github/workflows/pythonpublish.yml |
Thanks! I tried to set it up along with a docker build & push action |
I don't use categories and qBittorrent does not provide an option to set a default one.