diff --git a/src/com/upc/pbe/upcnews/Parser.java b/src/com/upc/pbe/upcnews/Parser.java index 7939d86..cb7ce87 100644 --- a/src/com/upc/pbe/upcnews/Parser.java +++ b/src/com/upc/pbe/upcnews/Parser.java @@ -20,11 +20,14 @@ public class Parser{ private boolean expectList = false; private Descarrega download; private Activity caller; //On enviar les notificacions i warnings - private boolean validated; //Indica si la llista comença amb #EXTM3U o no + private boolean validated; //Indica si la llista comen�a amb #EXTM3U o no + private String server; public Parser(String p, Activity caller){ this.caller = caller; path = p; + String host = p.substring(7); + server = host.substring(0,host.indexOf("/")); currentLine = 0; currentSegment = 0; currentList = 0; @@ -355,6 +358,14 @@ public class Parser{ if (expectSegment){ expectSegment = false; try{ + if(!line.startsWith("http://") && !line.startsWith("/")) + { + line = path + line; + } + else if(line.startsWith("/")) + { + line = server + line; + } pls.getSegments().get(currentSegment).setURL(line); } catch (MalformedURLException e){