From 6b555c4cc05b079e3c2fe508d2393a272b040921 Mon Sep 17 00:00:00 2001 From: Equip de Desenvolupadors de PBE Date: Wed, 12 Dec 2012 14:53:22 +0000 Subject: [PATCH] Lista de tareas update --- src/com/upc/pbe/upcnews/Parser.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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){ -- libgit2 0.22.2