@ -90,6 +90,10 @@ public class QBittorrentAdapter implements IDaemonAdapter {
@@ -90,6 +90,10 @@ public class QBittorrentAdapter implements IDaemonAdapter {
privateDefaultHttpClienthttpclient;
privateintversion=-1;
privatelonglastAuthTime=-1;
privateintqbNoPriority=0;
privateintqbLowPriority=1;
privateintqbNormalPriority=2;
privateintqbHighPriority=7;
publicQBittorrentAdapter(DaemonSettingssettings){
this.settings=settings;
@ -124,10 +128,14 @@ public class QBittorrentAdapter implements IDaemonAdapter {
@@ -124,10 +128,14 @@ public class QBittorrentAdapter implements IDaemonAdapter {
}
version=parseVersionNumber(versionText);
if(version>=30200){
qbNormalPriority=6;
}
}catch(Exceptione){
// Unable to establish version number; assume an old version by setting it to version 1
version=10000;
qbNormalPriority=2;
}
}
@ -371,13 +379,13 @@ public class QBittorrentAdapter implements IDaemonAdapter {
@@ -371,13 +379,13 @@ public class QBittorrentAdapter implements IDaemonAdapter {
// We have to make a separate request per file, it seems
for(TorrentFilefile:setPrio.getForFiles()){
@ -387,7 +395,7 @@ public class QBittorrentAdapter implements IDaemonAdapter {
@@ -387,7 +395,7 @@ public class QBittorrentAdapter implements IDaemonAdapter {
@ -891,11 +899,11 @@ public class QBittorrentAdapter implements IDaemonAdapter {
@@ -891,11 +899,11 @@ public class QBittorrentAdapter implements IDaemonAdapter {
privatePriorityparsePriority(intpriority){
// Priority is an integer
// Actually 1 = Normal, 2 = High, 7 = Maximum, but adjust this to Transdroid values