mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
ytplayer: apply enable option for internal YouTube playback
This commit is contained in:
@@ -168,12 +168,12 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p)
|
|||||||
CMenuForwarder *fw_fileplay_audio = new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK_AUDIO, true, NULL, &CMoviePlayerGui::getInstance(), "fileplayback_audio", CRCInput::RC_yellow);
|
CMenuForwarder *fw_fileplay_audio = new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK_AUDIO, true, NULL, &CMoviePlayerGui::getInstance(), "fileplayback_audio", CRCInput::RC_yellow);
|
||||||
fw_fileplay_audio->setHint(NEUTRINO_ICON_HINT_FILEPLAY, LOCALE_MENU_HINT_FILEPLAY);
|
fw_fileplay_audio->setHint(NEUTRINO_ICON_HINT_FILEPLAY, LOCALE_MENU_HINT_FILEPLAY);
|
||||||
personalize->addItem(movieplayer_menu, fw_fileplay_audio, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_FILEPLAY_AUDIO]);
|
personalize->addItem(movieplayer_menu, fw_fileplay_audio, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_FILEPLAY_AUDIO]);
|
||||||
|
#if ENABLE_YOUTUBE_PLAYER
|
||||||
//ytplayback
|
//ytplayback
|
||||||
CMenuForwarder *fw_ytplay = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, g_settings.youtube_enabled, NULL, &CMoviePlayerGui::getInstance(), "ytplayback", CRCInput::RC_blue);
|
CMenuForwarder *fw_ytplay = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, g_settings.youtube_enabled, NULL, &CMoviePlayerGui::getInstance(), "ytplayback", CRCInput::RC_blue);
|
||||||
fw_ytplay->setHint(NEUTRINO_ICON_HINT_YTPLAY, LOCALE_MENU_HINT_YTPLAY);
|
fw_ytplay->setHint(NEUTRINO_ICON_HINT_YTPLAY, LOCALE_MENU_HINT_YTPLAY);
|
||||||
personalize->addItem(movieplayer_menu, fw_ytplay, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_YTPLAY]);
|
personalize->addItem(movieplayer_menu, fw_ytplay, &g_settings.personalize[SNeutrinoSettings::P_MPLAYER_YTPLAY]);
|
||||||
|
#endif
|
||||||
//add movieplayer submenu
|
//add movieplayer submenu
|
||||||
CMenuForwarder *fw_mp = new CMenuForwarder(LOCALE_MAINMENU_MEDIAPLAYER, enabled, NULL, movieplayer_menu, NULL, CRCInput::RC_yellow);
|
CMenuForwarder *fw_mp = new CMenuForwarder(LOCALE_MAINMENU_MEDIAPLAYER, enabled, NULL, movieplayer_menu, NULL, CRCInput::RC_yellow);
|
||||||
fw_mp->setHint(NEUTRINO_ICON_HINT_MOVIE, LOCALE_MENU_HINT_MOVIE);
|
fw_mp->setHint(NEUTRINO_ICON_HINT_MOVIE, LOCALE_MENU_HINT_MOVIE);
|
||||||
|
@@ -406,11 +406,13 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey)
|
|||||||
moviebrowser->setMode(MB_SHOW_RECORDS);
|
moviebrowser->setMode(MB_SHOW_RECORDS);
|
||||||
//wakeup_hdd(g_settings.network_nfs_recordingdir.c_str());
|
//wakeup_hdd(g_settings.network_nfs_recordingdir.c_str());
|
||||||
}
|
}
|
||||||
|
#if ENABLE_YOUTUBE_PLAYER
|
||||||
else if (actionKey == "ytplayback") {
|
else if (actionKey == "ytplayback") {
|
||||||
isMovieBrowser = true;
|
isMovieBrowser = true;
|
||||||
moviebrowser->setMode(MB_SHOW_YT);
|
moviebrowser->setMode(MB_SHOW_YT);
|
||||||
isYT = true;
|
isYT = true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (actionKey == "fileplayback_video") {
|
else if (actionKey == "fileplayback_video") {
|
||||||
is_audio_playing = false;
|
is_audio_playing = false;
|
||||||
if (filebrowser)
|
if (filebrowser)
|
||||||
|
@@ -418,6 +418,7 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg)
|
|||||||
menu_item->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_SCRIPTS);
|
menu_item->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_SCRIPTS);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#if ENABLE_YOUTUBE_PLAYER
|
||||||
case SNeutrinoSettings::ITEM_YOUTUBE:
|
case SNeutrinoSettings::ITEM_YOUTUBE:
|
||||||
{
|
{
|
||||||
keyhelper.get(&key,&icon);
|
keyhelper.get(&key,&icon);
|
||||||
@@ -425,6 +426,7 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg)
|
|||||||
menu_item->setHint(NEUTRINO_ICON_HINT_YTPLAY, LOCALE_MENU_HINT_YTPLAY);
|
menu_item->setHint(NEUTRINO_ICON_HINT_YTPLAY, LOCALE_MENU_HINT_YTPLAY);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
case SNeutrinoSettings::ITEM_FILEPLAY_VIDEO:
|
case SNeutrinoSettings::ITEM_FILEPLAY_VIDEO:
|
||||||
{
|
{
|
||||||
keyhelper.get(&key,&icon);
|
keyhelper.get(&key,&icon);
|
||||||
|
Reference in New Issue
Block a user