-
Notifications
You must be signed in to change notification settings - Fork 278
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
add support for new DownloadStation API #9555
Conversation
BenjV
commented
May 18, 2021
- PR is based on the DEVELOP branch
- Don't send big changes all at once. Split up big PRs into multiple smaller PRs that are easier to manage and review
- Read the contribution guide
Ow you did a new pr. Good. |
I did a review on generic.py first. As this is the more critical module of the two, as it's used by all the supported torrent clients. We need to make sure that all clients work as expected with these changes. Just from reading all these code changes in it, I'm not 100% sure it will. So the only way to know is to test it. If you want to go through with the refactor to generic, I suggest you use docker to run them. Maybe this can be of help. When I have more time I'll go through the downloadstation.py changes. Although those looked okay at first sight. Except from the code styling and linting issues. |
Code styling is a a matter of opinion, so feel free to change it. I use a lot of f-string formatting instead of the old %s and/or .format. |
Can you give me access to your forks branch? Then i'm okay with making some changes to it. And then you can also test them against the downloadstation's api. Alternative is that you make changes that are required to pass the build process, and I make the other changes after merged. But currently it's not building. Btw sorry for my late response. I've had a busy week. |
I have send you an invite for my fork. And by the way, if I look at the reasons why the test are failing, non of those reasons are in the the two modules (generic.py and downloadstation.py) that I changed. |
You can ignore the api test. But the lint test in backend test is failing because of changes in this pr. |
* Use BraceAdapter formatting * Use single quotes for f-strings * Fixed docstrings formatting * Bad newlines * Unused imports / import ordering
I accidentally pushed to the wrong branch name I pushed only a commit that fixes the lining issues. Next is a small refactor to the send_torrent() exception handling part. |
No the jason dump methode does not work, it will convert also things that must not be converted to json. Don't be so stubborn and just accept my correctly working solution. |
I'm not asking for the change because I want to be stubborn. I'm sorry if I gave you that impression. For example. What if you'd loose interest in supporting the downloadstation api in 2 year. If you already tested my proposal before, fine. If not, please consider. If you really don't want to, fine i'll merge as is. |
One of the first things I tested long before you asked it, was your solution with json dumps, but that does not work! Only some of the data fields must be json coded not the whole dict, if you do the whole dict it does not work. Of course there are more ways than f-string to add quotes to those fields, but that would make in even less readable. By the way this API also works for NZB's so if you want I could write an NZB client for Download Station. |
Tnx for your explanation and your patience. Let's park the NZB provider for now. As that would require some more frontend changes. And I don't have much time now |
* No need to initialize result.hash. As this attribute is always available.
Since the latest Something in this PR must have caused it. Reverting back to master fixed the problem. |
@reconman can you confirm that the issue is fixed for you? |
Seems fixed, torrents can be transmitted to transmission again. Thank you. |
@p0psicles |