diff --git a/data/satellites.xml b/data/satellites.xml index 155a69d52..83b5dd895 100755 --- a/data/satellites.xml +++ b/data/satellites.xml @@ -1604,7 +1604,7 @@ - + diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 67fd01ce3..0032baf5f 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -529,11 +529,13 @@ CFlashExpert::CFlashExpert() void CFlashExpert::readmtd(int preadmtd) { - char tmp[10]; - sprintf(tmp, "%d", preadmtd); - std::string filename = "/tmp/mtd"; - filename += tmp; - filename += ".img"; // US-ASCII (subset of UTF-8 and ISO8859-1) + char tmpStr[256]; + struct timeval tv; + gettimeofday(&tv, NULL); + strftime(tmpStr, sizeof(tmpStr), "_%Y%m%d_%H%M.img", localtime(&tv.tv_sec)); + CMTDInfo* mtdInfo = CMTDInfo::getInstance(); + std::string filename = "/tmp/" + mtdInfo->getMTDName(preadmtd); + filename += tmpStr; if (preadmtd == -1) { filename = "/tmp/flashimage.img"; // US-ASCII (subset of UTF-8 and ISO8859-1) @@ -542,10 +544,10 @@ void CFlashExpert::readmtd(int preadmtd) setTitle(LOCALE_FLASHUPDATE_TITLEREADFLASH); paint(); showGlobalStatus(0); - showStatusMessageUTF((std::string(g_Locale->getText(LOCALE_FLASHUPDATE_ACTIONREADFLASH)) + " (" + CMTDInfo::getInstance()->getMTDName(preadmtd) + ')')); // UTF-8 + showStatusMessageUTF((std::string(g_Locale->getText(LOCALE_FLASHUPDATE_ACTIONREADFLASH)) + " (" + mtdInfo->getMTDName(preadmtd) + ')')); // UTF-8 CFlashTool ft; ft.setStatusViewer( this ); - ft.setMTDDevice(CMTDInfo::getInstance()->getMTDFileName(preadmtd)); + ft.setMTDDevice(mtdInfo->getMTDFileName(preadmtd)); if(!ft.readFromMTD(filename, 100)) { showStatusMessageUTF(ft.getErrorMessage()); // UTF-8 @@ -611,8 +613,12 @@ void CFlashExpert::showMTDSelector(const std::string & actionkey) CMTDInfo* mtdInfo =CMTDInfo::getInstance(); for(int lx=0;lxgetMTDCount();lx++) { char sActionKey[20]; + bool enabled = true; + // disable write uboot + if ((actionkey == "writemtd") && (lx == 0)) + enabled = false; sprintf(sActionKey, "%s%d", actionkey.c_str(), lx); - mtdselector->addItem(new CMenuForwarderNonLocalized(mtdInfo->getMTDName(lx).c_str(), true, NULL, this, sActionKey)); + mtdselector->addItem(new CMenuForwarderNonLocalized(mtdInfo->getMTDName(lx).c_str(), enabled, NULL, this, sActionKey)); } mtdselector->exec(NULL,""); delete mtdselector; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 11305ace1..3258bf8ee 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -421,7 +421,6 @@ int CNeutrinoApp::loadSetup(const char * fname) strncpy(g_settings.pref_subs[i], configfile.getString(cfg_key, "").c_str(), 30); } g_settings.zap_cycle = configfile.getInt32( "zap_cycle", 0 ); - g_settings.sms_channel = configfile.getInt32( "sms_channel", 0 ); strcpy( g_settings.audio_PCMOffset, configfile.getString( "audio_PCMOffset", "0" ).c_str() ); //vcr @@ -604,7 +603,6 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.cacheTXT = configfile.getInt32( "cacheTXT", 0); g_settings.minimode = configfile.getInt32( "minimode", 0); g_settings.mode_clock = configfile.getInt32( "mode_clock", 0); - g_settings.mode_left_right_key_tv = configfile.getInt32( "mode_left_right_key_tv", SNeutrinoSettings::ZAP); g_settings.zapto_pre_time = configfile.getInt32( "zapto_pre_time", 0); g_settings.spectrum = configfile.getBool("spectrum" , false); g_settings.channellist_epgtext_align_right = configfile.getBool("channellist_epgtext_align_right" , false); @@ -651,8 +649,6 @@ int CNeutrinoApp::loadSetup(const char * fname) strcpy( g_settings.ttx_font_file, configfile.getString( "ttx_font_file", FONTDIR"/DejaVuLGCSansMono-Bold.ttf" ).c_str() ); ttx_font_file = g_settings.ttx_font_file; strcpy( g_settings.update_dir, configfile.getString( "update_dir", "/tmp" ).c_str() ); - //BouquetHandling - g_settings.bouquetlist_mode = configfile.getInt32( "bouquetlist_mode", 0 ); // parentallock if (!parentallocked) { @@ -829,7 +825,6 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32( "rotor_swap", g_settings.rotor_swap); configfile.setInt32( "emlog", g_settings.emlog); configfile.setInt32( "zap_cycle", g_settings.zap_cycle ); - configfile.setInt32( "sms_channel", g_settings.sms_channel ); configfile.setInt32( "hdd_fs", g_settings.hdd_fs); configfile.setInt32( "hdd_sleep", g_settings.hdd_sleep); configfile.setInt32( "hdd_noise", g_settings.hdd_noise); @@ -1021,7 +1016,6 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32( "cacheTXT", g_settings.cacheTXT ); configfile.setInt32( "minimode", g_settings.minimode ); configfile.setInt32( "mode_clock", g_settings.mode_clock ); - configfile.setInt32( "mode_left_right_key_tv", g_settings.mode_left_right_key_tv ); configfile.setInt32( "zapto_pre_time", g_settings.zapto_pre_time ); configfile.setBool("spectrum", g_settings.spectrum); configfile.setBool("channellist_epgtext_align_right", g_settings.channellist_epgtext_align_right); @@ -1057,8 +1051,6 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setString("update_dir", g_settings.update_dir); configfile.setString("font_file", g_settings.font_file); configfile.setString("ttx_font_file", g_settings.ttx_font_file); - //BouquetHandling - configfile.setInt32( "bouquetlist_mode", g_settings.bouquetlist_mode ); //parentallock configfile.setInt32( "parentallock_prompt", g_settings.parentallock_prompt ); @@ -3693,6 +3685,10 @@ void CNeutrinoApp::loadKeys(const char * fname) g_settings.key_click = tconfig.getInt32( "key_click", 1 ); strcpy(g_settings.repeat_blocker, tconfig.getString("repeat_blocker", "150").c_str()); strcpy(g_settings.repeat_genericblocker, tconfig.getString("repeat_genericblocker", "100").c_str()); + + g_settings.bouquetlist_mode = tconfig.getInt32( "bouquetlist_mode", 0 ); + g_settings.sms_channel = tconfig.getInt32( "sms_channel", 0 ); + g_settings.mode_left_right_key_tv = tconfig.getInt32( "mode_left_right_key_tv", SNeutrinoSettings::ZAP); } void CNeutrinoApp::saveKeys(const char * fname) @@ -3747,6 +3743,10 @@ void CNeutrinoApp::saveKeys(const char * fname) tconfig.setString( "repeat_blocker", g_settings.repeat_blocker ); tconfig.setString( "repeat_genericblocker", g_settings.repeat_genericblocker ); + tconfig.setInt32( "bouquetlist_mode", g_settings.bouquetlist_mode ); + tconfig.setInt32( "sms_channel", g_settings.sms_channel ); + tconfig.setInt32( "mode_left_right_key_tv", g_settings.mode_left_right_key_tv ); + if(fname) tconfig.saveConfig(fname); } diff --git a/src/nhttpd/doc/nhttpd_controlapi.html b/src/nhttpd/doc/nhttpd_controlapi.html index f6d69dfda..e87fa6c56 100644 --- a/src/nhttpd/doc/nhttpd_controlapi.html +++ b/src/nhttpd/doc/nhttpd_controlapi.html @@ -194,6 +194,11 @@ http://dbox/control/reloadplugins + + 42. Screenshot erstellen + + http://dbox/control/screenshot +     @@ -1806,6 +1811,29 @@ Beispiel:
43700016d66
ok
  + + +
+ + +
41. Plugins neu laden
+
Handler: http://dbox/control/reloadplugins
+
+Parameter: keine
+Rükgabe: ok
+
+Die Pluginliste wird neu geladen. +

+ + +
42. Screenshot erstellen
+
Handler: http://dbox/control/screenshot
+
+Parameter: keine
+Rükgabe: ok
+
+Screenshot mit TV Bild und OSD wird erstellt und unter /tmp/screenshot.png abgelegt. +
  

diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp index 94be9c848..6f5b8fa0a 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp @@ -34,6 +34,8 @@ #include #include #include "gui/plugins.h"//for relodplugins +#include +#include // yhttpd #include "yhttpd.h" #include "ytypes_globals.h" @@ -175,6 +177,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]= {"version", &CControlAPI::VersionCGI, ""}, {"reloadsetup", &CControlAPI::ReloadNutrinoSetupfCGI, ""}, {"reloadplugins", &CControlAPI::ReloadPluginsCGI, ""}, + {"screenshot", &CControlAPI::ScreenshotCGI, ""}, // boxcontrol - devices {"volume", &CControlAPI::VolumeCGI, "text/plain"}, {"lcd", &CControlAPI::LCDAction, "text/plain"}, @@ -440,11 +443,9 @@ void CControlAPI::StandbyCGI(CyhookHandler *hh) hh->SendError(); } else -#if HAVE_DBOX2 // FIXME: not implemented - if(NeutrinoAPI->Controld->getVideoPowerDown()) + if(CNeutrinoApp::getInstance()->getMode() == 4)//mode_standby = 4 hh->WriteLn("on"); else -#endif hh->WriteLn("off"); } @@ -732,7 +733,9 @@ static const struct key keynames[] = { {"KEY_PAUSE", KEY_PAUSE}, {"KEY_RECORD", KEY_RECORD}, {"KEY_STOP", KEY_STOP}, - {"KEY_PLAY", KEY_PLAY} + {"KEY_PLAY", KEY_PLAY}, + {"KEY_WWW", KEY_WWW}, + {"KEY_GAMES", KEY_GAMES} }; // The code here is based on rcsim. Thx Carjay! @@ -1448,6 +1451,13 @@ void CControlAPI::ReloadPluginsCGI(CyhookHandler *hh) hh->SendOk(); } +void CControlAPI::ScreenshotCGI(CyhookHandler *hh) +{ + CScreenShot * sc = new CScreenShot("/tmp/screenshot.png", (CScreenShot::screenshot_format_t)0 /*PNG*/); + sc->EnableOSD(true); + sc->Start(); + hh->SendOk(); +} //----------------------------------------------------------------------------- void CControlAPI::ZaptoCGI(CyhookHandler *hh) diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.h b/src/nhttpd/tuxboxapi/coolstream/controlapi.h index 91ab2792e..052739005 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.h +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.h @@ -82,6 +82,7 @@ private: void VersionCGI(CyhookHandler *hh); void ReloadNutrinoSetupfCGI(CyhookHandler *hh); void ReloadPluginsCGI(CyhookHandler *hh); + void ScreenshotCGI(CyhookHandler *hh); void ZaptoCGI(CyhookHandler *hh); void StartPluginCGI(CyhookHandler *hh); void LCDAction(CyhookHandler *hh); diff --git a/src/nhttpd/web/Makefile.am b/src/nhttpd/web/Makefile.am index c605f239e..a873fc92a 100644 --- a/src/nhttpd/web/Makefile.am +++ b/src/nhttpd/web/Makefile.am @@ -87,6 +87,7 @@ install_DATA = channels.js \ Y_Tools_remote_osd.yhtm \ Y_Tools_Timer_Sync.js \ Y_Tools_Timer_Sync.yhtm \ + Y_Tools_tvshot.yhtm \ Y_Version.txt \ Y_VLC.js \ Y_Wait.yhtm \ diff --git a/src/nhttpd/web/Y_Blocks.txt b/src/nhttpd/web/Y_Blocks.txt index eb26f3f52..d438796ca 100644 --- a/src/nhttpd/web/Y_Blocks.txt +++ b/src/nhttpd/web/Y_Blocks.txt @@ -544,6 +544,8 @@ start-block~remote_neo + + end-block~remote_neo @@ -596,6 +598,8 @@ start-block~remote_zee + + end-block~remote_zee @@ -648,5 +652,6 @@ start-block~remote_hd1 + end-block~remote_hd1 diff --git a/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm b/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm index 90802d838..601953b9a 100644 --- a/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm +++ b/src/nhttpd/web/Y_Boxcontrol_Menue.yhtm @@ -91,10 +91,13 @@ function init(){
  • {=L:bc.menue.lcd_screenshot=}
  • =} ~=} + {=if-equal:{=global-var-get:boxtype=}~coolstream~ +
  • {=L:bc.menue.tv_screenshot=}
  • + ~=} {=if-equal:{=var-get:fbshot=}~true~
  • {=L:bc.menue.osd_screenshot=}
  • ~ -
  • {=L:bc.menue.osd_screenshot=}
  • =} {=if-equal:{=var-get:dboxshot=}~true~
  • {=L:bc.menue.remote_osd=}
  • diff --git a/src/nhttpd/web/Y_Tools_Boxcontrol.yhtm b/src/nhttpd/web/Y_Tools_Boxcontrol.yhtm index b505c1b35..10a1cae8d 100644 --- a/src/nhttpd/web/Y_Tools_Boxcontrol.yhtm +++ b/src/nhttpd/web/Y_Tools_Boxcontrol.yhtm @@ -34,9 +34,11 @@ function goUrl(_url){ - {=if-not-equal:{=global-var-get:boxtype=}~coolstream~ + {=if-equal:{=global-var-get:boxtype=}~coolstream~ + + ~ - ~=} + =} {=L:bc.control.playback=}{=L:bc.control.recording_mode=} diff --git a/src/nhttpd/web/Y_Tools_remote_osd.yhtm b/src/nhttpd/web/Y_Tools_remote_osd.yhtm index 6cd7140c8..6fe14f882 100644 --- a/src/nhttpd/web/Y_Tools_remote_osd.yhtm +++ b/src/nhttpd/web/Y_Tools_remote_osd.yhtm @@ -30,7 +30,7 @@ function do_clearshot2(){
    {=var-set:help_url=Help-BoxControl-Remote_OSD=}{=var-set:menu={=L:bc.menue.remote_osd=}=}{=include-block:Y_Blocks.txt;work_menu=}
    -
    +
    wait diff --git a/src/nhttpd/web/Y_Tools_tvshot.yhtm b/src/nhttpd/web/Y_Tools_tvshot.yhtm new file mode 100644 index 000000000..08c5e9733 --- /dev/null +++ b/src/nhttpd/web/Y_Tools_tvshot.yhtm @@ -0,0 +1,51 @@ +{=include-block:Y_Blocks.txt;head=} + + + + + +
    +
    +
    + {=var-set:menu={=L:bc.menue.tv_screenshot=}=} + {=include-block:Y_Blocks.txt;work_menu=} +
    +
    +
    +
    + + + wait + {=L:bc.tv.shap_wait_text=} + +
    + +
    +
    + + diff --git a/src/nhttpd/web/images/neo.jpg b/src/nhttpd/web/images/neo.jpg index b8b1c8d32..9c8e6ceb0 100644 Binary files a/src/nhttpd/web/images/neo.jpg and b/src/nhttpd/web/images/neo.jpg differ diff --git a/src/nhttpd/web/languages/Deutsch b/src/nhttpd/web/languages/Deutsch index f6cbdb8d0..4586571d3 100644 --- a/src/nhttpd/web/languages/Deutsch +++ b/src/nhttpd/web/languages/Deutsch @@ -79,12 +79,14 @@ bc.menue.messages_desc=Nachricht an die Box senden bc.menue.messages=Nachrichten bc.menue.remote_desc=Fernbedinung bc.menue.remote=Fernbedienung -bc.menue.lcd_screenshot_desc=lcd screenshot machen +bc.menue.lcd_screenshot_desc=LCD Screenshot erstellen bc.menue.lcd_screenshot=LCD Screenshot bc.menue.lcd_screenshot_desc_ni=lcshot nicht installiert in /bin oder /var/bin -bc.menue.osd_screenshot_desc=osd screenshot machen +bc.menue.osd_screenshot_desc=OSD Screenshot erstellen bc.menue.osd_screenshot=OSD Screenshot bc.menue.osd_screenshot_desc_ni=fbshot nicht installiert in /bin oder /var/bin +bc.menue.tv_screenshot_desc=TV Screenshot erstellen +bc.menue.tv_screenshot=TV Screenshot bc.menue.remote_osd_desc=Fernbedienung und On Screen Display bc.menue.remote_osd=Fernbed. & OSD bc.menue.remote_osd_desc_ni=dboxshot nicht installiert in /bin oder /var/bin @@ -130,6 +132,11 @@ bc.osd.shot=Schnappschuss bc.osd.delete_shots=Schnappschuss löschen bc.osd.shap_wait_text=Schnappschuss wird erstellt +======== Boxcontrol - TV-Screenshot +bc.tv.shot=Schnappschuss +bc.tv.delete_shot=Schnappschuss löschen +bc.tv.shap_wait_text=Schnappschuss wird erstellt + ========= Boxcontrol - Others bc.channels=Sender diff --git a/src/nhttpd/web/languages/English b/src/nhttpd/web/languages/English index a2df906c1..cec1fb334 100644 --- a/src/nhttpd/web/languages/English +++ b/src/nhttpd/web/languages/English @@ -87,6 +87,8 @@ bc.menue.lcd_screenshot_desc_ni=lcshot not installed at /bin or /var/bin bc.menue.osd_screenshot_desc=make osd screenshot bc.menue.osd_screenshot=OSD Screenshot bc.menue.osd_screenshot_desc_ni=fbshot not installed at /bin or /var/bin +bc.menue.tv_screenshot_desc=make tv screenshot +bc.menue.tv_screenshot=TV Screenshot bc.menue.remote_osd_desc=remote and osd bc.menue.remote_osd=Remote & OSD bc.menue.remote_osd_desc_ni=dboxshot not installed at /bin or /var/bin @@ -132,6 +134,11 @@ bc.osd.shot=Shot bc.osd.delete_shots=Delete shots bc.osd.shap_wait_text=Take Snapshot +======== Boxcontrol - TV-Screenshot +bc.tv.shot=Shot +bc.tv.delete_shot=Delete shot +bc.tv.shap_wait_text=Take Snapshot + ========= Boxcontrol - Others bc.channels=Channels diff --git a/src/nhttpd/web/languages/Portuguese b/src/nhttpd/web/languages/Portuguese index e7633d183..afa3c0913 100644 --- a/src/nhttpd/web/languages/Portuguese +++ b/src/nhttpd/web/languages/Portuguese @@ -87,6 +87,8 @@ bc.menue.lcd_screenshot_desc_ni=lcshot não se encontra instalado em /bin ou /va bc.menue.osd_screenshot_desc=fazer um osd screenshot bc.menue.osd_screenshot=OSD Screenshot bc.menue.osd_screenshot_desc_ni=fbshot não se encontra instalado em /bin ou /var/bin +bc.menue.tv_screenshot_desc=frazer um tv screenshot +bc.menue.tv_screenshot=TV Screenshot bc.menue.remote_osd_desc=remote e osd bc.menue.remote_osd=Remote & OSD bc.menue.remote_osd_desc_ni=dboxshot não se encontra instalado em /bin ou /var/bin @@ -132,6 +134,11 @@ bc.osd.shot=Shot bc.osd.delete_shots=Apagar shots bc.osd.shap_wait_text=Fazer Snapshot +======== Boxcontrol - TV-Screenshot +bc.tv.shot=Shot +bc.tv.delete_shot=Apagar shots +bc.tv.shap_wait_text=Frazer Snapshot + ========= Boxcontrol - Others bc.channels=Canais diff --git a/src/nhttpd/web/scripts/Y_Tools.sh b/src/nhttpd/web/scripts/Y_Tools.sh index 7182cc195..4d22e473e 100755 --- a/src/nhttpd/web/scripts/Y_Tools.sh +++ b/src/nhttpd/web/scripts/Y_Tools.sh @@ -565,6 +565,7 @@ case "$1" in lcshot) shift 1; do_lcshot $* ;; fbshot) shift 1; do_fbshot $* ;; fbshot_clear) do_fbshot_clear ;; + tvshot_clear) rm -f /tmp/screenshot.png ;; get_update_version_dbox) wget -O /tmp/version.txt "http://www.yjogol.com/download/Y_Version.txt" ;; get_update_version_coolstream) wget -O /tmp/version.txt "http://www.yjogol.com/download/coolstream/Y_Version.txt" ;; settings_backup_restore) shift 1; do_settings_backup_restore $* ;;