diff options
author | lado <herrlado@gmail.com> | 2012-01-16 11:31:55 +0100 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2012-01-16 11:31:55 +0100 |
commit | 9988c2269d5dcceea42a98cb33fca1da7c395564 (patch) | |
tree | ffb60a5c41e359db8ec019040cf57987f8437cb3 /vdrmanager/src/de | |
parent | dcf9b55f77e03f1e36f043262b847cfb2ae09701 (diff) | |
download | vdr-manager-9988c2269d5dcceea42a98cb33fca1da7c395564.tar.gz vdr-manager-9988c2269d5dcceea42a98cb33fca1da7c395564.tar.bz2 |
http://projects.vdr-developer.org/issues/853
Diffstat (limited to 'vdrmanager/src/de')
-rw-r--r-- | vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java index 9379507..3f8167f 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java @@ -1,5 +1,6 @@ package de.bjusystems.vdrmanager.gui; +import java.net.URLEncoder; import java.util.ArrayList; import java.util.List; @@ -14,6 +15,7 @@ import android.os.Parcelable; import android.support.v4.view.PagerAdapter; import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager.OnPageChangeListener; +import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -38,7 +40,6 @@ import de.bjusystems.vdrmanager.data.Timer; import de.bjusystems.vdrmanager.data.Timerable; import de.bjusystems.vdrmanager.data.Timerable.TimerState; import de.bjusystems.vdrmanager.tasks.DeleteTimerTask; -import de.bjusystems.vdrmanager.tasks.ModifyTimerTask; import de.bjusystems.vdrmanager.tasks.ToggleTimerTask; import de.bjusystems.vdrmanager.tasks.VoidAsyncTask; import de.bjusystems.vdrmanager.utils.svdrp.SvdrpEvent; @@ -51,6 +52,8 @@ import de.bjusystems.vdrmanager.utils.svdrp.SvdrpEvent; public class EpgDetailsActivity extends Activity implements OnClickListener, OnPageChangeListener { + public static final String TAG = "EpgDetailsActivity"; + public static String IMDB_URL = "http://%s/find?s=all&q=%s"; private String highlight = null; @@ -201,6 +204,15 @@ public class EpgDetailsActivity extends Activity implements OnClickListener, view.setVisibility(View.VISIBLE); view.setImageResource(res); } + + private static String encode(String str, String enc){ + try{ + return URLEncoder.encode(str, enc); + }catch(Exception ex){ + Log.w(TAG, ex); + return URLEncoder.encode(str); + } + } public void publishEPG(final View view, int position) { @@ -292,6 +304,7 @@ public class EpgDetailsActivity extends Activity implements OnClickListener, String url = String.format(IMDB_URL, Preferences.get().getImdbUrl(), String.valueOf(title.getText())); + encode(url,"utf-8"); Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse(url)); startActivity(i); |