diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 5321cd305..c4dcdd44c 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -199,7 +199,11 @@ audioplayer.show_playlist Playlist anzeigen audioplayer.shuffle Zufällig audioplayer.spectrum LCD Skala audioplayer.stop Stopp +audioplayer.streamripper_dir Streamripper-Verzeichnis +audioplayer.streamripper_start Streamripper starten +audioplayer.streamripper_stop Streamripper stoppen audioplayer.title_artist Titel, Interpret +audioplayer_internetradio.name Audioplayer und Internetradio blank_screen Blanker Bildschirm bookmarkmanager.delete Löschen bookmarkmanager.name Bookmarks @@ -1123,6 +1127,7 @@ menu.hint_audioplayer_order Ändern der Sortierreihenfolge der Wiedergabeliste menu.hint_audioplayer_playlist Aktiviert die Anzeige der Titel in der Wiedergabeliste menu.hint_audioplayer_repeat Aktiviert das Wiederholen der Wiedergabeliste, wenn das Ende erreicht ist menu.hint_audioplayer_sc_metadata Aktiviert das Anzeigen der Audio-Metadaten +menu.hint_audioplayer_streamripper_dir Wählen Sie das Aufnahmeverzeichnis für den Streamripper menu.hint_audioplayer_title Aktivieren Sie die Titelsuche (SMS-Stil) in der Playliste menu.hint_auto_lang Wählen Sie, ob automatisch ihre bevorzugte Tonspur ausgewählt wird, wenn sie vorhanden ist menu.hint_auto_subs Automatische Anzeige der Untertitel in Ihrer bevorzugten Sprache diff --git a/data/locale/english.locale b/data/locale/english.locale index 8ea42950b..e4881b6c2 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -199,7 +199,11 @@ audioplayer.show_playlist Show playlist audioplayer.shuffle Shuffle audioplayer.spectrum LCD spectrum audioplayer.stop Stop +audioplayer.streamripper_dir Streamripper directory +audioplayer.streamripper_start Start streamripper +audioplayer.streamripper_stop Stop streamripper audioplayer.title_artist Title, artist +audioplayer_internetradio.name Audioplayer and Internetradio blank_screen Blank screen bookmarkmanager.delete delete bookmarkmanager.name bookmarks @@ -1123,6 +1127,7 @@ menu.hint_audioplayer_order Change playlist sort order menu.hint_audioplayer_playlist Show playlist items menu.hint_audioplayer_repeat Enable playlist repeat when end of list reached menu.hint_audioplayer_sc_metadata Enable streaming audio metadata parsing +menu.hint_audioplayer_streamripper_dir Default streamripper target directory menu.hint_audioplayer_title Enable SMS-style title search in playlist menu.hint_auto_lang Auto-switch audio to preferred language menu.hint_auto_subs Auto-start subtitles for preferred language diff --git a/data/themes/Material_Blue-Grey.theme b/data/themes/Material_Blue-Grey.theme index 4a46c32c1..c8854f610 100644 --- a/data/themes/Material_Blue-Grey.theme +++ b/data/themes/Material_Blue-Grey.theme @@ -131,3 +131,8 @@ progressbar_active_blue=77 progressbar_passive_red=38 progressbar_passive_green=49 progressbar_passive_blue=55 + +shadow_red=0 +shadow_green=0 +shadow_blue=0 +shadow_alpha=25 diff --git a/data/themes/Material_Grey_(Dark).theme b/data/themes/Material_Grey_(Dark).theme index d1f905421..5f0e7674e 100644 --- a/data/themes/Material_Grey_(Dark).theme +++ b/data/themes/Material_Grey_(Dark).theme @@ -131,3 +131,8 @@ progressbar_active_blue=62 progressbar_passive_red=26 progressbar_passive_green=26 progressbar_passive_blue=26 + +shadow_red=0 +shadow_green=0 +shadow_blue=0 +shadow_alpha=25 diff --git a/data/themes/Material_Grey_(Light).theme b/data/themes/Material_Grey_(Light).theme index 756695081..7e9897d0f 100644 --- a/data/themes/Material_Grey_(Light).theme +++ b/data/themes/Material_Grey_(Light).theme @@ -132,3 +132,8 @@ progressbar_active_blue=74 progressbar_passive_red=46 progressbar_passive_green=46 progressbar_passive_blue=46 + +shadow_red=0 +shadow_green=0 +shadow_blue=0 +shadow_alpha=25 diff --git a/data/themes/Material_Grey_(Medium).theme b/data/themes/Material_Grey_(Medium).theme index 441debf27..cdc2b29d3 100644 --- a/data/themes/Material_Grey_(Medium).theme +++ b/data/themes/Material_Grey_(Medium).theme @@ -131,3 +131,8 @@ progressbar_active_blue=62 progressbar_passive_red=38 progressbar_passive_green=38 progressbar_passive_blue=38 + +shadow_red=0 +shadow_green=0 +shadow_blue=0 +shadow_alpha=25 diff --git a/lib/hardware/coolstream/Makefile.am b/lib/hardware/coolstream/Makefile.am index 82f3ab83c..b2a96b31e 100644 --- a/lib/hardware/coolstream/Makefile.am +++ b/lib/hardware/coolstream/Makefile.am @@ -1,13 +1,6 @@ AM_CXXFLAGS = -fno-rtti -fno-exceptions -fno-strict-aliasing AM_CPPFLAGS = \ - -I$(top_builddir) \ - -I$(top_srcdir) \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/zapit/include \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/lib/libconfigfile \ - -I$(top_srcdir)/lib/libeventserver \ @HWLIB_CFLAGS@ noinst_LIBRARIES = libhwcaps.a diff --git a/lib/hardware/coolstream/hardware_caps.cpp b/lib/hardware/coolstream/hardware_caps.cpp index 139825c32..0922eb655 100644 --- a/lib/hardware/coolstream/hardware_caps.cpp +++ b/lib/hardware/coolstream/hardware_caps.cpp @@ -11,8 +11,6 @@ #include #include "hardware_caps.h" -#include - static int initialized = 0; static hw_caps_t caps; @@ -21,7 +19,7 @@ hw_caps_t *get_hwcaps(void) { return ∩︀ int rev = cs_get_revision(); int chip = cs_get_chip_type(); - caps.has_fan = (rev < 8 && CFEManager::getInstance()->getFE(0)->hasSat()); // only SAT-HD1 before rev 8 has fan + caps.has_fan = (rev < 8); // see dirty part of hw_caps in neutrino.cpp caps.has_HDMI = 1; caps.has_SCART = (rev != 10); caps.has_SCART_input = 0; @@ -44,14 +42,7 @@ hw_caps_t *get_hwcaps(void) { caps.force_tuner_2G = 1; break; case 8: - if (CFEManager::getInstance()->getFrontendCount() < 2) - { - strcpy(caps.boxname, "Neo"); - } - else - { - strcpy(caps.boxname, "Neo Twin"); - } + strcpy(caps.boxname, "Neo"); // see dirty part of hw_caps in neutrino.cpp strcpy(caps.boxarch, "Nevis"); caps.force_tuner_2G = 1; break; diff --git a/lib/libmd5sum/md5.c b/lib/libmd5sum/md5.c index e433782e8..aece50d10 100644 --- a/lib/libmd5sum/md5.c +++ b/lib/libmd5sum/md5.c @@ -132,7 +132,7 @@ md5_stream (stream, resblock) /* Important: BLOCKSIZE must be a multiple of 64. */ #define BLOCKSIZE 4096 struct md5_ctx ctx; - char buffer[BLOCKSIZE + 72]; + char buffer[BLOCKSIZE + 72] = {0}; size_t sum; /* Initialize the computation context. */ diff --git a/lib/libtuxtxt/tuxtxt_common.h b/lib/libtuxtxt/tuxtxt_common.h index 927d88d80..b998e5f70 100644 --- a/lib/libtuxtxt/tuxtxt_common.h +++ b/lib/libtuxtxt/tuxtxt_common.h @@ -704,8 +704,9 @@ void *tuxtxt_CacheThread(void * /*arg*/) tuxtxt_cache.current_subpage[magazine] = -1; continue; } - +#if 0 /* ? */ b1 &= 3; +#endif b3 &= 7; if (tuxtxt_is_dec(tuxtxt_cache.page_receiving)) /* ignore other subpage bits for hex pages */ diff --git a/src/driver/radiotext.cpp b/src/driver/radiotext.cpp index 28f1c8186..b74aa9ef0 100644 --- a/src/driver/radiotext.cpp +++ b/src/driver/radiotext.cpp @@ -836,7 +836,7 @@ void CRadioText::RassDecode(unsigned char *mtext, int len) slidenumr = Rass_SlideFoto; } // - char *filepath; + char *filepath = asprintf(&filepath, "%s/Rass_%d.error", DataDir, slidenumr); (filetype == 2) ? asprintf(&filepath, "%s/Rass_%d.def", DataDir, slidenumr) : asprintf(&filepath, "%s/Rass_%d.mpg", DataDir, slidenumr); if ((fd = fopen(filepath, "wb")) != NULL) { diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index b1690a132..82d8d93bb 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -218,7 +218,7 @@ CAudioPlayerGui::~CAudioPlayerGui() delete m_titlebox; } -const struct button_label AudioPlayerButtons[][4] = +/*const*/ struct button_label AudioPlayerButtons[][4] = { { { NEUTRINO_ICON_BUTTON_STOP , LOCALE_AUDIOPLAYER_STOP }, @@ -251,6 +251,7 @@ const struct button_label AudioPlayerButtons[][4] = { { NEUTRINO_ICON_BUTTON_STOP , LOCALE_AUDIOPLAYER_STOP }, { NEUTRINO_ICON_BUTTON_PAUSE , LOCALE_AUDIOPLAYER_PAUSE }, + { NEUTRINO_ICON_BUTTON_RECORD_ACTIVE, LOCALE_AUDIOPLAYER_STREAMRIPPER_START }, }, { { NEUTRINO_ICON_BUTTON_GREEN , LOCALE_AUDIOPLAYER_ADD }, @@ -323,6 +324,9 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey) m_idletime = time(NULL); m_screensaver = false; + m_streamripper_available = !find_executable("streamripper").empty() && !find_executable("streamripper.sh").empty(); + m_streamripper_active = false; + if (parent) parent->hide(); @@ -420,6 +424,13 @@ int CAudioPlayerGui::show() playNext(); } + if (m_streamripper_active && !getpidof("streamripper")) + { + printf("streamripper should but doesn't work.\n"); + m_streamripper_active = false; + update = true; + } + if (update) { if (clear_before_update) @@ -840,6 +851,32 @@ int CAudioPlayerGui::show() update = true; } } + else if (msg == (neutrino_msg_t) g_settings.key_record) + { + if (m_key_level == 1) + { + if (m_curr_audiofile.FileType == CFile::STREAM_AUDIO && m_streamripper_available) + { + if (m_streamripper_active) + { + ShowHint(LOCALE_MESSAGEBOX_INFO, LOCALE_AUDIOPLAYER_STREAMRIPPER_STOP, HINTBOX_MIN_WIDTH, 2); + my_system(2, "streamripper.sh", "stop"); + m_streamripper_active = false; + } + else + { + ShowHint(LOCALE_MESSAGEBOX_INFO, LOCALE_AUDIOPLAYER_STREAMRIPPER_START, HINTBOX_MIN_WIDTH, 2); + printf("streamripper.sh start \"%s\"\n", m_playlist[m_current].MetaData.url.c_str()); + puts("[audioplayer.cpp] executing streamripper"); + if (my_system(3, "streamripper.sh", "start", m_playlist[m_current].MetaData.url.c_str()) != 0) + perror("[audioplayer.cpp]: streamripper.sh failed\n"); + else + m_streamripper_active = true; + } + update = true; + } + } + } else if (CRCInput::isNumeric(msg) && !(m_playlist.empty())) { //numeric zap or SMS zap if (m_select_title_by_name) @@ -1732,7 +1769,18 @@ void CAudioPlayerGui::paintFoot() if (m_curr_audiofile.FileType != CFile::STREAM_AUDIO) ::paintButtons(button_x, button_y, button_width, 4, AudioPlayerButtons[0], button_width, m_button_height); else - ::paintButtons(button_x, button_y, button_width, 2, AudioPlayerButtons[6], button_width, m_button_height); + { + int b = 2; + if (m_streamripper_available) + { + b = 3; + if (m_streamripper_active) + AudioPlayerButtons[6][2].locale = LOCALE_AUDIOPLAYER_STREAMRIPPER_STOP; + else + AudioPlayerButtons[6][2].locale = LOCALE_AUDIOPLAYER_STREAMRIPPER_START; + } + ::paintButtons(button_x, button_y, button_width, b, AudioPlayerButtons[6], button_width, m_button_height); + } } else // key_level == 2 { @@ -2030,6 +2078,13 @@ void CAudioPlayerGui::stop() if (CAudioPlayer::getInstance()->getState() != CBaseDec::STOP) CAudioPlayer::getInstance()->stop(); + + if (m_streamripper_active) + { + ShowHint(LOCALE_MESSAGEBOX_INFO, LOCALE_AUDIOPLAYER_STREAMRIPPER_STOP, HINTBOX_MIN_WIDTH, 2); + my_system(2, "streamripper.sh", "stop"); + m_streamripper_active = false; + } } void CAudioPlayerGui::pause() diff --git a/src/gui/audioplayer.h b/src/gui/audioplayer.h index 068a412eb..ff464b09a 100644 --- a/src/gui/audioplayer.h +++ b/src/gui/audioplayer.h @@ -109,6 +109,8 @@ class CAudioPlayerGui : public CMenuTarget bool m_select_title_by_name; bool m_show_playlist; bool m_playlistHasChanged; + bool m_streamripper_available; + bool m_streamripper_active; CAudioPlayList m_playlist; CAudioPlayList m_radiolist; diff --git a/src/gui/audioplayer_setup.cpp b/src/gui/audioplayer_setup.cpp index c55bd75d6..8afcce06d 100644 --- a/src/gui/audioplayer_setup.cpp +++ b/src/gui/audioplayer_setup.cpp @@ -80,6 +80,15 @@ int CAudioPlayerSetup::exec(CMenuTarget* parent, const std::string &actionKey) return res; } + if(actionKey == "streamripperdir") + { + CFileBrowser b; + b.Dir_Mode=true; + if (b.exec(g_settings.network_nfs_streamripperdir.c_str())) + g_settings.network_nfs_streamripperdir = b.getSelectedFile()->Name; + return res; + } + res = showAudioPlayerSetup(); return res; @@ -102,7 +111,7 @@ int CAudioPlayerSetup::showAudioPlayerSetup() CMenuWidget* audioplayerSetup = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_AUDIOSETUP); - audioplayerSetup->addIntroItems(LOCALE_AUDIOPLAYER_NAME); + audioplayerSetup->addIntroItems(LOCALE_AUDIOPLAYER_INTERNETRADIO_NAME); // display order mc = new CMenuOptionChooser(LOCALE_AUDIOPLAYER_DISPLAY_ORDER, &g_settings.audioplayer_display, AUDIOPLAYER_DISPLAY_ORDER_OPTIONS, AUDIOPLAYER_DISPLAY_ORDER_OPTION_COUNT, true); @@ -136,17 +145,20 @@ int CAudioPlayerSetup::showAudioPlayerSetup() mf->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_DEFDIR); audioplayerSetup->addItem(mf); + audioplayerSetup->addItem(GenericMenuSeparatorLine); + + // internetradio autostart first entry from favorites + mc = new CMenuOptionChooser(LOCALE_INETRADIO_AUTOSTART, &g_settings.inetradio_autostart, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL); + mc->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_INETRADIO_AUTOSTART); + audioplayerSetup->addItem(mc); + mc = new CMenuOptionChooser(LOCALE_AUDIOPLAYER_ENABLE_SC_METADATA, &g_settings.audioplayer_enable_sc_metadata, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true); mc->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_SC_METADATA); audioplayerSetup->addItem(mc); - //NI - audioplayerSetup->addItem(GenericMenuSeparator); - - //NI internetradio autostart first entry from favorites - mc = new CMenuOptionChooser(LOCALE_INETRADIO_AUTOSTART, &g_settings.inetradio_autostart, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL); - mc->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_INETRADIO_AUTOSTART); - audioplayerSetup->addItem(mc); + mf = new CMenuForwarder(LOCALE_AUDIOPLAYER_STREAMRIPPER_DIR, true, g_settings.network_nfs_streamripperdir, this, "streamripperdir"); + mf->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_STREAMRIPPER_DIR); + audioplayerSetup->addItem(mf); int res = audioplayerSetup->exec (NULL, ""); delete audioplayerSetup; diff --git a/src/gui/components/cc_frm_scrollbar.cpp b/src/gui/components/cc_frm_scrollbar.cpp index 2e59a630f..13006e722 100644 --- a/src/gui/components/cc_frm_scrollbar.cpp +++ b/src/gui/components/cc_frm_scrollbar.cpp @@ -147,14 +147,10 @@ void CComponentsScrollBar::initBottomNaviIcon() void CComponentsScrollBar::initSegments() { //init dimensions for segments - int w_seg = width - 2*fr_thickness - 2*append_x_offset; - if (w_seg < 0) - w_seg = 0; + int w_seg = max(0, width - 2*fr_thickness - 2*append_x_offset); //calculate height of segment container - int h_seg_obj = height - 2*fr_thickness - 2*sb_up_obj->getHeight() - 2*append_y_offset; - if (h_seg_obj < 0) - h_seg_obj = 0; + int h_seg_obj = max(0, height - 2*fr_thickness - 2*sb_up_obj->getHeight() - 2*append_y_offset); //init segment container if (sb_segments_obj == NULL){ @@ -169,30 +165,41 @@ void CComponentsScrollBar::initSegments() //clean up segment container before add new segments sb_segments_obj->clear(); + //hold segment count in this scope + uint32_t tmp_segments = sb_segments_count; + //set y position of 1st segment and set height of segments int y_seg = append_y_offset; - int h_seg = sb_segments_obj->getHeight()/sb_segments_count - append_y_offset; - if (h_seg < 0) - h_seg = 0; + int h_seg = max(0, int(sb_segments_obj->getHeight()/tmp_segments - append_y_offset)); + + //reduce required segment count and create a moderate segment height for better visibility of slider if we have very much segments. + uint32_t tmp_quot = 1; + if (h_seg == 0){ + h_seg = w_seg - append_y_offset; + tmp_segments = max(1, sb_segments_obj->getHeight() / (h_seg+append_y_offset)); + tmp_quot = uint32_t((float)sb_segments_count/(float)tmp_segments + 0.5); + } fb_pixel_t passive_col = sb_visual_enable ? sb_segment_col : col_body; //create and add segments to segment container - for(u_int8_t i=0; igetCCItemId(item); //set color for marked id - if (sb_mark_id == id){ + if ((tmp_segments == sb_segments_count && sb_mark_id == id) || (tmp_segments != sb_segments_count && int(sb_mark_id/tmp_quot) == id)) + { item->setColorBody(sb_segment_col_sel); #if 0 item->enableColBodyGradient(CC_COLGRAD_COL_A_2_COL_B); item->setColBodyGradient(CColorGradient::gradientDark2Light2Dark, CFrameBuffer::gradientHorizontal); #endif } - else{ + else + { item->setColorBody(passive_col); #if 0 item->disableColBodyGradient(); @@ -203,19 +210,19 @@ void CComponentsScrollBar::initSegments() if (passive_col == col_body){ item->setCorner(RADIUS_MIN, CORNER_ALL); continue; - }else if (sb_segments_count == 1){ + }else if (tmp_segments == 1){ item->setCorner(RADIUS_MIN, CORNER_ALL); break; }else if(i == 0){ item->setCorner(RADIUS_MIN, CORNER_TOP); continue; - }else if(i == sb_segments_count - 1){ + }else if(i == tmp_segments - 1){ item->setCorner(RADIUS_MIN, CORNER_BOTTOM); break; - }else if((i > 0 && i < sb_segments_count - 1)){ - item->setCorner(RADIUS_MIN, CORNER_NONE); + }else if((i > 0 && i < tmp_segments - 1)){ + item->setCorner(RADIUS_NONE, CORNER_NONE); }else{ - item->setCorner(RADIUS_MIN, CORNER_NONE); + item->setCorner(RADIUS_NONE, CORNER_NONE); } } } diff --git a/src/gui/components/cc_frm_scrollbar.h b/src/gui/components/cc_frm_scrollbar.h index 8bd1c0568..0b902d591 100644 --- a/src/gui/components/cc_frm_scrollbar.h +++ b/src/gui/components/cc_frm_scrollbar.h @@ -49,7 +49,7 @@ class CComponentsScrollBar : public CComponentsFrmChain fb_pixel_t sb_segment_col, sb_segment_col_sel; ///count of segments - int sb_segments_count; + uint32_t sb_segments_count; ///mark id int sb_mark_id; diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 3e19dc496..6881d579a 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -265,7 +265,6 @@ void CEventList::readEvents(const t_channel_id channel_id) void CEventList::getChannelNames(t_channel_id &channel_id, std::string ¤t_channel_name, std::string &prev_channel_name, std::string &next_channel_name, neutrino_msg_t msg) { t_bouquet_id current_bouquet_id = bouquetList->getActiveBouquetNumber(); - t_channel_id channel_id_tmp = channel_id; const unsigned int channel_nr = bouquetList->Bouquets[current_bouquet_id]->channelList->getSize(); if(channel_nr < 2){ channel_id = 0; @@ -274,7 +273,7 @@ void CEventList::getChannelNames(t_channel_id &channel_id, std::string ¤t_ unsigned int tmp_channel = 0; for(unsigned int channel = 0; channel < channel_nr; channel++) { - channel_id_tmp = bouquetList->Bouquets[current_bouquet_id]->channelList->getChannelFromIndex(channel)->getChannelID(); + t_channel_id channel_id_tmp = bouquetList->Bouquets[current_bouquet_id]->channelList->getChannelFromIndex(channel)->getChannelID(); if(channel_id_tmp == channel_id){ if ( msg==CRCInput::RC_right || msg==CRCInput::RC_forward ) { channel = (channel+1) %channel_nr; diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 6807ac771..49d29b402 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -988,7 +988,7 @@ bool CInfoViewer::showLivestreamInfo() CMoviePlayerGui::getInstance().getLivestreamInfo(&livestreamInfo1, &tmp1); if (!(videoDecoder->getBlank())) { - int xres, yres, framerate; + int xres = 0, yres = 0, framerate = 0; std::string tmp2; videoDecoder->getPictureInfo(xres, yres, framerate); switch (framerate) { @@ -1017,6 +1017,7 @@ bool CInfoViewer::showLivestreamInfo() tmp2 = "60fps"; break; default: + framerate = 0; tmp2 = g_Locale->getText(LOCALE_STREAMINFO_FRAMERATE_UNKNOWN); break; } @@ -1124,7 +1125,6 @@ void CInfoViewer::loop(bool show_dot) //printf("%s:%d: imitate VZAP; RC_left/right\n", __func__, __LINE__); CMoviePlayerGui::getInstance().setFromInfoviewer(true); g_RCInput->postMsg (msg, data); - hideIt = true; } else setSwitchMode(IV_MODE_VIRTUAL_ZAP); diff --git a/src/gui/mediaplayer_setup.cpp b/src/gui/mediaplayer_setup.cpp index bb18e8333..a2c5726d9 100644 --- a/src/gui/mediaplayer_setup.cpp +++ b/src/gui/mediaplayer_setup.cpp @@ -87,7 +87,7 @@ int CMediaPlayerSetup::showMediaPlayerSetup() CMenuForwarder *mf; CAudioPlayerSetup asetup; - mf = new CMenuForwarder(LOCALE_AUDIOPLAYER_NAME, true, NULL, &asetup, "", CRCInput::RC_red); + mf = new CMenuForwarder(LOCALE_AUDIOPLAYER_INTERNETRADIO_NAME, true, NULL, &asetup, "", CRCInput::RC_red); mf->setHint(NEUTRINO_ICON_HINT_APLAY, LOCALE_MENU_HINT_APLAY_SETUP); mediaSetup->addItem(mf); diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 5037198c1..c7bcf92b2 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1552,7 +1552,6 @@ void CMoviePlayerGui::PlayFileLoop(void) disableOsdElements(MUTE); CFileBrowser *playlist = new CFileBrowser(); CFile *pfile = NULL; - pfile = &(*filelist_it); int selected = std::distance( filelist.begin(), filelist_it ); filelist_it = filelist.end(); if (playlist->playlist_manager(filelist, selected)) @@ -2402,7 +2401,7 @@ void CMoviePlayerGui::selectChapter() playback->GetChapters(positions, titles); std::vector playlists; std::vector ptitles; - int current; + int current = 0; playback->GetTitles(playlists, ptitles, current); if (positions.empty() && playlists.empty()) @@ -2555,7 +2554,6 @@ bool CMoviePlayerGui::convertSubtitle(std::string &text) else { memset(buf + (len - olen), 0, olen); text = buf; - ret = true; } free(buf); diff --git a/src/gui/netfs_setup.cpp b/src/gui/netfs_setup.cpp index 37ef77e8c..830e7c410 100644 --- a/src/gui/netfs_setup.cpp +++ b/src/gui/netfs_setup.cpp @@ -264,7 +264,7 @@ int CNETFSMountGui::write_config(int mt) { if(mt == SNeutrinoSettings::FSTAB) { - config_file << "# /etc/fstab: static file system information (generated from NetFS setup).\n" + config_file << "# " << fstabPath << ": static file system information (generated from NetFS setup).\n" << "#\n" << "# \n"; @@ -306,7 +306,7 @@ int CNETFSMountGui::write_config(int mt) } else { - config_file << "# /etc/auto.net: dynamic file system information (generated from NetFS setup).\n" + config_file << "# " << autoPath << ": dynamic file system information (generated from NetFS setup).\n" << "#\n" << "# Every single mount point below will be available in /mnt/autofs during start\n" << "# or possibly even later if you request it.\n" diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index 12582b865..14a8c433d 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -679,6 +679,7 @@ string COPKGManager::getPkgDescription(std::string pkgName, std::string pkgDesc) return pkgDesc; fpos_t fz; + fz.__pos = 0; fseek(fd, 0, SEEK_END); fgetpos(fd, &fz); fseek(fd, 0, SEEK_SET); diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index f8a343274..179fb36f3 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -678,7 +678,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) snprintf(buf, sizeof(buf), "%s:", g_Locale->getText (LOCALE_STREAMINFO_AUDIOTYPE)); g_Font[font_info]->RenderString (xpos, ypos, box_width, buf, COL_MENUCONTENT_TEXT); - int type, layer, freq, mode, lbitrate; + int type = 0, layer = 0, freq = 0, mode = 0, lbitrate = 0; /* audioDecoder->getAudioInfo() seems broken in libcoolstream2. ddmode is always 1 ("CH1/CH2"). diff --git a/src/gui/themes.cpp b/src/gui/themes.cpp index 8c93d3f65..58f8d2c7d 100644 --- a/src/gui/themes.cpp +++ b/src/gui/themes.cpp @@ -442,10 +442,10 @@ void CThemes::getTheme(CConfigFile &configfile) t.progressbar_timescale_yellow = configfile.getInt32("progressbar_timescale_yellow", 70); t.progressbar_timescale_invert = configfile.getInt32("progressbar_timescale_invert", 0); - t.shadow_alpha = configfile.getInt32( "shadow_alpha", 0 ); - t.shadow_red = configfile.getInt32( "shadow_red", 8 ); - t.shadow_green = configfile.getInt32( "shadow_green", 8); - t.shadow_blue = configfile.getInt32( "shadow_blue", 8 ); + t.shadow_alpha = configfile.getInt32( "shadow_alpha", 25 ); + t.shadow_red = configfile.getInt32( "shadow_red", 0 ); + t.shadow_green = configfile.getInt32( "shadow_green", 0 ); + t.shadow_blue = configfile.getInt32( "shadow_blue", 0 ); //NI t.progressbar_active_red = configfile.getInt32( "progressbar_active_red", 62 ); diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index 40866f171..1d207a401 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -1317,10 +1317,10 @@ void CUpnpBrowserGui::showPicture(std::string name) void CUpnpBrowserGui::playVideo(std::string name, std::string url) { - CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoMessages::mode_ts); - stopAudio(); + CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE, NeutrinoMessages::mode_ts); + m_frameBuffer->stopFrame(); CMoviePlayerGui::getInstance().SetFile(name, url); CMoviePlayerGui::getInstance().exec(NULL, "upnp"); diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index ae826b950..f32ad245d 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -194,7 +194,6 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) menu->addItem(GenericMenuSeparator); bool _mode_ts = CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_ts; - bool _mode_upnp = CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_upnp; bool _mode_webtv = (CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_webtv) && (!CZapit::getInstance()->GetCurrentChannel()->getScriptName().empty()); @@ -260,7 +259,7 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) case SNeutrinoSettings::ITEM_AUDIO_SELECT: { keyhelper.get(&key,&icon); - menu_item = new CMenuDForwarder(LOCALE_AUDIOSELECTMENUE_HEAD, !_mode_ts && !_mode_upnp, NULL, new CAudioSelectMenuHandler, "-1", key,icon); + menu_item = new CMenuDForwarder(LOCALE_AUDIOSELECTMENUE_HEAD, !_mode_ts, NULL, new CAudioSelectMenuHandler, "-1", key,icon); // FIXME menu_item->setHint("", NONEXISTANT_LOCALE); break; } @@ -296,7 +295,7 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) if (g_settings.recording_type == RECORDING_OFF) break; keyhelper.get(&key,&icon,CRCInput::RC_green); - menu_item = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, !_mode_ts && !_mode_upnp, NULL, neutrino, "tsmoviebrowser", key, icon); + menu_item = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, !_mode_ts, NULL, neutrino, "tsmoviebrowser", key, icon); menu_item->setHint(NEUTRINO_ICON_HINT_MB, LOCALE_MENU_HINT_MB); break; } @@ -442,14 +441,14 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) case SNeutrinoSettings::ITEM_YOUTUBE: { keyhelper.get(&key,&icon); - menu_item = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, !_mode_ts && !_mode_upnp, NULL, neutrino, "ytplayback", key, icon); + menu_item = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, !_mode_ts, NULL, neutrino, "ytplayback", key, icon); menu_item->setHint(NEUTRINO_ICON_HINT_YTPLAY, LOCALE_MENU_HINT_YTPLAY); break; } case SNeutrinoSettings::ITEM_FILEPLAY: { keyhelper.get(&key,&icon); - menu_item = new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK, !_mode_ts && !_mode_upnp, NULL, neutrino, "fileplayback", key, icon); + menu_item = new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK, !_mode_ts, NULL, neutrino, "fileplayback", key, icon); menu_item->setHint(NEUTRINO_ICON_HINT_FILEPLAY, LOCALE_MENU_HINT_FILEPLAY); break; } @@ -485,14 +484,14 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) case SNeutrinoSettings::ITEM_AUDIOPLAY: { keyhelper.get(&key,&icon); - menu_item = new CMenuForwarder(LOCALE_AUDIOPLAYER_NAME, !_mode_ts && !_mode_upnp, NULL, neutrino, "audioplayer", key, icon); + menu_item = new CMenuForwarder(LOCALE_AUDIOPLAYER_NAME, true, NULL, neutrino, "audioplayer", key, icon); menu_item->setHint(NEUTRINO_ICON_HINT_APLAY, LOCALE_MENU_HINT_APLAY); break; } case SNeutrinoSettings::ITEM_INETPLAY: { keyhelper.get(&key,&icon); - menu_item = new CMenuForwarder(LOCALE_INETRADIO_NAME, !_mode_ts && !_mode_upnp, NULL, neutrino, "inetplayer", key, icon); + menu_item = new CMenuForwarder(LOCALE_INETRADIO_NAME, true, NULL, neutrino, "inetplayer", key, icon); menu_item->setHint(NEUTRINO_ICON_HINT_INET_RADIO, LOCALE_MENU_HINT_INET_RADIO); break; } diff --git a/src/gui/widget/buttons.cpp b/src/gui/widget/buttons.cpp index 18ad88a75..f9f4680cb 100644 --- a/src/gui/widget/buttons.cpp +++ b/src/gui/widget/buttons.cpp @@ -205,7 +205,7 @@ int paintButtons( const button_label_ext * const content, fprintf(stderr, "PB: sp %d mw %d w_t %d w_i %d w_s %d c_i %d\n", spacing, maxwidth, w_text, w_icons, w_space, count_items); #endif - if (fwidth[cnt - 1] == 0) /* divisor needs to be labels+1 unless rightmost icon has a label */ + if (cnt > 0 && fwidth[cnt - 1] == 0) /* divisor needs to be labels+1 unless rightmost icon has a label */ count_labels++; /* side effect: we don't try to divide by 0 :-) */ if (maximize) { diff --git a/src/gui/widget/helpbox.cpp b/src/gui/widget/helpbox.cpp index a2be659f5..693a02e49 100644 --- a/src/gui/widget/helpbox.cpp +++ b/src/gui/widget/helpbox.cpp @@ -99,16 +99,18 @@ void Helpbox::addLine(const std::string& icon, const std::string& text, const in if (!text.empty()){ int x_text = w_picon + (picon ? OFFSET_INNER_MID : 0); CComponentsText * txt = new CComponentsText(x_text, 0, line->getWidth()-x_text, 0, text, text_mode, font); - txt->doPaintBg(false); - txt->forceTextPaint(); + if(txt){ + txt->doPaintBg(false); + txt->forceTextPaint(); #if 0 //"contrast agent", if you want to see where the text items are drawn. txt->setColorBody(COL_RED); #endif - int lines = txt->getCTextBoxObject()->getLines(); - txt_height = std::max(lines*font->getHeight(), h_line); - txt->setHeight(txt_height); + int lines = txt->getCTextBoxObject()->getLines(); + txt_height = std::max(lines*font->getHeight(), h_line); + txt->setHeight(txt_height); - line->addCCItem(txt); + line->addCCItem(txt); + } } if (txt_height > line->getHeight()) diff --git a/src/gui/widget/listframe.cpp b/src/gui/widget/listframe.cpp index d90631588..974bb18a0 100644 --- a/src/gui/widget/listframe.cpp +++ b/src/gui/widget/listframe.cpp @@ -58,10 +58,10 @@ #include #include -#define MAX_WINDOW_WIDTH (frameBuffer->getScreenWidth() - 40) -#define MAX_WINDOW_HEIGHT (frameBuffer->getScreenHeight() - 40) +#define MAX_WINDOW_WIDTH (frameBuffer ? frameBuffer->getScreenWidth() - 40:0) +#define MAX_WINDOW_HEIGHT (frameBuffer ? frameBuffer->getScreenHeight() - 40:0) -#define MIN_WINDOW_WIDTH (frameBuffer->getScreenWidth() >> 1) +#define MIN_WINDOW_WIDTH (frameBuffer ? frameBuffer->getScreenWidth() >> 1:0) #define MIN_WINDOW_HEIGHT 40 #define TITLE_BACKGROUND_COLOR COL_MENUHEAD_PLUS_0 @@ -206,7 +206,7 @@ void CListFrame::reSizeMainFrameWidth(int textWidth) int iNewWindowWidth = textWidth + m_cFrameScrollRel.iWidth + 2*OFFSET_INNER_MID; - if( iNewWindowWidth > m_nMaxWidth) iNewWindowWidth = m_nMaxWidth; + if(iNewWindowWidth > m_nMaxWidth) iNewWindowWidth = m_nMaxWidth; if((unsigned int) iNewWindowWidth < MIN_WINDOW_WIDTH) iNewWindowWidth = MIN_WINDOW_WIDTH; m_cFrame.iWidth = iNewWindowWidth; diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 7d5751dd2..be26a18f4 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -137,13 +137,7 @@ bool CMenuItem::initModeCondition(const int& stb_mode) void CMenuItem::disableByCondition(const menu_item_disable_cond_t& condition) { int stb_mode = CNeutrinoApp::getInstance()->getMode(); -#if ENABLE_UPNP - if (condition & DCOND_MODE_UPNP){ - if (stb_mode == CNeutrinoApp::mode_upnp) - if (initModeCondition(stb_mode)) - return; - } -#endif + if (condition & DCOND_MODE_TS){ if (stb_mode == CNeutrinoApp::mode_ts) if (initModeCondition(stb_mode)) diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index 3f1d4d6fe..6c89f878e 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -78,9 +78,6 @@ enum DCOND_MODE_TV = 2, DCOND_MODE_RADIO = 4, DCOND_MODE_TS = 8 -#if ENABLE_UPNP - ,DCOND_MODE_UPNP = 16 -#endif }/*menu_item_disable_cond_t*/; class CChangeObserver diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index 1a9bdadca..4c913fa96 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -278,12 +278,17 @@ void CStringInput::keyDownPressed() { int npos = 0; std::string tmp_value = *valueString; - for(int count=0;count<(int)strlen(validchars);count++) + const int validchar_len = (int)strlen(validchars); + for(int count=0;countat(selected)==validchars[count]) npos = count; npos--; - if(npos<0) - npos = strlen(validchars)-1; + if(npos<0){ + if(validchar_len > 0) + npos = validchar_len-1; + else + npos = 0; + } valueString->at(selected)=validchars[npos]; int current_value = atoi(*valueString); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 28e7ed0ef..7e36d7c06 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -529,23 +529,15 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.hdd_wakeup_msg = configfile.getInt32( "hdd_wakeup_msg", 1); //NI g_settings.hdd_allow_set_recdir = configfile.getInt32( "hdd_allow_set_recdir", 1); //NI - /* - hw_caps needs CFEManager and CFEManager needs g_settings. - So loadSetup() cannot use hw_caps to init g_settings. - - For this reason we need this workaround. - */ - bool can_shutdown = (cs_get_revision() > 7); - g_settings.shutdown_real = false; - if (can_shutdown) //(g_info.hw_caps->can_shutdown) + if (g_info.hw_caps->can_shutdown) g_settings.shutdown_real = configfile.getBool("shutdown_real" , false ); g_settings.shutdown_real_rcdelay = configfile.getBool("shutdown_real_rcdelay", false ); g_settings.shutdown_count = configfile.getInt32("shutdown_count", 0); g_settings.shutdown_min = 0; - if (g_info.hw_caps->can_shutdown || cs_get_revision() == 1) - g_settings.shutdown_min = configfile.getInt32("shutdown_min", 000); + if (g_info.hw_caps->can_shutdown) + g_settings.shutdown_min = configfile.getInt32("shutdown_min", 000); //NI g_settings.sleeptimer_min = configfile.getInt32("sleeptimer_min", 0); g_settings.timer_remotebox_ip.clear(); @@ -691,6 +683,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.network_nfs[i].mac = configfile.getString("network_nfs_mac_" + i_str, "11:22:33:44:55:66"); } g_settings.network_nfs_audioplayerdir = configfile.getString( "network_nfs_audioplayerdir", "/media/sda1/music" ); + g_settings.network_nfs_streamripperdir = configfile.getString( "network_nfs_streamripperdir", "/media/sda1/music/streamripper" ); g_settings.network_nfs_picturedir = configfile.getString( "network_nfs_picturedir", "/media/sda1/pictures" ); g_settings.network_nfs_moviedir = configfile.getString( "network_nfs_moviedir", "/media/sda1/movies" ); g_settings.network_nfs_recordingdir = configfile.getString( "network_nfs_recordingdir", "/media/sda1/movies" ); @@ -1458,6 +1451,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setString(cfg_key, g_settings.network_nfs[i].mac); } configfile.setString( "network_nfs_audioplayerdir", g_settings.network_nfs_audioplayerdir); + configfile.setString( "network_nfs_streamripperdir", g_settings.network_nfs_streamripperdir); configfile.setString( "network_nfs_picturedir", g_settings.network_nfs_picturedir); configfile.setString( "network_nfs_moviedir", g_settings.network_nfs_moviedir); configfile.setString( "network_nfs_recordingdir", g_settings.network_nfs_recordingdir); @@ -2343,9 +2337,8 @@ TIMER_START(); cs_new_auto_videosystem(); #endif -#if !HAVE_COOL_HARDWARE g_info.hw_caps = get_hwcaps(); -#endif + g_Locale = new CLocaleManager; int loadSettingsErg = loadSetup(NEUTRINO_SETTINGS_FILE); @@ -2446,10 +2439,19 @@ TIMER_START(); CheckFastScan(); -#if HAVE_COOL_HARDWARE - // init hw_caps *after* zapit start! - g_info.hw_caps = get_hwcaps(); -#endif + // dirty part of hw_caps - specify some details after zapit start + if (strcmp(g_info.hw_caps->boxname, "HD1") == 0) + { + // only SAT-HD1 has fan + if (!CFEManager::getInstance()->getFE(0)->hasSat()) + g_info.hw_caps->has_fan = 0; + } + if (strcmp(g_info.hw_caps->boxname, "Neo") == 0) + { + // detecting Neo Twin by counting frontends + if (CFEManager::getInstance()->getFrontendCount() > 1) + strcpy(g_info.hw_caps->boxname, "Neo Twin"); + } //timer start long timerd_signal = 0; diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index 822139701..7dd9d0c81 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -160,29 +160,17 @@ void CNeutrinoApp::InitMenuMain() //tv <-> radio toggle CMenuForwarder *tvradio_switch = new CMenuForwarder(LOCALE_MAINMENU_TVRADIO_SWITCH, true, NULL, this, "tv_radio_switch", CRCInput::RC_red); tvradio_switch->setHint(NEUTRINO_ICON_HINT_TVRADIO_SWITCH, LOCALE_MENU_HINT_TVRADIO_SWITCH); - personalize.addItem(MENU_MAIN, tvradio_switch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_RADIO_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, NULL, DCOND_MODE_TS -#if ENABLE_UPNP - | DCOND_MODE_UPNP -#endif - ); + personalize.addItem(MENU_MAIN, tvradio_switch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_RADIO_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, NULL, DCOND_MODE_TS); //tv-mode CMenuForwarder *tvswitch = new CMenuForwarder(LOCALE_MAINMENU_TVMODE, true, NULL, this, "tv", CRCInput::RC_red); tvswitch->setHint(NEUTRINO_ICON_HINT_TVMODE, LOCALE_MENU_HINT_TVMODE); - personalize.addItem(MENU_MAIN, tvswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch, DCOND_MODE_TV | DCOND_MODE_TS //observed -#if ENABLE_UPNP - | DCOND_MODE_UPNP -#endif - ); + personalize.addItem(MENU_MAIN, tvswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch, DCOND_MODE_TV | DCOND_MODE_TS); //observed //radio-mode CMenuForwarder *radioswitch = new CMenuForwarder(LOCALE_MAINMENU_RADIOMODE, true, NULL, this, "radio", CRCInput::RC_green); radioswitch->setHint(NEUTRINO_ICON_HINT_RADIOMODE, LOCALE_MENU_HINT_RADIOMODE); - personalize.addItem(MENU_MAIN, radioswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_RADIO_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch, DCOND_MODE_RADIO | DCOND_MODE_TS //observed -#if ENABLE_UPNP - | DCOND_MODE_UPNP -#endif - ); + personalize.addItem(MENU_MAIN, radioswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_RADIO_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch, DCOND_MODE_RADIO | DCOND_MODE_TS); //observed } //timer diff --git a/src/nhttpd/tuxboxapi/neutrinoapi.cpp b/src/nhttpd/tuxboxapi/neutrinoapi.cpp index 77bb1b8cd..3d9fe8959 100644 --- a/src/nhttpd/tuxboxapi/neutrinoapi.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoapi.cpp @@ -467,7 +467,7 @@ int CNeutrinoAPI::setVideoAspectRatioAsString(std::string newRatioString) //------------------------------------------------------------------------- std::string CNeutrinoAPI::getVideoResolutionAsString(void) { - int xres, yres, framerate; + int xres = 0, yres = 0, framerate = 0; videoDecoder->getPictureInfo(xres, yres, framerate); std::stringstream out; out << xres << "x" << yres; @@ -477,7 +477,7 @@ std::string CNeutrinoAPI::getVideoResolutionAsString(void) //------------------------------------------------------------------------- std::string CNeutrinoAPI::getVideoFramerateAsString(void) { - int xres, yres, framerate; + int xres = 0, yres = 0, framerate = 0; std::string sframerate = "{=L:unknown=}"; videoDecoder->getPictureInfo(xres, yres, framerate); switch(framerate){ @@ -492,7 +492,7 @@ std::string CNeutrinoAPI::getVideoFramerateAsString(void) //------------------------------------------------------------------------- std::string CNeutrinoAPI::getAudioInfoAsString(void) { - int type, layer, freq, mode, lbitrate; + int type = 0, layer = 0, freq = 0, mode = 0, lbitrate = 0; audioDecoder->getAudioInfo(type, layer, freq, lbitrate, mode); std::stringstream out; if(type == 0) @@ -558,7 +558,7 @@ void CNeutrinoAPI::SendAllTimers(std::string url, bool force) Timerd->getTimerList(timerlist); sort(timerlist.begin(), timerlist.end()); - int pre,post; + int pre = 0,post = 0; Timerd->getRecordingSafety(pre,post); CHTTPTool httpTool; std::string r_url; diff --git a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp index 729c31280..a8e2503a9 100644 --- a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp @@ -1035,6 +1035,10 @@ std::string CNeutrinoYParser::func_set_timer_form(CyhookHandler *hh, std::strin unsigned timerId=0; std::string cmd, stimerid; CTimerd::responseGetTimer timer; // Timer + timer.alarmTime = 0; + timer.stopTime = 0; + timer.apids = 0; + timer.eventType = CTimerd::__TIMER_NEXTPROGRAM;//nothing time_t now_t = time(NULL); ySplitString(para, " ", cmd, stimerid); if(cmd != "new") diff --git a/src/system/locals.h b/src/system/locals.h index 83a40bd06..596726afe 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -226,7 +226,11 @@ typedef enum LOCALE_AUDIOPLAYER_SHUFFLE, LOCALE_AUDIOPLAYER_SPECTRUM, LOCALE_AUDIOPLAYER_STOP, + LOCALE_AUDIOPLAYER_STREAMRIPPER_DIR, + LOCALE_AUDIOPLAYER_STREAMRIPPER_START, + LOCALE_AUDIOPLAYER_STREAMRIPPER_STOP, LOCALE_AUDIOPLAYER_TITLE_ARTIST, + LOCALE_AUDIOPLAYER_INTERNETRADIO_NAME, LOCALE_BLANK_SCREEN, LOCALE_BOOKMARKMANAGER_DELETE, LOCALE_BOOKMARKMANAGER_NAME, @@ -1150,6 +1154,7 @@ typedef enum LOCALE_MENU_HINT_AUDIOPLAYER_PLAYLIST, LOCALE_MENU_HINT_AUDIOPLAYER_REPEAT, LOCALE_MENU_HINT_AUDIOPLAYER_SC_METADATA, + LOCALE_MENU_HINT_AUDIOPLAYER_STREAMRIPPER_DIR, LOCALE_MENU_HINT_AUDIOPLAYER_TITLE, LOCALE_MENU_HINT_AUTO_LANG, LOCALE_MENU_HINT_AUTO_SUBS, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index ae019c62e..74bd00449 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -226,7 +226,11 @@ const char * locale_real_names[] = "audioplayer.shuffle", "audioplayer.spectrum", "audioplayer.stop", + "audioplayer.streamripper_dir", + "audioplayer.streamripper_start", + "audioplayer.streamripper_stop", "audioplayer.title_artist", + "audioplayer_internetradio.name", "blank_screen", "bookmarkmanager.delete", "bookmarkmanager.name", @@ -1150,6 +1154,7 @@ const char * locale_real_names[] = "menu.hint_audioplayer_playlist", "menu.hint_audioplayer_repeat", "menu.hint_audioplayer_sc_metadata", + "menu.hint_audioplayer_streamripper_dir", "menu.hint_audioplayer_title", "menu.hint_auto_lang", "menu.hint_auto_subs", diff --git a/src/system/settings.h b/src/system/settings.h index 643bf0b76..1c56e3169 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -464,6 +464,7 @@ struct SNeutrinoSettings std::string password; } network_nfs[NETWORK_NFS_NR_OF_ENTRIES]; std::string network_nfs_audioplayerdir; + std::string network_nfs_streamripperdir; std::string network_nfs_picturedir; std::string network_nfs_moviedir; std::string network_nfs_recordingdir; diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index eb4875aad..0cdd92c58 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -626,6 +626,7 @@ uint32_t CFrontend::getRate() const fe_status_t CFrontend::getStatus(void) const { struct dvb_frontend_event event; + event.status = FE_REINIT; fop(ioctl, FE_READ_STATUS, &event.status); return (fe_status_t) (event.status & FE_HAS_LOCK); }