austgl / transdroid

Automatically exported from code.google.com/p/transdroid
GNU General Public License v3.0
0 stars 0 forks source link

Transmission and folder settings #341

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Transmission v2.2 implement a new option rpc-url 
More info 
https://trac.transmissionbt.com/changeset/11524/trunk/libtransmission/rpc-server
.c

By default transmission act like old version so you hit
 * http://seedbox/transmission/rpc

But if I change rpc-url to 
  "rpc-url": "/torrents/"

you should hit 
 * http://seedbox/torrents/rpc

In transdroid I start by settings folder option to match like rpc-url but this 
are a failed

So I take your source to take a look to the source and particularly in your lib 
TransmissionAdapter.java
line 440
return (settings.getSsl() ? "https://" : "http://") + settings.getAddress() + 
":" + settings.getPort() + (settings.getFolder() == null? "": 
settings.getFolder()) + "/transmission/rpc";

I made the change to match the new transmission configuration 
return (settings.getSsl() ? "https://" : "http://") + settings.getAddress() + 
":" + settings.getPort() + (settings.getFolder() == null || 
settings.getFolder().isEmpty()? "/transmission": settings.getFolder()) + "/rpc";

So if folder settings is not set or empty it use /transmission
else it use folder settings

This change works.

Tested with your revision 365 and this line change (some problem with the last 
due to tablet support and and framework v3).

Tested on :
 * Galaxy S v2.3.4
 * Android emulator v2.2

I do the test with:
 * a default transmission configuration ( /transmssion/rpc )
 * a transmission with rpc-url set to "/torrents/"  and settings folder set to "/torrents" in transdroid

I try to upload torrents file from both configurations and it works too.

If you can apply this modification I would be happy (because I use the rpc-url 
settings :) ).

Thank you for this app.

Hugo

PS: When I try to build the lib and the apps apart I do some errors with 
buildpath, so I merged the lib and the src and it works.
But I want to know why this line in your classpath I think is for include the 
lib but I don't arrived to adapt it to match my configuration

<classpathentry combineaccessrules="false" kind="src" path="/Transdroid Torrent 
Connect"/>

Original issue reported on code.google.com by h.ca...@codsec.com on 3 Aug 2011 at 6:00

GoogleCodeExporter commented 9 years ago
I don't really want to break people's setups and this options is not available 
through the GUI so I am hesitant to change this now (even though conceptually 
it would be slightly better). I'll leave this open and see if more people 
request this change before breaking stuff for users.

Original comment by erickok@gmail.com on 21 Feb 2012 at 3:20

GoogleCodeExporter commented 9 years ago

Original comment by erickok@gmail.com on 21 Feb 2012 at 10:05

GoogleCodeExporter commented 9 years ago

Original comment by erickok@gmail.com on 21 Feb 2012 at 10:05

GoogleCodeExporter commented 9 years ago
Hello, any chance this will move on? By the way, it doesn't seem that much of a 
breaking change to me. Few people probably change this setting and then depend 
on the settings.getFolder() + "/transmission/rpc". 

Original comment by akosia...@gmail.com on 19 May 2013 at 6:43

GoogleCodeExporter commented 9 years ago
I'll change this with the new Transdroid version that I am working on. Sorry 
for the inconvience for now.

Original comment by erickok@gmail.com on 29 May 2013 at 11:22

GoogleCodeExporter commented 9 years ago
Fixed in r. Note that this is the new Transdroid 2 development branch, so you 
will need to update to that (currently experimental) version to get the change. 
I will not merge this back to the old Transdroid for compatibility issue 
reasons stated above.

Original comment by erickok@gmail.com on 28 Jun 2013 at 10:54