diff --git a/res/values/strings.xml b/res/values/strings.xml
index bade7a9..0fb6cbf 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -5,8 +5,8 @@
UPC NEWS
Start Application
Click to Start or go to Settings for Help
- URL server
- Set the route from the server (without http://)
+ Server URL
+ Set the server route (without http://)
Preferences
Help!
Play
diff --git a/src/com/upc/pbe/upcnews/HTMLParser.java b/src/com/upc/pbe/upcnews/HTMLParser.java
index d020572..5fbf19f 100644
--- a/src/com/upc/pbe/upcnews/HTMLParser.java
+++ b/src/com/upc/pbe/upcnews/HTMLParser.java
@@ -90,11 +90,24 @@ public class HTMLParser
filepath = filepath.substring(0, filepath.indexOf("\"")); //Quitamos la morralla del final, nos queda el valor de href sólo.
if(filepath.endsWith(".m3u8")) //Mira que sea una lista.
{
- if(!resources.contains(filepath)) //No seamos repetitivos
+ String filename;
+ //Deteccion de ficheros ocultos
+ if(filepath.indexOf("/") != -1)
{
- resources.add(filepath);
+ filename = filepath.substring(filepath.lastIndexOf("/"));
+ }
+ else
+ {
+ filename = filepath;
+ }
+ if(!filename.startsWith("."))
+ {
+ if(!resources.contains(filepath)) //No seamos repetitivos
+ {
+ resources.add(filepath);
+ }
+ Log.d(TAG, "PLAYLIST FOUND: " + filepath);
}
- Log.d(TAG, "PLAYLIST FOUND: " + filepath);
}
}
}
diff --git a/src/com/upc/pbe/upcnews/Parser.java b/src/com/upc/pbe/upcnews/Parser.java
index 7e6b7c9..b906b0d 100644
--- a/src/com/upc/pbe/upcnews/Parser.java
+++ b/src/com/upc/pbe/upcnews/Parser.java
@@ -159,7 +159,7 @@ public class Parser
{
if (line.substring(0, 4).equals("#EXT"))
{
- if (expectSegment)
+ if (expectSegment && !line.startsWith("#EXT-X-BYTERANGE"))
{
throw new ErrorException("Expected segment URI, got an EXT-TAG instead");
}