Browse Source

Merge remote-tracking branch 'origin/dev'

# Conflicts:
#	app/src/main/java/org/transdroid/daemon/task/AddByMagnetUrlTask.java
#	app/src/main/java/org/transdroid/daemon/task/AddByUrlTask.java
pull/585/head
Eric Kok 4 years ago
parent
commit
254588a253
  1. 4
      app/src/main/java/org/transdroid/daemon/task/AddByMagnetUrlTask.java
  2. 5
      app/src/main/java/org/transdroid/daemon/task/AddByUrlTask.java

4
app/src/main/java/org/transdroid/daemon/task/AddByMagnetUrlTask.java

@ -26,14 +26,12 @@ public class AddByMagnetUrlTask extends DaemonTask { @@ -26,14 +26,12 @@ public class AddByMagnetUrlTask extends DaemonTask {
protected AddByMagnetUrlTask(IDaemonAdapter adapter, Bundle data) {
super(adapter, DaemonMethod.AddByMagnetUrl, null, data);
}
public static AddByMagnetUrlTask create(IDaemonAdapter adapter, String url) {
Bundle data = new Bundle();
data.putString("URL", url);
return new AddByMagnetUrlTask(adapter, data);
}
public String getUrl() {
return extras.getString("URL");
return extras.getString("URL").replaceAll("\\s", "");
}
}

5
app/src/main/java/org/transdroid/daemon/task/AddByUrlTask.java

@ -26,18 +26,15 @@ public class AddByUrlTask extends DaemonTask { @@ -26,18 +26,15 @@ public class AddByUrlTask extends DaemonTask {
protected AddByUrlTask(IDaemonAdapter adapter, Bundle data) {
super(adapter, DaemonMethod.AddByUrl, null, data);
}
public static AddByUrlTask create(IDaemonAdapter adapter, String url, String title) {
Bundle data = new Bundle();
data.putString("URL", url);
data.putString("TITLE", title);
return new AddByUrlTask(adapter, data);
}
public String getUrl() {
return extras.getString("URL");
return extras.getString("URL").replaceAll("\\s", "");
}
public String getTitle() {
return extras.getString("TITLE");
}

Loading…
Cancel
Save