summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/util/URLChecker.java
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2013-09-11 15:09:11 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2013-09-11 15:09:11 +0200
commitcef7772a90b7221de20e0a3176a8fc7d40ec9044 (patch)
tree53307e00a26e105f0cfa73518783187467f3f565 /src/de/danoeh/antennapod/util/URLChecker.java
parent6043f79128586bc2925b81a852f0758a53f7990c (diff)
parent30c681d1cf5e0d33b716f6c8885ab92f46efbaa3 (diff)
downloadAntennaPod-cef7772a90b7221de20e0a3176a8fc7d40ec9044.zip
Merge branch 'release-0975'0.9.7.5
Diffstat (limited to 'src/de/danoeh/antennapod/util/URLChecker.java')
-rw-r--r--src/de/danoeh/antennapod/util/URLChecker.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/de/danoeh/antennapod/util/URLChecker.java b/src/de/danoeh/antennapod/util/URLChecker.java
index 6d9b8ff03..13668d4a9 100644
--- a/src/de/danoeh/antennapod/util/URLChecker.java
+++ b/src/de/danoeh/antennapod/util/URLChecker.java
@@ -19,13 +19,12 @@ public final class URLChecker {
* */
public static String prepareURL(String url) {
StringBuilder builder = new StringBuilder();
- url = url.trim();
- if (!url.startsWith("http")) {
+ if (url.startsWith("feed://")) {
+ if (AppConfig.DEBUG) Log.d(TAG, "Replacing feed:// with http://");
+ url = url.replace("feed://", "http://");
+ } else if (!(url.startsWith("http://") || url.startsWith("https://"))) {
+ if (AppConfig.DEBUG) Log.d(TAG, "Adding http:// at the beginning of the URL");
builder.append("http://");
- if (AppConfig.DEBUG) Log.d(TAG, "Missing http; appending");
- } else if (url.startsWith("https")) {
- if (AppConfig.DEBUG) Log.d(TAG, "Replacing https with http");
- url = url.replaceFirst("https", "http");
}
builder.append(url);