From 5ce13c651d942a725160c01aa1c88b80fedea67f Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 6 Aug 2016 22:29:26 +0200 Subject: [PATCH] - disable youtube, when youtube_dev_id is empty --- src/gui/mediaplayer.cpp | 2 +- src/neutrino.cpp | 1 + src/system/settings.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/mediaplayer.cpp b/src/gui/mediaplayer.cpp index 993aab273..7d25e73a3 100644 --- a/src/gui/mediaplayer.cpp +++ b/src/gui/mediaplayer.cpp @@ -295,7 +295,7 @@ void CMediaPlayerMenu::showMoviePlayer(CMenuWidget *moviePlayer, CPersonalizeGui p->addItem(moviePlayer, fw_file, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_FILEPLAY]); //ytplayback if (!g_settings.easymenu) { - CMenuForwarder *fw_yt = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, true, NULL, &CMoviePlayerGui::getInstance(), "ytplayback", CRCInput::RC_yellow); + CMenuForwarder *fw_yt = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, g_settings.youtube_enabled, NULL, &CMoviePlayerGui::getInstance(), "ytplayback", CRCInput::RC_yellow); fw_yt->setHint(NEUTRINO_ICON_HINT_YTPLAY, LOCALE_MENU_HINT_YTPLAY); p->addItem(moviePlayer, fw_yt, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_YTPLAY]); } diff --git a/src/neutrino.cpp b/src/neutrino.cpp index ed64cb129..8ed7d9051 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -808,6 +808,7 @@ int CNeutrinoApp::loadSetup(const char * fname) //Movie-Player g_settings.movieplayer_repeat_on = configfile.getInt32("movieplayer_repeat_on", CMoviePlayerGui::REPEAT_OFF); g_settings.youtube_dev_id = configfile.getString("youtube_dev_id","XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); + g_settings.youtube_enabled = ((g_settings.youtube_dev_id != "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") && !g_settings.youtube_dev_id.empty()); g_settings.tmdb_api_key = configfile.getString("tmdb_api_key","XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); g_settings.tmdb_enabled = ((g_settings.tmdb_api_key != "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") && !g_settings.tmdb_api_key.empty()); diff --git a/src/system/settings.h b/src/system/settings.h index dc0af7918..3c6eaf2bf 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -724,6 +724,7 @@ struct SNeutrinoSettings //movieplayer int movieplayer_repeat_on; std::string youtube_dev_id; + int youtube_enabled; std::string tmdb_api_key; int tmdb_enabled;