|
|
@ -94,6 +94,8 @@ public class Add extends Activity { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Magnet scheme is not supported by java.net.URL so instead we consider this to be okay manually
|
|
|
|
|
|
|
|
if (urlText != null && !urlText.startsWith("magnet")) { |
|
|
|
// Check URL structure
|
|
|
|
// Check URL structure
|
|
|
|
try { |
|
|
|
try { |
|
|
|
new URL(urlText); // Nothing is actually done with it; only for parsing
|
|
|
|
new URL(urlText); // Nothing is actually done with it; only for parsing
|
|
|
@ -101,6 +103,7 @@ public class Add extends Activity { |
|
|
|
Toast.makeText(this, R.string.no_valid_url, Toast.LENGTH_SHORT).show(); |
|
|
|
Toast.makeText(this, R.string.no_valid_url, Toast.LENGTH_SHORT).show(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Create a result for the calling activity
|
|
|
|
// Create a result for the calling activity
|
|
|
|
Intent i = new Intent(this, Torrents.class); |
|
|
|
Intent i = new Intent(this, Torrents.class); |
|
|
|