diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 28eca8a7..7ac0cf49 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -56,6 +56,13 @@
+
+
+
+
+
+
+
-1) {
throw new LbryUriException("URL cannot include a space.");
}
}
- String streamOrChannelName = components.get(1);
- String primaryModSeparator = components.get(2);
- String primaryModValue = components.get(3);
- String possibleStreamName = components.get(5);
- String secondaryModSeparator = components.get(6);
- String secondaryModValue = components.get(7);
+ String streamOrChannelName = components.get(2);
+ String primaryModSeparator = components.get(3);
+ String primaryModValue = components.get(4);
+ String possibleStreamName = components.get(6);
+ String secondaryModSeparator = components.get(7);
+ String secondaryModValue = components.get(8);
boolean includesChannel = streamOrChannelName.startsWith("@");
boolean isChannel = includesChannel && Helper.isNullOrEmpty(possibleStreamName);
String channelName = includesChannel && streamOrChannelName.length() > 1 ? streamOrChannelName.substring(1) : null;
+
+ // It would have thrown already on the RegEx parser if protocol value was incorrect
+ // open.lbry.com uses ':' as ModSeparators while lbry:// expects '#'
+ if (components.get(1).equals("open.lbry.com/")) {
+ if (primaryModSeparator.equals(":"))
+ primaryModSeparator = "#";
+ if (secondaryModSeparator.equals(":"))
+ secondaryModSeparator = "#";
+ }
+
if (includesChannel) {
if (Helper.isNullOrEmpty(channelName)) {
throw new LbryUriException("No channel name after @.");
@@ -147,7 +160,7 @@ public class LbryUri {
LbryUri uri = new LbryUri();
uri.setChannel(isChannel);
- uri.setPath(Helper.join(components.subList(1, components.size()), ""));
+ uri.setPath(Helper.join(components.subList(2, components.size()), ""));
uri.setStreamName(streamName);
uri.setStreamClaimId(streamClaimId);
uri.setChannelName(channelName);