mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 10:21:04 +02:00
Merge remote-tracking branch 'tuxbox/master'
* needs compile fixes
* needs additional tests, of course :-)
Origin commit data
------------------
Commit: 13ab1ebc8a
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2016-10-22 (Sat, 22 Oct 2016)
This commit is contained in:
203
src/neutrino.cpp
203
src/neutrino.cpp
@@ -46,6 +46,8 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "neutrino.h"
|
||||
#include "neutrino_menue.h"
|
||||
#include "version_pseudo.h"
|
||||
|
||||
#include <daemonc/remotecontrol.h>
|
||||
|
||||
@@ -63,6 +65,7 @@
|
||||
#include <driver/radiotext.h>
|
||||
#include <driver/scanepg.h>
|
||||
|
||||
#include "gui/adzap.h"
|
||||
#include "gui/audiomute.h"
|
||||
#include "gui/audioplayer.h"
|
||||
#include "gui/bouquetlist.h"
|
||||
@@ -136,9 +139,9 @@
|
||||
#include <lib/libdvbsub/dvbsub.h>
|
||||
#include <lib/libtuxtxt/teletext.h>
|
||||
#include <eitd/sectionsd.h>
|
||||
|
||||
#ifdef ENABLE_LUA
|
||||
#include <system/luaserver.h>
|
||||
|
||||
#endif
|
||||
int old_b_id = -1;
|
||||
|
||||
CInfoClock *InfoClock;
|
||||
@@ -185,11 +188,13 @@ CBouquetList * TVbouquetList;
|
||||
CBouquetList * TVsatList;
|
||||
CBouquetList * TVfavList;
|
||||
CBouquetList * TVallList;
|
||||
CBouquetList * TVwebList;
|
||||
|
||||
CBouquetList * RADIObouquetList;
|
||||
CBouquetList * RADIOsatList;
|
||||
CBouquetList * RADIOfavList;
|
||||
CBouquetList * RADIOallList;
|
||||
CBouquetList * RADIOwebList;
|
||||
|
||||
CBouquetList * AllFavBouquetList;
|
||||
|
||||
@@ -231,6 +236,7 @@ CNeutrinoApp::CNeutrinoApp()
|
||||
SetupFrameBuffer();
|
||||
|
||||
mode = mode_unknown;
|
||||
lastMode = mode_unknown;
|
||||
channelList = NULL;
|
||||
TVchannelList = NULL;
|
||||
RADIOchannelList = NULL;
|
||||
@@ -294,7 +300,7 @@ const lcd_setting_struct_t lcd_setting[SNeutrinoSettings::LCD_SETTING_COUNT] =
|
||||
static SNeutrinoSettings::usermenu_t usermenu_default[] = {
|
||||
{ CRCInput::RC_red, "2,3,4,13", "", "red" },
|
||||
{ CRCInput::RC_green, "6", "", "green" },
|
||||
{ CRCInput::RC_yellow, "7", "", "yellow" },
|
||||
{ CRCInput::RC_yellow, "7,31", "", "yellow" },
|
||||
{ CRCInput::RC_blue, "12,11,20,21,19,14,29,30,15", "", "blue" },
|
||||
{ CRCInput::RC_play, "9", "", "5" },
|
||||
{ CRCInput::RC_audio, "27", "", "6" },
|
||||
@@ -459,6 +465,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.backlight_standby = configfile.getInt32( "backlight_standby", 0);
|
||||
g_settings.backlight_deepstandby = configfile.getInt32( "backlight_deepstandby", 0);
|
||||
g_settings.lcd_scroll = configfile.getInt32( "lcd_scroll", 1);
|
||||
g_settings.lcd_notify_rclock = configfile.getInt32("lcd_notify_rclock", 1);
|
||||
|
||||
g_settings.hdd_fs = configfile.getInt32( "hdd_fs", 0);
|
||||
g_settings.hdd_sleep = configfile.getInt32( "hdd_sleep", 120);
|
||||
@@ -474,6 +481,18 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.shutdown_min = configfile.getInt32("shutdown_min", 180);
|
||||
g_settings.sleeptimer_min = configfile.getInt32("sleeptimer_min", 0);
|
||||
|
||||
g_settings.timer_remotebox_ip.clear();
|
||||
int timer_remotebox_ip_count = configfile.getInt32("timer_remotebox_ip_count", 0);
|
||||
if (timer_remotebox_ip_count) {
|
||||
for (int i = 0; i < timer_remotebox_ip_count; i++) {
|
||||
std::string k = "timer_remotebox_ip_" + to_string(i);
|
||||
std::string timer_remotebox_ip = configfile.getString(k, "");
|
||||
if (timer_remotebox_ip.empty())
|
||||
continue;
|
||||
g_settings.timer_remotebox_ip.push_back(timer_remotebox_ip);
|
||||
}
|
||||
}
|
||||
|
||||
g_settings.infobar_sat_display = configfile.getBool("infobar_sat_display" , true );
|
||||
g_settings.infobar_show_channeldesc = configfile.getBool("infobar_show_channeldesc" , false );
|
||||
g_settings.infobar_subchan_disp_pos = configfile.getInt32("infobar_subchan_disp_pos", 4); // subchan display in infobar
|
||||
@@ -500,7 +519,6 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.show_mute_icon = configfile.getInt32("show_mute_icon" ,0);
|
||||
g_settings.infobar_show_res = configfile.getInt32("infobar_show_res", 0 );
|
||||
g_settings.infobar_show_dd_available = configfile.getInt32("infobar_show_dd_available", 1 );
|
||||
g_settings.wzap_time = configfile.getInt32("wzap_time", 3 );
|
||||
|
||||
g_settings.infobar_show_tuner = configfile.getInt32("infobar_show_tuner", 1 );
|
||||
g_settings.radiotext_enable = configfile.getBool("radiotext_enable" , false);
|
||||
@@ -656,9 +674,10 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.recording_save_in_channeldir = configfile.getBool("recording_save_in_channeldir" , false);
|
||||
g_settings.recording_slow_warning = configfile.getBool("recording_slow_warning" , true);
|
||||
g_settings.recording_startstop_msg = configfile.getBool("recording_startstop_msg" , true);
|
||||
g_settings.recording_already_found_check = configfile.getBool("recording_already_found_check", false);
|
||||
|
||||
// default plugin for movieplayer
|
||||
g_settings.movieplayer_plugin = configfile.getString( "movieplayer_plugin", "noplugin" );
|
||||
g_settings.movieplayer_plugin = configfile.getString( "movieplayer_plugin", "---" );
|
||||
g_settings.plugin_hdd_dir = configfile.getString( "plugin_hdd_dir", "/media/sda1/plugins" );
|
||||
|
||||
g_settings.plugins_disabled = configfile.getString( "plugins_disabled", "" );
|
||||
@@ -705,6 +724,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.spectrum = configfile.getBool("spectrum" , false);
|
||||
g_settings.channellist_additional = configfile.getInt32("channellist_additional", 1); //default no minitv
|
||||
g_settings.eventlist_additional = configfile.getInt32("eventlist_additional", 0);
|
||||
g_settings.eventlist_epgplus = configfile.getInt32("eventlist_epgplus", 1);
|
||||
g_settings.channellist_epgtext_align_right = configfile.getBool("channellist_epgtext_align_right" , false);
|
||||
g_settings.channellist_progressbar_design = configfile.getInt32("channellist_progressbar_design", g_settings.progressbar_design);
|
||||
g_settings.channellist_foot = configfile.getInt32("channellist_foot", 0); //default transponder data
|
||||
@@ -825,10 +845,17 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.audioplayer_show_playlist = configfile.getInt32("audioplayer_show_playlist",1);
|
||||
g_settings.audioplayer_enable_sc_metadata = configfile.getInt32("audioplayer_enable_sc_metadata",1);
|
||||
g_settings.shoutcast_dev_id = configfile.getString("shoutcast_dev_id","XXXXXXXXXXXXXXXX");
|
||||
g_settings.shoutcast_enabled = configfile.getInt32("shoutcast_enabled", 1);
|
||||
g_settings.shoutcast_enabled = check_shoutcast_dev_id();
|
||||
|
||||
//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 = configfile.getInt32("youtube_enabled", 1);
|
||||
g_settings.youtube_enabled = check_youtube_dev_id();
|
||||
g_settings.tmdb_api_key = configfile.getString("tmdb_api_key","XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
|
||||
g_settings.tmdb_enabled = configfile.getInt32("tmdb_enabled", 1);
|
||||
g_settings.tmdb_enabled = check_tmdb_api_key();
|
||||
|
||||
//Filebrowser
|
||||
g_settings.filebrowser_showrights = configfile.getInt32("filebrowser_showrights", 1);
|
||||
@@ -855,6 +882,8 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
}
|
||||
g_settings.epg_search_history_size = g_settings.epg_search_history.size();
|
||||
|
||||
g_settings.adzap_zapBackPeriod = configfile.getInt32("adzap_zapBackPeriod", 180);
|
||||
g_settings.adzap_writeData = configfile.getInt32("adzap_writeData", 0);
|
||||
|
||||
// USERMENU -> in system/settings.h
|
||||
//-------------------------------------------
|
||||
@@ -934,11 +963,37 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
||||
g_settings.infoClockBackground = configfile.getInt32("infoClockBackground", 0);
|
||||
g_settings.infoClockSeconds = configfile.getInt32("infoClockSeconds", 1);
|
||||
|
||||
g_settings.livestreamResolution = configfile.getInt32("livestreamResolution", 1920);
|
||||
g_settings.livestreamScriptPath = configfile.getString("livestreamScriptPath", PLUGINDIR_VAR "/webtv");
|
||||
|
||||
g_settings.version_pseudo = configfile.getString("version_pseudo", "19700101000000");
|
||||
|
||||
if (g_settings.version_pseudo < NEUTRINO_VERSION_PSEUDO)
|
||||
upgradeSetup(fname);
|
||||
|
||||
if(erg)
|
||||
configfile.setModifiedFlag(true);
|
||||
return erg;
|
||||
}
|
||||
|
||||
void CNeutrinoApp::upgradeSetup(const char * fname)
|
||||
{
|
||||
if (g_settings.version_pseudo < "20160226110000")
|
||||
{
|
||||
if (g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->items == "7")
|
||||
{
|
||||
g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->items = "7,31";
|
||||
configfile.setString("usermenu_tv_yellow", g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->items);
|
||||
}
|
||||
}
|
||||
|
||||
g_settings.version_pseudo = NEUTRINO_VERSION_PSEUDO;
|
||||
configfile.setString("version_pseudo", g_settings.version_pseudo);
|
||||
|
||||
if (configfile.getModifiedFlag())
|
||||
configfile.saveConfig(fname);
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
* CNeutrinoApp - saveSetup, save the application-settings *
|
||||
**************************************************************************************/
|
||||
@@ -1016,6 +1071,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setInt32( "backlight_standby", g_settings.backlight_standby);
|
||||
configfile.setInt32( "backlight_deepstandby", g_settings.backlight_deepstandby);
|
||||
configfile.setInt32( "lcd_scroll", g_settings.lcd_scroll);
|
||||
configfile.setInt32( "lcd_notify_rclock", g_settings.lcd_notify_rclock);
|
||||
|
||||
//misc
|
||||
configfile.setInt32( "power_standby", g_settings.power_standby);
|
||||
@@ -1029,6 +1085,15 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setInt32("shutdown_count" , g_settings.shutdown_count);
|
||||
configfile.setInt32("shutdown_min" , g_settings.shutdown_min );
|
||||
configfile.setInt32("sleeptimer_min", g_settings.sleeptimer_min);
|
||||
|
||||
int timer_remotebox_ip_count = 0;
|
||||
for (std::list<std::string>::iterator it = g_settings.timer_remotebox_ip.begin(); it != g_settings.timer_remotebox_ip.end(); ++it) {
|
||||
std::string k = "timer_remotebox_ip_" + to_string(timer_remotebox_ip_count);
|
||||
configfile.setString(k, *it);
|
||||
timer_remotebox_ip_count++;
|
||||
}
|
||||
configfile.setInt32 ( "timer_remotebox_ip_count", g_settings.timer_remotebox_ip.size());
|
||||
|
||||
configfile.setBool("infobar_sat_display" , g_settings.infobar_sat_display );
|
||||
configfile.setBool("infobar_show_channeldesc" , g_settings.infobar_show_channeldesc );
|
||||
configfile.setInt32("infobar_subchan_disp_pos" , g_settings.infobar_subchan_disp_pos );
|
||||
@@ -1055,7 +1120,6 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setInt32("show_mute_icon" , g_settings.show_mute_icon);
|
||||
configfile.setInt32("infobar_show_res" , g_settings.infobar_show_res );
|
||||
configfile.setInt32("infobar_show_dd_available" , g_settings.infobar_show_dd_available );
|
||||
configfile.setInt32("wzap_time" , g_settings.wzap_time );
|
||||
configfile.setInt32("infobar_show_tuner" , g_settings.infobar_show_tuner );
|
||||
configfile.setBool("radiotext_enable" , g_settings.radiotext_enable);
|
||||
//audio
|
||||
@@ -1168,6 +1232,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setBool ("recording_save_in_channeldir" , g_settings.recording_save_in_channeldir );
|
||||
configfile.setBool ("recording_slow_warning" , g_settings.recording_slow_warning );
|
||||
configfile.setBool ("recording_startstop_msg" , g_settings.recording_startstop_msg );
|
||||
configfile.setBool ("recording_already_found_check" , g_settings.recording_already_found_check );
|
||||
|
||||
// default plugin for movieplayer
|
||||
configfile.setString ( "movieplayer_plugin", g_settings.movieplayer_plugin );
|
||||
@@ -1213,6 +1278,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setInt32( "zapto_pre_time", g_settings.zapto_pre_time );
|
||||
configfile.setBool("spectrum", g_settings.spectrum);
|
||||
configfile.setInt32("eventlist_additional", g_settings.eventlist_additional);
|
||||
configfile.setInt32("eventlist_epgplus", g_settings.eventlist_epgplus);
|
||||
configfile.setInt32("channellist_additional", g_settings.channellist_additional);
|
||||
configfile.setBool("channellist_epgtext_align_right", g_settings.channellist_epgtext_align_right);
|
||||
configfile.setInt32("channellist_progressbar_design", g_settings.channellist_progressbar_design);
|
||||
@@ -1298,10 +1364,14 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setInt32( "audioplayer_show_playlist", g_settings.audioplayer_show_playlist );
|
||||
configfile.setInt32( "audioplayer_enable_sc_metadata", g_settings.audioplayer_enable_sc_metadata );
|
||||
configfile.setString( "shoutcast_dev_id", g_settings.shoutcast_dev_id );
|
||||
configfile.setInt32( "shoutcast_enabled", g_settings.shoutcast_enabled );
|
||||
|
||||
//Movie-Player
|
||||
configfile.setInt32( "movieplayer_repeat_on", g_settings.movieplayer_repeat_on );
|
||||
configfile.setString( "youtube_dev_id", g_settings.youtube_dev_id );
|
||||
configfile.setInt32( "youtube_enabled", g_settings.youtube_enabled );
|
||||
configfile.setString( "tmdb_api_key", g_settings.tmdb_api_key );
|
||||
configfile.setInt32( "tmdb_enabled", g_settings.tmdb_enabled );
|
||||
|
||||
//Filebrowser
|
||||
configfile.setInt32("filebrowser_showrights", g_settings.filebrowser_showrights);
|
||||
@@ -1314,6 +1384,8 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setInt64("startchanneltv_id", g_settings.startchanneltv_id);
|
||||
configfile.setInt64("startchannelradio_id", g_settings.startchannelradio_id);
|
||||
configfile.setInt32("uselastchannel", g_settings.uselastchannel);
|
||||
configfile.setInt32("adzap_zapBackPeriod", g_settings.adzap_zapBackPeriod);
|
||||
configfile.setInt32("adzap_writeData", g_settings.adzap_writeData);
|
||||
//epg search
|
||||
g_settings.epg_search_history_size = g_settings.epg_search_history.size();
|
||||
if (g_settings.epg_search_history_size > g_settings.epg_search_history_max)
|
||||
@@ -1369,6 +1441,11 @@ void CNeutrinoApp::saveSetup(const char * fname)
|
||||
configfile.setInt32("infoClockSeconds", g_settings.infoClockSeconds);
|
||||
configfile.setInt32("easymenu", g_settings.easymenu);
|
||||
|
||||
configfile.setInt32("livestreamResolution", g_settings.livestreamResolution);
|
||||
configfile.setString("livestreamScriptPath", g_settings.livestreamScriptPath);
|
||||
|
||||
configfile.setString("version_pseudo", g_settings.version_pseudo);
|
||||
|
||||
if(strcmp(fname, NEUTRINO_SETTINGS_FILE) || configfile.getModifiedFlag())
|
||||
configfile.saveConfig(fname);
|
||||
}
|
||||
@@ -1401,11 +1478,16 @@ void CNeutrinoApp::channelsInit(bool bOnly)
|
||||
if(TVchannelList) delete TVchannelList;
|
||||
if(RADIOchannelList) delete RADIOchannelList;
|
||||
|
||||
if(TVwebList) delete TVwebList;
|
||||
if(RADIOwebList) delete RADIOwebList;
|
||||
|
||||
TVchannelList = new CChannelList(g_Locale->getText(LOCALE_CHANNELLIST_HEAD), false, true);
|
||||
RADIOchannelList = new CChannelList(g_Locale->getText(LOCALE_CHANNELLIST_HEAD), false, true);
|
||||
|
||||
TVbouquetList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_PROVS));
|
||||
TVfavList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_FAVS));
|
||||
TVwebList = new CBouquetList(g_Locale->getText(LOCALE_BOUQUETNAME_WEBTV));
|
||||
RADIOwebList = new CBouquetList(g_Locale->getText(LOCALE_BOUQUETNAME_WEBTV));
|
||||
|
||||
RADIObouquetList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_PROVS));
|
||||
RADIOfavList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_FAVS));
|
||||
@@ -1546,6 +1628,8 @@ void CNeutrinoApp::channelsInit(bool bOnly)
|
||||
if (b->getTvChannels(zapitList) || (g_settings.show_empty_favorites && b->bUser)) {
|
||||
if(b->bUser)
|
||||
tmp = TVfavList->addBouquet(b);
|
||||
else if(b->bWebtv)
|
||||
tmp = TVwebList->addBouquet(b);
|
||||
else
|
||||
tmp = TVbouquetList->addBouquet(b);
|
||||
|
||||
@@ -1555,6 +1639,8 @@ void CNeutrinoApp::channelsInit(bool bOnly)
|
||||
if (b->getRadioChannels(zapitList) || (g_settings.show_empty_favorites && b->bUser)) {
|
||||
if(b->bUser)
|
||||
tmp = RADIOfavList->addBouquet(b);
|
||||
else if(b->bWebtv)
|
||||
tmp = RADIOwebList->addBouquet(b);
|
||||
else
|
||||
tmp = RADIObouquetList->addBouquet(b);
|
||||
|
||||
@@ -1611,6 +1697,12 @@ void CNeutrinoApp::SetChannelMode(int newmode)
|
||||
else
|
||||
bouquetList = TVsatList;
|
||||
break;
|
||||
case LIST_MODE_WEBTV:
|
||||
if(mode == mode_radio)
|
||||
bouquetList = RADIOwebList;
|
||||
else
|
||||
bouquetList = TVwebList;
|
||||
break;
|
||||
case LIST_MODE_ALL:
|
||||
if(mode == mode_radio)
|
||||
bouquetList = RADIOallList;
|
||||
@@ -1737,6 +1829,7 @@ void CNeutrinoApp::SetupFonts(int fmode)
|
||||
/* recalculate infobar position */
|
||||
if (g_InfoViewer)
|
||||
g_InfoViewer->start();
|
||||
OnAfterSetupFonts();
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
@@ -1778,6 +1871,7 @@ void CNeutrinoApp::InitZapper()
|
||||
int tvmode = CZapit::getInstance()->getMode() & CZapitClient::MODE_TV;
|
||||
lastChannelMode = tvmode ? g_settings.channel_mode : g_settings.channel_mode_radio;
|
||||
mode = tvmode ? mode_tv : mode_radio;
|
||||
lastMode = mode;
|
||||
|
||||
SDTreloadChannels = false;
|
||||
channelsInit();
|
||||
@@ -2170,7 +2264,7 @@ TIMER_STOP("################################## after all #######################
|
||||
}
|
||||
delete hintBox;
|
||||
}
|
||||
RealRun(personalize.getWidget(0)/**main**/);
|
||||
RealRun();
|
||||
|
||||
ExitRun(true, can_deepstandby);
|
||||
|
||||
@@ -2196,7 +2290,6 @@ void CNeutrinoApp::quickZap(int msg)
|
||||
void CNeutrinoApp::numericZap(int msg)
|
||||
{
|
||||
StopSubtitles();
|
||||
g_InfoViewer->setSwitchMode(CInfoViewer::IV_MODE_NUMBER_ZAP);
|
||||
int res = channelList->numericZap( msg );
|
||||
StartSubtitles(res < 0);
|
||||
if (res >= 0 && CRCInput::isNumeric(msg)) {
|
||||
@@ -2259,9 +2352,9 @@ void CNeutrinoApp::screensaver(bool on)
|
||||
}
|
||||
}
|
||||
|
||||
void CNeutrinoApp::RealRun(CMenuWidget &_mainMenu)
|
||||
void CNeutrinoApp::RealRun()
|
||||
{
|
||||
mainMenu = &_mainMenu;
|
||||
mainMenu = &personalize.getWidget(MENU_MAIN);
|
||||
|
||||
neutrino_msg_t msg;
|
||||
neutrino_msg_data_t data;
|
||||
@@ -2275,9 +2368,9 @@ void CNeutrinoApp::RealRun(CMenuWidget &_mainMenu)
|
||||
standbyMode(true, true);
|
||||
|
||||
//cCA::GetInstance()->Ready(true);
|
||||
|
||||
#ifdef ENABLE_LUA
|
||||
CLuaServer *luaServer = CLuaServer::getInstance();
|
||||
|
||||
#endif
|
||||
g_PluginList->startPlugin("startup");
|
||||
if (!g_PluginList->getScriptOutput().empty()) {
|
||||
ShowMsg(LOCALE_PLUGINS_RESULT, g_PluginList->getScriptOutput(), CMessageBox::mbrBack,CMessageBox::mbBack,NEUTRINO_ICON_SHELL);
|
||||
@@ -2288,10 +2381,14 @@ void CNeutrinoApp::RealRun(CMenuWidget &_mainMenu)
|
||||
m_screensaver = false;
|
||||
|
||||
while( true ) {
|
||||
#ifdef ENABLE_LUA
|
||||
luaServer->UnBlock();
|
||||
#endif
|
||||
g_RCInput->getMsg(&msg, &data, 100, ((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VOLUME) && (g_RemoteControl->subChannels.size() < 1)) ? true : false); // 10 secs..
|
||||
#ifdef ENABLE_LUA
|
||||
if (luaServer->Block(msg, data))
|
||||
continue;
|
||||
#endif
|
||||
|
||||
if (mode == mode_radio) {
|
||||
bool ignored_msg = (
|
||||
@@ -2619,6 +2716,11 @@ int CNeutrinoApp::showChannelList(const neutrino_msg_t _msg, bool from_menu)
|
||||
if (bouquetList->Bouquets.empty())
|
||||
SetChannelMode(LIST_MODE_PROV);
|
||||
nNewChannel = bouquetList->exec(true);
|
||||
} else if(msg == CRCInput::RC_www) {
|
||||
SetChannelMode(LIST_MODE_WEBTV);
|
||||
if (bouquetList->Bouquets.empty())
|
||||
SetChannelMode(LIST_MODE_PROV);
|
||||
nNewChannel = bouquetList->exec(true);
|
||||
}
|
||||
_repeat:
|
||||
printf("CNeutrinoApp::showChannelList: nNewChannel %d\n", nNewChannel);fflush(stdout);
|
||||
@@ -2667,7 +2769,9 @@ _repeat:
|
||||
bouquets_changed = false;
|
||||
channels_init = false;
|
||||
|
||||
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
||||
t_channel_id live_channel_id = channelList->getActiveChannel_ChannelID();
|
||||
if(!live_channel_id)
|
||||
live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
||||
adjustToChannelID(live_channel_id);//FIXME what if deleted ?
|
||||
delete hintBox;
|
||||
}
|
||||
@@ -2749,6 +2853,17 @@ void CNeutrinoApp::lockPlayBack(bool blank)
|
||||
videoDecoder->setBlank(true);
|
||||
}
|
||||
|
||||
bool CNeutrinoApp::listModeKey(const neutrino_msg_t msg)
|
||||
{
|
||||
if (
|
||||
msg == CRCInput::RC_sat
|
||||
|| msg == CRCInput::RC_favorites
|
||||
|| msg == CRCInput::RC_www
|
||||
)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
{
|
||||
int res = 0;
|
||||
@@ -2763,7 +2878,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
CZapitChannel * cc = CZapit::getInstance()->GetCurrentChannel();
|
||||
if (cc && (chid == cc->getChannelID())) {
|
||||
CMoviePlayerGui::getInstance().stopPlayBack();
|
||||
if (CMoviePlayerGui::getInstance().PlayBackgroundStart(cc->getUrl(), cc->getName(), cc->getChannelID()))
|
||||
if (CMoviePlayerGui::getInstance().PlayBackgroundStart(cc->getUrl(), cc->getName(), cc->getChannelID(), cc->getScriptName()))
|
||||
delete [] (unsigned char*) data;
|
||||
else
|
||||
g_RCInput->postMsg(NeutrinoMessages::EVT_ZAP_FAILED, data);
|
||||
@@ -2773,7 +2888,8 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
return messages_return::handled;
|
||||
}
|
||||
if (mode == mode_webtv && msg == NeutrinoMessages::EVT_SUBT_MESSAGE) {
|
||||
CMoviePlayerGui::getInstance().showSubtitle(data);
|
||||
CMoviePlayerGui::getInstance(true).showSubtitle(data);
|
||||
return messages_return::handled;
|
||||
}
|
||||
if(msg == NeutrinoMessages::EVT_ZAP_COMPLETE) {
|
||||
CZapit::getInstance()->GetAudioMode(g_settings.audio_AnalogMode);
|
||||
@@ -2784,7 +2900,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
if (mode != mode_webtv) {
|
||||
scrambled_timer = g_RCInput->addTimer(10*1000*1000, true);
|
||||
SelectSubtitles();
|
||||
StartSubtitles(!g_InfoViewer->is_visible);
|
||||
//StartSubtitles(!g_InfoViewer->is_visible);
|
||||
|
||||
/* update scan settings for manual scan to current channel */
|
||||
CScanSetup::getInstance()->updateManualSettings();
|
||||
@@ -2839,7 +2955,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
}
|
||||
|
||||
/* ================================== KEYS ================================================ */
|
||||
if( msg == CRCInput::RC_ok || (!g_InfoViewer->getSwitchMode() && (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites))) {
|
||||
if( msg == CRCInput::RC_ok || (!g_InfoViewer->getSwitchMode() && CNeutrinoApp::getInstance()->listModeKey(msg))) {
|
||||
if( (mode == mode_tv) || (mode == mode_radio) || (mode == mode_ts) || (mode == mode_webtv)) {
|
||||
showChannelList(msg);
|
||||
return messages_return::handled;
|
||||
@@ -3069,16 +3185,24 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
}
|
||||
#endif
|
||||
//zap to rec channel in standby-mode
|
||||
CTimerd::RecordingInfo * eventinfo = (CTimerd::RecordingInfo *) data;
|
||||
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
||||
/* special case for nhttpd: start direct record, if no eventID */
|
||||
if (eventinfo->eventID == 0) {
|
||||
int rec_mode = CRecordManager::getInstance()->GetRecordMode(live_channel_id);
|
||||
/* start only if not recorded yet */
|
||||
if (rec_mode == CRecordManager::RECMODE_OFF || rec_mode == CRecordManager::RECMODE_TSHIFT)
|
||||
CRecordManager::getInstance()->Record(live_channel_id);
|
||||
delete[] (unsigned char*) data;
|
||||
return messages_return::handled | messages_return::cancel_all;
|
||||
}
|
||||
if(mode == mode_standby){
|
||||
CTimerd::RecordingInfo * eventinfo = (CTimerd::RecordingInfo *) data;
|
||||
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
||||
|
||||
if((eventinfo->channel_id != live_channel_id) && !(SAME_TRANSPONDER(live_channel_id, eventinfo->channel_id)))
|
||||
zapTo(eventinfo->channel_id);
|
||||
}
|
||||
|
||||
if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) {
|
||||
CRecordManager::getInstance()->Record((CTimerd::RecordingInfo *) data);
|
||||
CRecordManager::getInstance()->Record(eventinfo);
|
||||
autoshift = CRecordManager::getInstance()->TimeshiftOnly();
|
||||
}
|
||||
|
||||
@@ -3322,6 +3446,10 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
if(mode != mode_standby)
|
||||
standbyMode( true );
|
||||
}
|
||||
if((data & mode_mask)== mode_upnp) {
|
||||
lastMode=mode;
|
||||
mode=mode_upnp;
|
||||
}
|
||||
if((data & mode_mask)== mode_audio) {
|
||||
lastMode=mode;
|
||||
mode=mode_audio;
|
||||
@@ -3330,7 +3458,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
lastMode=mode;
|
||||
mode=mode_pic;
|
||||
}
|
||||
if((data & mode_mask)== mode_ts && CMoviePlayerGui::getInstance().Playing()) {
|
||||
if((data & mode_mask)== mode_ts) {
|
||||
if(mode == mode_radio)
|
||||
frameBuffer->stopFrame();
|
||||
lastMode=mode;
|
||||
@@ -3343,7 +3471,8 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
|
||||
CZapitChannel * cc = CZapit::getInstance()->GetCurrentChannel();
|
||||
if (cc && IS_WEBTV(cc->getChannelID())) {
|
||||
CMoviePlayerGui::getInstance().stopPlayBack();
|
||||
CMoviePlayerGui::getInstance().PlayBackgroundStart(cc->getUrl(), cc->getName(), cc->getChannelID());
|
||||
if (!CMoviePlayerGui::getInstance().PlayBackgroundStart(cc->getUrl(), cc->getName(), cc->getChannelID(), cc->getScriptName()))
|
||||
g_RCInput->postMsg(NeutrinoMessages::EVT_ZAP_FAILED, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4324,6 +4453,11 @@ void CNeutrinoApp::loadKeys(const char * fname)
|
||||
g_settings.key_bouquet_up = tconfig.getInt32( "key_bouquet_up", CRCInput::RC_right);
|
||||
g_settings.key_bouquet_down = tconfig.getInt32( "key_bouquet_down", CRCInput::RC_left);
|
||||
|
||||
g_settings.mbkey_copy_onefile = tconfig.getInt32( "mbkey.copy_onefile", CRCInput::RC_radio );
|
||||
g_settings.mbkey_copy_several = tconfig.getInt32( "mbkey.copy_several", CRCInput::RC_text );
|
||||
g_settings.mbkey_cut = tconfig.getInt32( "mbkey.cut", CRCInput::RC_audio );
|
||||
g_settings.mbkey_truncate = tconfig.getInt32( "mbkey.truncate", CRCInput::RC_games );
|
||||
g_settings.mbkey_cover = tconfig.getInt32( "mbkey.cover", CRCInput::RC_favorites );
|
||||
|
||||
g_settings.mpkey_rewind = tconfig.getInt32( "mpkey.rewind", CRCInput::RC_rewind );
|
||||
g_settings.mpkey_forward = tconfig.getInt32( "mpkey.forward", CRCInput::RC_forward );
|
||||
@@ -4352,6 +4486,7 @@ void CNeutrinoApp::loadKeys(const char * fname)
|
||||
|
||||
g_settings.bouquetlist_mode = tconfig.getInt32( "bouquetlist_mode", 0 );
|
||||
g_settings.sms_channel = tconfig.getInt32( "sms_channel", 0 );
|
||||
g_settings.sms_movie = tconfig.getInt32( "sms_movie", 0 );
|
||||
g_settings.mode_left_right_key_tv = tconfig.getInt32( "mode_left_right_key_tv", SNeutrinoSettings::ZAP);
|
||||
|
||||
g_settings.key_help = tconfig.getInt32( "key_help", CRCInput::RC_help );
|
||||
@@ -4402,6 +4537,12 @@ void CNeutrinoApp::saveKeys(const char * fname)
|
||||
tconfig.setInt32( "key_bouquet_up", g_settings.key_bouquet_up );
|
||||
tconfig.setInt32( "key_bouquet_down", g_settings.key_bouquet_down );
|
||||
|
||||
tconfig.setInt32( "mbkey.copy_onefile", g_settings.mbkey_copy_onefile );
|
||||
tconfig.setInt32( "mbkey.copy_several", g_settings.mbkey_copy_several );
|
||||
tconfig.setInt32( "mbkey.cut", g_settings.mbkey_cut );
|
||||
tconfig.setInt32( "mbkey.truncate", g_settings.mbkey_truncate );
|
||||
tconfig.setInt32( "mbkey.cover", g_settings.mbkey_cover );
|
||||
|
||||
tconfig.setInt32( "mpkey.rewind", g_settings.mpkey_rewind );
|
||||
tconfig.setInt32( "mpkey.forward", g_settings.mpkey_forward );
|
||||
tconfig.setInt32( "mpkey.pause", g_settings.mpkey_pause );
|
||||
@@ -4428,6 +4569,7 @@ void CNeutrinoApp::saveKeys(const char * fname)
|
||||
|
||||
tconfig.setInt32( "bouquetlist_mode", g_settings.bouquetlist_mode );
|
||||
tconfig.setInt32( "sms_channel", g_settings.sms_channel );
|
||||
tconfig.setInt32( "sms_movie", g_settings.sms_movie );
|
||||
tconfig.setInt32( "mode_left_right_key_tv", g_settings.mode_left_right_key_tv );
|
||||
|
||||
tconfig.setInt32( "key_help", g_settings.key_help );
|
||||
@@ -4714,6 +4856,12 @@ bool CNeutrinoApp::adjustToChannelID(const t_channel_id channel_id)
|
||||
if (has_channel && first_mode_found < 0)
|
||||
first_mode_found = LIST_MODE_PROV;
|
||||
if(!has_channel && old_mode == LIST_MODE_PROV)
|
||||
new_mode = LIST_MODE_WEBTV;
|
||||
|
||||
has_channel = TVwebList->adjustToChannelID(channel_id);
|
||||
if (has_channel && first_mode_found < 0)
|
||||
first_mode_found = LIST_MODE_WEBTV;
|
||||
if(!has_channel && old_mode == LIST_MODE_WEBTV)
|
||||
new_mode = LIST_MODE_SAT;
|
||||
|
||||
has_channel = TVsatList->adjustToChannelID(channel_id);
|
||||
@@ -4735,6 +4883,12 @@ bool CNeutrinoApp::adjustToChannelID(const t_channel_id channel_id)
|
||||
if (has_channel && first_mode_found < 0)
|
||||
first_mode_found = LIST_MODE_PROV;
|
||||
if(!has_channel && old_mode == LIST_MODE_PROV)
|
||||
new_mode = LIST_MODE_WEBTV;
|
||||
|
||||
has_channel = RADIOwebList->adjustToChannelID(channel_id);
|
||||
if (has_channel && first_mode_found < 0)
|
||||
first_mode_found = LIST_MODE_WEBTV;
|
||||
if(!has_channel && old_mode == LIST_MODE_WEBTV)
|
||||
new_mode = LIST_MODE_SAT;
|
||||
|
||||
has_channel = RADIOsatList->adjustToChannelID(channel_id);
|
||||
@@ -4779,12 +4933,11 @@ void CNeutrinoApp::migrateConfig(const char *fname)
|
||||
migconf.loadConfig(fname);
|
||||
/* here we do a simple rename of config file keys */
|
||||
int magic = -424242; /* obviously a value that does not appear in real cases */
|
||||
int tmp = magic;
|
||||
int i;
|
||||
for (i = 0; key_rename[i].from != NULL; i++) {
|
||||
const char *from = key_rename[i].from;
|
||||
const char *to = key_rename[i].to;
|
||||
tmp = migconf.getInt32(from, magic);
|
||||
int tmp = migconf.getInt32(from, magic);
|
||||
if (tmp == magic) /* old key does not exist */
|
||||
continue;
|
||||
/* only set new key to old value if the new key does not yet exist */
|
||||
|
Reference in New Issue
Block a user