@ -114,7 +114,7 @@ public class TransmissionAdapter implements IDaemonAdapter {
@@ -114,7 +114,7 @@ public class TransmissionAdapter implements IDaemonAdapter {
@ -286,6 +286,10 @@ public class UtorrentAdapter implements IDaemonAdapter {
@@ -286,6 +286,10 @@ public class UtorrentAdapter implements IDaemonAdapter {
@ -304,7 +308,11 @@ public class UtorrentAdapter implements IDaemonAdapter {
@@ -304,7 +308,11 @@ public class UtorrentAdapter implements IDaemonAdapter {
// Auth token was invalidated; retry at max 3 times
authtoken=null;// So that ensureToken() will request a new token on the next try
if(retried<2){
returnmakeUtorrentRequest(addToUrl,retried++);
}
thrownewDaemonException(ExceptionType.AuthenticationFailure,"Response was '"+result.replace("\n","")+"' instead of a proper JSON object (and we used auth token '"+authtoken+"')");
}
JSONObjectjson=newJSONObject(result);
@ -329,7 +337,7 @@ public class UtorrentAdapter implements IDaemonAdapter {
@@ -329,7 +337,7 @@ public class UtorrentAdapter implements IDaemonAdapter {
if(authtoken==null){
// Make a request to /gui/token.html
// See http://trac.utorrent.com/trac/wiki/TokenSystem
// See https://github.com/bittorrent/webui/wiki/TokenSystem