-
Notifications
You must be signed in to change notification settings - Fork 125
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
transmission module: fixed rpc url config parameter for custom webroot #330
Conversation
@@ -564,6 +564,11 @@ | |||
'description': 'Transmission Hostname', | |||
}, | |||
{ | |||
'key': 'transmission_rpcurl', | |||
'value': 'transmssion', |
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.
looks like there is a typo here: "transmssion"?
…he transmission client's own url building, this now allows you specifiy the full url in the settings, for custom webroots
thanks, i have i found the root of the problem. it appears that in the function get_settings_value
which means the URL is being stripped of the HTTP this breaks the lib/transmission/client.py where it expects a url scheme in address.
so really what we need is a get_settings_value without a strip for transmission. I have updated the pull request for this. |
is there a problem with this PR? any reason why it hasn't been pulled? |
I'm not sure what the problem is. I have tried transmission module with ip address and http:https:// + ipaddress and both work. what exactly is this fixing (how can the issue be replicated?) |
To Replicate: Change transmission webroot to something other than "/transmission", I have changed mine to "/bt" so the url to reach transmission is This is what I need to set so that we can still get status from transmission. The problem is that when we save it we strip out the http or https which breaks then transmision client lib that we are using. |
OK. I now see how your fix tricks the client library to work. IMO this is not the prefered way to fix the issue. I think some parsing should be done in modules/transmission.py to make sure we send the right data to the client lib. AFAIK the "app_link" function also does not parse urls correctly in this module. |
IMO the saving should not strip out stuff in general. Why are we removing information and trying to rebuild it later, instead we can give all the info to the various modules and have them work it. |
the thing I'm worried about is if someone enters a url like this: 192.168.1.11:9091/bt/rpc Because the http is not there the client lib will handle it a different way and just add "/transmission/rpc" to the end of it. Thats why I think we need to parse it first. |
other bits of software usually allow the storing of a "webroot" as well, for example the sabnzbd settings includes "Webroot" so maybe just adding that to transmission fixes it..too |
i have no idea if transmission supports https or not but many other apps do and we need to know whether or not we are parsing a secure url or not. Adding webroot as an option in transmission module is exactly what I am doing. |
Cool. That works, I was trying to keep settings/parameter creep down, and was using the existing param but to your other point that if folks didn't provide the http(s) that would break it |
@vajonam can you please test with this branch: https://github.com/N3MIS15/maraschino/tree/trans_webroot |
works fine. |
add rpc url as configurable parameter for transmission module.