Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #118 from lgallard/testing
Browse files Browse the repository at this point in the history
Release 4.4.5
  • Loading branch information
lgallard authored Nov 15, 2016
2 parents 349cb1c + 7fc86ac commit 5595a01
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 24 deletions.
30 changes: 15 additions & 15 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/proDebug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/proDebug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/proDebug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/pro/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/pro/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/pro/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/pro/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/pro/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/pro/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/pro/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testProDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testProDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testProDebug/assets" type="java-test-resource" />
Expand All @@ -58,6 +51,13 @@
<sourceFolder url="file://$MODULE_DIR$/src/testProDebug/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testProDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testProDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/pro/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/pro/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/pro/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/pro/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/pro/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/pro/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/pro/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/pro/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/pro/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/pro/assets" type="java-resource" />
Expand Down Expand Up @@ -106,14 +106,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
Expand All @@ -122,6 +114,14 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ android {
productFlavors {
pro {
applicationId 'com.lgallardo.qbittorrentclientpro'
versionName '4.4.4'
versionName '4.4.5'
minSdkVersion 14
targetSdkVersion 23
versionCode 444
versionCode 445
archivesBaseName = "qBittorrentController_v" + versionName
}
free {
applicationId "com.lgallardo.qbittorrentclient"
versionName '4.4.4'
versionName '4.4.5'
minSdkVersion 14
targetSdkVersion 23
versionCode 444
versionCode 445
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ protected void onCreate(Bundle savedInstanceState) {
// Get preferences
getSettings();

MainActivity.cookie = null;

// Set alarm for checking completed torrents, if not set
if (PendingIntent.getBroadcast(getApplication(), 0, new Intent(getApplication(), NotifierService.class), PendingIntent.FLAG_NO_CREATE) == null) {

Expand Down Expand Up @@ -2817,7 +2819,7 @@ protected void getSettings() {

qb_version = sharedPrefs.getString("qb_version", "3.2.x");

MainActivity.cookie = sharedPrefs.getString("qbCookie", null);
// MainActivity.cookie = sharedPrefs.getString("qbCookie", null);

// Get last state
lastState = sharedPrefs.getString("lastState", "all");
Expand Down Expand Up @@ -3302,6 +3304,7 @@ protected void onPostExecute(String[] result) {
} else if (apiVersion.contains("3.1")) {

qb_version = "3.1.x";
cookie = null;

} else {

Expand Down Expand Up @@ -3369,7 +3372,7 @@ protected String[] doInBackground(String... params) {
// Log.d("Debug", params[0]);
}
} catch (NumberFormatException e) {
Log.e("Debug", e.toString());
// Log.e("Debug", e.toString());
}


Expand Down Expand Up @@ -3629,6 +3632,11 @@ protected Torrent[] doInBackground(String... params) {

JSONObject json = jArray.getJSONObject(i);

Log.d("Debug", "name: " + json.getString(TAG_NAME));
Log.d("Debug", "size: " + json.getString(TAG_SIZE));
Log.d("Debug", "progress: " + json.getString(TAG_PROGRESS));
Log.d("Debug", "qb_version: " + qb_version);

name = json.getString(TAG_NAME);
size = json.getString(TAG_SIZE).replace(",", ".");
progress = String.format("%.2f", json.getDouble(TAG_PROGRESS) * 100) + "%";
Expand Down Expand Up @@ -3664,7 +3672,7 @@ protected Torrent[] doInBackground(String... params) {
label = json.getString(TAG_CATEGORY);
}

} catch (JSONException je) {
} catch (Exception e) {
label = null;
}

Expand Down Expand Up @@ -3751,7 +3759,8 @@ protected Torrent[] doInBackground(String... params) {

} catch (Exception e) {
torrents = null;
Log.e("MAIN:", e.toString());
Log.e("MAIN:=", e.toString());
e.printStackTrace();

if (CustomLogger.isMainActivityReporting()) {
CustomLogger.saveReportMessage("Main", "[qBittorrentTask - Exception]: " + e.toString());
Expand Down Expand Up @@ -3954,7 +3963,7 @@ protected void onPostExecute(Torrent[] result) {

// Log.d("Debug", "currentLabel: " + currentLabel);

if (labels != null) {
if (labels != null && !(labels.contains(null))) {
// Sort labels
Collections.sort(labels);

Expand Down

0 comments on commit 5595a01

Please sign in to comment.