From 34063849e103abfdf085c95a2a1b7c16df493dd0 Mon Sep 17 00:00:00 2001 From: Equip de Desenvolupadors de PBE Date: Wed, 28 Nov 2012 14:54:07 +0000 Subject: [PATCH] --- src/com/upc/pbe/upcnews/Directoris.java | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/com/upc/pbe/upcnews/Directoris.java b/src/com/upc/pbe/upcnews/Directoris.java index 37f3bcd..e391f0d 100644 --- a/src/com/upc/pbe/upcnews/Directoris.java +++ b/src/com/upc/pbe/upcnews/Directoris.java @@ -17,7 +17,7 @@ public class Directoris extends Activity implements OnClickListener { final static String TAG = "Directoris"; String s; Descarrega d; - String url; + String url; String file = "ejemplo.xml"; String folder = "Environment.getExternalStorageDirectory.getPath()"; @@ -69,29 +69,35 @@ public class Directoris extends Activity implements OnClickListener { } public void onClick(View c) { - + switch (c.getId()) { case R.id.button1: { Log.d(TAG, "Click on button1"); - d = new Descarrega(url + "/" + button1.getText() + "/", file, folder); + d = new Descarrega(url + "/" + button1.getText() + "/", file, + folder); String str = d.doInBackground(); - + HTMLParser pars = new HTMLParser(); - String urlvideo = pars.findvideo((String) button1.getText(), - str, url + "/" + button1.getText() + "/"); - + String urlvideo = pars.findvideo((String) button1.getText(), str, + url + "/" + button1.getText() + "/"); + Log.d(TAG, urlvideo); - + + d = new Descarrega(urlvideo, file, folder); + String m3u8 = d.doInBackground(); + + Log.d(TAG, m3u8); + } case R.id.button2: { - + } case R.id.button3: { - + } case R.id.button4: { - + } } } @@ -107,12 +113,12 @@ public class Directoris extends Activity implements OnClickListener { buttons.add(button2); buttons.add(button3); buttons.add(button4); - + button1.setOnClickListener(this); button2.setOnClickListener(this); button3.setOnClickListener(this); button4.setOnClickListener(this); - + button1.setVisibility(View.GONE); button2.setVisibility(View.GONE); button3.setVisibility(View.GONE); -- libgit2 0.22.2