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

Added the ability to include uncategorized torrents. #1

Merged
merged 7 commits into from
Oct 22, 2020
Merged

Added the ability to include uncategorized torrents. #1

merged 7 commits into from
Oct 22, 2020

Conversation

Gabisonfire
Copy link
Contributor

I don't use categories and qBittorrent does not provide an option to set a default one.

Copy link
Owner

@esanchezm esanchezm left a 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?

@Gabisonfire
Copy link
Contributor Author

Sure makes sense! Just pushed with the configs removed. I'm opening another issue for a seperate topic as well.

Copy link
Owner

@esanchezm esanchezm left a 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 😄

@@ -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"),
Copy link
Owner

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 😄

Copy link
Contributor Author

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

Copy link
Owner

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 😄

Copy link
Contributor Author

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

@esanchezm
Copy link
Owner

Thank you very much @Gabisonfire ! I'll prepare a release soon

@esanchezm esanchezm merged commit 53dc38f into esanchezm:master Oct 22, 2020
@Gabisonfire
Copy link
Contributor Author

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

@esanchezm
Copy link
Owner

Thanks! I tried to set it up along with a docker build & push action

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.

None yet

2 participants