summaryrefslogtreecommitdiff
path: root/vdrmanager/src/de
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2012-01-23 21:30:01 +0100
committerlado <herrlado@gmail.com>2012-01-23 21:30:01 +0100
commit9d1e218e7dfbb3ae7f2c39e8d3b833d0e5093da7 (patch)
treea3e23fa96fd7055b06c6c670837f4f88d4daf74f /vdrmanager/src/de
parent71001537c241eef1e5c044dfd1accf7f47e67c54 (diff)
downloadvdr-manager-9d1e218e7dfbb3ae7f2c39e8d3b833d0e5093da7.tar.gz
vdr-manager-9d1e218e7dfbb3ae7f2c39e8d3b833d0e5093da7.tar.bz2
tmdb button
Diffstat (limited to 'vdrmanager/src/de')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java16
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java26
2 files changed, 38 insertions, 4 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java
index 992ec36..aa70a32 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java
@@ -71,7 +71,17 @@ public class Preferences {
* Show OMDB button in epg details
*/
private boolean showOmdbButton = false;
+
+ /**
+ * Show TMDb button in epg details
+ */
+ private boolean showTmdbButton = false;
+
+ public boolean isShowTmdbButton() {
+ return showTmdbButton;
+ }
+
public boolean isShowOmdbButton() {
return showOmdbButton;
}
@@ -465,7 +475,11 @@ public class Preferences {
R.string.qui_show_omdb_button_key, true);
- prefs.imdbUrl = getString(context, R.string.qui_imdb_url_key, "imdb.de");
+ prefs.showTmdbButton = getBoolean(context,
+ R.string.qui_show_tmdb_button_key, true);
+
+
+ prefs.imdbUrl = getString(context, R.string.qui_imdb_url_key, "akas.imdb.com");
thePrefs = prefs;
}
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java
index 9acf580..6b957f5 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/EpgDetailsActivity.java
@@ -55,7 +55,9 @@ public class EpgDetailsActivity extends ICSBaseActivity implements OnClickListen
public static final String TAG = "EpgDetailsActivity";
- public static String IMDB_URL = "http://%s/find?s=all&q=%s";
+ public static String IMDB_BASE_URL = "http://%s";
+
+ public static String IMDB_URL_QUERY = "/find?s=all&q=%s";
public static String OMDB_URL = "http://www.omdb.org/search?search[text]=%s";
@@ -63,7 +65,9 @@ public class EpgDetailsActivity extends ICSBaseActivity implements OnClickListen
private static final String OMDB_URL_ENCODING = "UTF-8";
-
+ private static final String TMDB_URL_ENCODING = "UTF-8";
+
+ public static String TMDB_URL = "http://www.themoviedb.org/search?search=%s";
private String highlight = null;
@@ -314,7 +318,7 @@ public class EpgDetailsActivity extends ICSBaseActivity implements OnClickListen
b.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
- startFilmDatabaseBrowseIntent(String.format(IMDB_URL, Preferences.get().getImdbUrl()), view, IMDB_URL_ENCODING);
+ startFilmDatabaseBrowseIntent(String.format(IMDB_BASE_URL, Preferences.get().getImdbUrl()) + IMDB_URL_QUERY, view, IMDB_URL_ENCODING);
}
});
}
@@ -334,6 +338,22 @@ public class EpgDetailsActivity extends ICSBaseActivity implements OnClickListen
});
}
+ b = view.findViewById(R.id.epg_event_tmdb);
+
+ if (Preferences.get().isShowTmdbButton() == false) {
+ b.setVisibility(View.GONE);
+ } else {
+ b.setVisibility(View.VISIBLE);
+ b.setOnClickListener(new OnClickListener() {
+
+ public void onClick(View v) {
+ startFilmDatabaseBrowseIntent(TMDB_URL, view, TMDB_URL_ENCODING);
+ }
+ });
+ }
+
+
+