@ -592,6 +592,12 @@ public class BitCometAdapter implements IDaemonAdapter {
@@ -592,6 +592,12 @@ public class BitCometAdapter implements IDaemonAdapter {
// End of a 'transfer' item, add gathered torrent data
@ -656,10 +662,10 @@ public class BitCometAdapter implements IDaemonAdapter {
@@ -656,10 +662,10 @@ public class BitCometAdapter implements IDaemonAdapter {
status=convertStatus(xpp.getText());
break;
case"bytes_downloaded":
sizeDone=Integer.parseInt(xpp.getText());
sizeDone=Long.parseLong(xpp.getText());
break;
case"bytes_uploaded":
sizeUp=Integer.parseInt(xpp.getText());
sizeUp=Long.parseLong(xpp.getText());
break;
case"size":
totalSize=Long.parseLong(xpp.getText());
@ -778,6 +784,10 @@ public class BitCometAdapter implements IDaemonAdapter {
@@ -778,6 +784,10 @@ public class BitCometAdapter implements IDaemonAdapter {
@ -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