Commit 87b49fef18bc75c71e8a878f72f43e7e450eca06
1 parent
a88fea37
--no commit message
Showing
2 changed files
with
80 additions
and
71 deletions
gen/com/upc/pbe/upcnews/R.java
1 | -/* AUTO-GENERATED FILE. DO NOT MODIFY. | ||
2 | - * | ||
3 | - * This class was automatically generated by the | ||
4 | - * aapt tool from the resource data it found. It | ||
5 | - * should not be modified by hand. | ||
6 | - */ | ||
7 | - | ||
8 | -package com.upc.pbe.upcnews; | ||
9 | - | ||
10 | -public final class R { | ||
11 | - public static final class attr { | ||
12 | - } | ||
13 | - public static final class drawable { | ||
14 | - public static final int ic_action_search=0x7f020000; | ||
15 | - public static final int ic_launcher=0x7f020001; | ||
16 | - public static final int ic_menu_name=0x7f020002; | ||
17 | - } | ||
18 | - public static final class id { | ||
19 | - public static final int AbsoluteLayout1=0x7f080009; | ||
20 | - public static final int ImageView01=0x7f08000b; | ||
21 | - public static final int ImageView1=0x7f08000a; | ||
22 | - public static final int LinearLayout1=0x7f080000; | ||
23 | - public static final int button=0x7f08000e; | ||
24 | - public static final int button1=0x7f080002; | ||
25 | - public static final int button2=0x7f080003; | ||
26 | - public static final int button3=0x7f080004; | ||
27 | - public static final int button4=0x7f080005; | ||
28 | - public static final int button5=0x7f080006; | ||
29 | - public static final int itemhelp=0x7f080011; | ||
30 | - public static final int itemprefs=0x7f080010; | ||
31 | - public static final int menu_settings=0x7f08000f; | ||
32 | - public static final int textView1=0x7f080007; | ||
33 | - public static final int textView2=0x7f080008; | ||
34 | - public static final int textViewRoute=0x7f08000c; | ||
35 | - public static final int textViewTitle=0x7f080001; | ||
36 | - public static final int textViewXml=0x7f08000d; | ||
37 | - } | ||
38 | - public static final class layout { | ||
39 | - public static final int dirs=0x7f030000; | ||
40 | - public static final int help=0x7f030001; | ||
41 | - public static final int main_activity=0x7f030002; | ||
42 | - } | ||
43 | - public static final class menu { | ||
44 | - public static final int activity_main=0x7f070000; | ||
45 | - public static final int menu=0x7f070001; | ||
46 | - } | ||
47 | - public static final class string { | ||
48 | - public static final int app_name=0x7f050000; | ||
49 | - public static final int button=0x7f05000c; | ||
50 | - public static final int button1=0x7f05000d; | ||
51 | - public static final int desc=0x7f050009; | ||
52 | - public static final int descarregar=0x7f050003; | ||
53 | - public static final int dir=0x7f05000a; | ||
54 | - public static final int directoris=0x7f05000b; | ||
55 | - public static final int help=0x7f050008; | ||
56 | - public static final int hint=0x7f050004; | ||
57 | - public static final int logodescription=0x7f05000f; | ||
58 | - public static final int menu_settings=0x7f050001; | ||
59 | - public static final int prefs=0x7f050007; | ||
60 | - public static final int title=0x7f05000e; | ||
61 | - public static final int title_activity_main=0x7f050002; | ||
62 | - public static final int url=0x7f050005; | ||
63 | - public static final int urlhint=0x7f050006; | ||
64 | - } | ||
65 | - public static final class style { | ||
66 | - public static final int AppTheme=0x7f060000; | ||
67 | - } | ||
68 | - public static final class xml { | ||
69 | - public static final int prefs=0x7f040000; | ||
70 | - } | ||
71 | -} | 1 | +/* AUTO-GENERATED FILE. DO NOT MODIFY. |
2 | + * | ||
3 | + * This class was automatically generated by the | ||
4 | + * aapt tool from the resource data it found. It | ||
5 | + * should not be modified by hand. | ||
6 | + */ | ||
7 | + | ||
8 | +package com.upc.pbe.upcnews; | ||
9 | + | ||
10 | +public final class R { | ||
11 | + public static final class attr { | ||
12 | + } | ||
13 | + public static final class drawable { | ||
14 | + public static final int ic_action_search=0x7f020000; | ||
15 | + public static final int ic_launcher=0x7f020001; | ||
16 | + public static final int ic_menu_name=0x7f020002; | ||
17 | + } | ||
18 | + public static final class id { | ||
19 | + public static final int AbsoluteLayout1=0x7f080009; | ||
20 | + public static final int ImageView01=0x7f08000b; | ||
21 | + public static final int ImageView1=0x7f08000a; | ||
22 | + public static final int LinearLayout1=0x7f080000; | ||
23 | + public static final int button=0x7f08000e; | ||
24 | + public static final int button1=0x7f080002; | ||
25 | + public static final int button2=0x7f080003; | ||
26 | + public static final int button3=0x7f080004; | ||
27 | + public static final int button4=0x7f080005; | ||
28 | + public static final int button5=0x7f080006; | ||
29 | + public static final int itemhelp=0x7f080011; | ||
30 | + public static final int itemprefs=0x7f080010; | ||
31 | + public static final int menu_settings=0x7f08000f; | ||
32 | + public static final int textView1=0x7f080007; | ||
33 | + public static final int textView2=0x7f080008; | ||
34 | + public static final int textViewRoute=0x7f08000c; | ||
35 | + public static final int textViewTitle=0x7f080001; | ||
36 | + public static final int textViewXml=0x7f08000d; | ||
37 | + } | ||
38 | + public static final class layout { | ||
39 | + public static final int dirs=0x7f030000; | ||
40 | + public static final int help=0x7f030001; | ||
41 | + public static final int main_activity=0x7f030002; | ||
42 | + } | ||
43 | + public static final class menu { | ||
44 | + public static final int activity_main=0x7f070000; | ||
45 | + public static final int menu=0x7f070001; | ||
46 | + } | ||
47 | + public static final class string { | ||
48 | + public static final int app_name=0x7f050000; | ||
49 | + public static final int button=0x7f05000c; | ||
50 | + public static final int button1=0x7f05000d; | ||
51 | + public static final int desc=0x7f050009; | ||
52 | + public static final int descarregar=0x7f050003; | ||
53 | + public static final int dir=0x7f05000a; | ||
54 | + public static final int directoris=0x7f05000b; | ||
55 | + public static final int help=0x7f050008; | ||
56 | + public static final int hint=0x7f050004; | ||
57 | + public static final int logodescription=0x7f05000f; | ||
58 | + public static final int menu_settings=0x7f050001; | ||
59 | + public static final int prefs=0x7f050007; | ||
60 | + public static final int title=0x7f05000e; | ||
61 | + public static final int title_activity_main=0x7f050002; | ||
62 | + public static final int url=0x7f050005; | ||
63 | + public static final int urlhint=0x7f050006; | ||
64 | + } | ||
65 | + public static final class style { | ||
66 | + public static final int AppTheme=0x7f060000; | ||
67 | + } | ||
68 | + public static final class xml { | ||
69 | + public static final int prefs=0x7f040000; | ||
70 | + } | ||
71 | +} |
src/com/upc/pbe/upcnews/Parser.java
@@ -3,9 +3,12 @@ package com.upc.pbe.upcnews; | @@ -3,9 +3,12 @@ package com.upc.pbe.upcnews; | ||
3 | import java.net.MalformedURLException; | 3 | import java.net.MalformedURLException; |
4 | import java.util.ArrayList; | 4 | import java.util.ArrayList; |
5 | 5 | ||
6 | +import android.util.Log; | ||
7 | + | ||
6 | public class Parser | 8 | public class Parser |
7 | { | 9 | { |
8 | private static final String STARTWORD = "#EXTM3U"; | 10 | private static final String STARTWORD = "#EXTM3U"; |
11 | + private static String TAG = "Parser"; | ||
9 | private int fileType; //indicates if segment list or media list | 12 | private int fileType; //indicates if segment list or media list |
10 | private int currentLine; | 13 | private int currentLine; |
11 | private int currentSegment; //Cada segmento de cada calidad distinta | 14 | private int currentSegment; //Cada segmento de cada calidad distinta |
@@ -36,8 +39,14 @@ public class Parser | @@ -36,8 +39,14 @@ public class Parser | ||
36 | String[] lines = file.split("\n"); | 39 | String[] lines = file.split("\n"); |
37 | for(int i = 0; i < lines.length; i++) | 40 | for(int i = 0; i < lines.length; i++) |
38 | { | 41 | { |
42 | + if(lines[i].endsWith("\\")) | ||
43 | + { | ||
44 | + lines[i] = lines[i].substring(0, lines[i].indexOf("\\")) + lines[++i]; | ||
45 | + } | ||
39 | try | 46 | try |
40 | { | 47 | { |
48 | + | ||
49 | + Log.d(TAG, lines[i]); | ||
41 | parseLine(lines[i],lists); | 50 | parseLine(lines[i],lists); |
42 | } | 51 | } |
43 | catch(InfoException iE) | 52 | catch(InfoException iE) |