diff options
| -rw-r--r-- | configure.ac | 4 | ||||
| -rwxr-xr-x | data/setup.xml | 25 | ||||
| -rw-r--r-- | lib/dvb/pmt.cpp | 41 | ||||
| -rw-r--r-- | lib/dvb/pmt.h | 12 | ||||
| -rw-r--r-- | lib/dvb/pvrparse.cpp | 2 | ||||
| -rw-r--r-- | lib/dvb/tstools.cpp | 20 | ||||
| -rw-r--r-- | lib/dvb_ci/dvbci.cpp | 4 | ||||
| -rw-r--r-- | lib/gui/epositiongauge.cpp | 22 | ||||
| -rw-r--r-- | lib/python/Components/UsageConfig.py | 4 | ||||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/DVDProject.py | 9 | ||||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml | 6 | ||||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml | 10 | ||||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml | 10 | ||||
| -rwxr-xr-x | lib/python/Plugins/Extensions/DVDPlayer/plugin.py | 8 | ||||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDPlayer/src/Makefile.am | 3 | ||||
| -rw-r--r-- | lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py | 15 | ||||
| -rwxr-xr-x | lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py | 30 | ||||
| -rw-r--r-- | lib/python/Screens/InfoBarGenerics.py | 36 | ||||
| -rw-r--r-- | lib/service/iservice.h | 1 | ||||
| -rw-r--r-- | lib/service/servicedvb.cpp | 4 | ||||
| -rw-r--r-- | main/bsod.cpp | 1 |
21 files changed, 161 insertions, 106 deletions
diff --git a/configure.ac b/configure.ac index 48fea647..605431b9 100644 --- a/configure.ac +++ b/configure.ac @@ -86,8 +86,8 @@ if test "$with_memcheck" = "yes"; then fi AC_ARG_WITH(po, - AS_HELP_STRING([--without-po],[disable updating of po files]), - [with_po="$withval"],[with_po="yes"]) + AS_HELP_STRING([--with-po],[enable updating of po files]), + [with_po="$withval"],[with_po="no"]) AM_CONDITIONAL(UPDATE_PO, test "$with_po" = "yes") CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" diff --git a/data/setup.xml b/data/setup.xml index f5dea734..c5eb07f5 100755 --- a/data/setup.xml +++ b/data/setup.xml @@ -47,27 +47,10 @@ <item level="2" text="Fast Forward speeds">config.seek.speeds_forward</item> <item level="2" text="Rewind speeds">config.seek.speeds_backward</item> <item level="2" text="Slow Motion speeds">config.seek.speeds_slowmotion</item> -<!-- TRANSLATORS: Note that "Enter" in the two strings below should *not* - be interpreted as "Give speed as input". The intended meaning is - instead "Initial speed when starting winding", i.e. the speed at - which "winding mode" is entered when first pressing "rewind" or - "fast forward". --> - <item level="2" text="Enter Fast Forward at speed">config.seek.enter_forward</item> - <item level="2" text="Enter Rewind at speed">config.seek.enter_backward</item> -<!-- TRANSLATORS: The effect of "Non-smooth winding" is that rather - than using ordinary "continuous" or "smooth" winding, a fast - sequence of stills is shown when winding at high speeds. This - makes it much easier too follow when almost each frame comes from - a new scene. The effect is achieved by repeating each shown frame - a couple of times. The settings control both at which speed this - winding mode sets in, and how many times each frame should be - repeated. This was previously called "Discontinuous playback" - which was incomprehensible. "Non-smooth winding" may be a better - term, but note that there is nothing irregular about it. Synonyms - better suited for translation to other languages may be "stepwise - winding/playback", or "winding/playback using stills". --> - <item level="2" text="Use non-smooth winding at speeds above">config.seek.stepwise_minspeed</item> - <item level="2" text="Frame repeat count during non-smooth winding">config.seek.stepwise_repeat</item> +<!-- TRANSLATORS: The following is the speed you get on the first press on fast-forward. + It was previously called "enter fast forward at speed" which was easily misunderstood. --> + <item level="2" text="Initial Fast Forward speed">config.seek.enter_forward</item> + <item level="2" text="Initial Rewind speed">config.seek.enter_backward</item> <item level="2" text="Behavior of 'pause' when paused">config.seek.on_pause</item> <item level="2" text="Behavior of 0 key in PiP-mode">config.usage.pip_zero_button</item> <item level="2" text="Alternative services tuner priority">config.usage.alternatives_priority</item> diff --git a/lib/dvb/pmt.cpp b/lib/dvb/pmt.cpp index 46fa12ed..0de78b49 100644 --- a/lib/dvb/pmt.cpp +++ b/lib/dvb/pmt.cpp @@ -149,7 +149,7 @@ void eDVBServicePMTHandler::PATready(int) serviceEvent(eventNoPAT); } -PyObject *eDVBServicePMTHandler::getCaIds() +PyObject *eDVBServicePMTHandler::getCaIds(bool pair) { ePyObject ret; @@ -161,16 +161,29 @@ PyObject *eDVBServicePMTHandler::getCaIds() if (cnt) { ret=PyList_New(cnt); - std::set<uint16_t>::iterator it(prog.caids.begin()); - while(cnt--) - PyList_SET_ITEM(ret, cnt, PyInt_FromLong(*it++)); + std::set<program::capid_pair>::iterator it(prog.caids.begin()); + if (pair) + { + while(cnt--) + { + ePyObject tuple = PyTuple_New(2); + PyTuple_SET_ITEM(tuple, 0, PyInt_FromLong(it->caid)); + PyTuple_SET_ITEM(tuple, 1, PyInt_FromLong((it++)->capid)); + PyList_SET_ITEM(ret, cnt, tuple); + } + } + else + { + while(cnt--) + PyList_SET_ITEM(ret, cnt, PyInt_FromLong((it++)->caid)); + } } } return ret ? (PyObject*)ret : (PyObject*)PyList_New(0); } -int eDVBServicePMTHandler::getProgramInfo(struct program &program) +int eDVBServicePMTHandler::getProgramInfo(program &program) { ePtr<eTable<ProgramMapSection> > ptr; int cached_apid_ac3 = -1; @@ -460,7 +473,10 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program) case CA_DESCRIPTOR: { CaDescriptor *descr = (CaDescriptor*)(*desc); - program.caids.insert(descr->getCaSystemId()); + program::capid_pair pair; + pair.caid = descr->getCaSystemId(); + pair.capid = descr->getCaPid(); + program.caids.insert(pair); break; } default: @@ -523,7 +539,10 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program) if ((*desc)->getTag() == CA_DESCRIPTOR) { CaDescriptor *descr = (CaDescriptor*)(*desc); - program.caids.insert(descr->getCaSystemId()); + program::capid_pair pair; + pair.caid = descr->getCaSystemId(); + pair.capid = descr->getCaPid(); + program.caids.insert(pair); } } } @@ -589,8 +608,12 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program) program.textPid = cached_tpid; } CAID_LIST &caids = m_service->m_ca; - for (CAID_LIST::iterator it(caids.begin()); it != caids.end(); ++it) - program.caids.insert(*it); + for (CAID_LIST::iterator it(caids.begin()); it != caids.end(); ++it) { + program::capid_pair pair; + pair.caid = *it; + pair.capid = -1; // not known yet + program.caids.insert(pair); + } if ( cnt ) ret = 0; } diff --git a/lib/dvb/pmt.h b/lib/dvb/pmt.h index de0de052..d03267bd 100644 --- a/lib/dvb/pmt.h +++ b/lib/dvb/pmt.h @@ -181,11 +181,17 @@ public: struct program { + struct capid_pair + { + uint16_t caid; + int capid; + bool operator< (const struct capid_pair &t) { return t.caid < caid; } + }; std::vector<videoStream> videoStreams; std::vector<audioStream> audioStreams; int defaultAudioStream; std::vector<subtitleStream> subtitleStreams; - std::set<uint16_t> caids; + std::set<capid_pair> caids; int pcrPid; int pmtPid; int textPid; @@ -193,10 +199,10 @@ public: PyObject *createPythonObject(); }; - int getProgramInfo(struct program &program); + int getProgramInfo(program &program); int getDataDemux(ePtr<iDVBDemux> &demux); int getDecodeDemux(ePtr<iDVBDemux> &demux); - PyObject *getCaIds(); + PyObject *getCaIds(bool pair=false); // caid / ecmpid pair int getPVRChannel(ePtr<iDVBPVRChannel> &pvr_channel); int getServiceReference(eServiceReferenceDVB &service) { service = m_reference; return 0; } diff --git a/lib/dvb/pvrparse.cpp b/lib/dvb/pvrparse.cpp index 5cdecbd6..e19dd1e4 100644 --- a/lib/dvb/pvrparse.cpp +++ b/lib/dvb/pvrparse.cpp @@ -123,7 +123,7 @@ void eMPEGStreamInformation::fixupDiscontinuties() pts_t current = i->second - currentDelta; pts_t diff = current - lastpts_t; - if (llabs(diff) > (90000*5)) // 5sec diff + if (llabs(diff) > (90000*10)) // 10sec diff { // eDebug("%llx < %llx, have discont. new timestamp is %llx (diff is %llx)!", current, lastpts_t, i->second, diff); currentDelta = i->second - lastpts_t; /* FIXME: should be the extrapolated new timestamp, based on the current rate */ diff --git a/lib/dvb/tstools.cpp b/lib/dvb/tstools.cpp index cfea3fdd..ad55509f 100644 --- a/lib/dvb/tstools.cpp +++ b/lib/dvb/tstools.cpp @@ -700,9 +700,23 @@ int eDVBTSTools::findFrame(off_t &_offset, size_t &len, int &direction, int fram else if (direction == +1) direction = 0; } - /* let's find the next frame after the given offset */ off_t start = offset; + /* backtrack to find the previous sequence start, in case of MPEG2 */ + if ((data & 0xFF) == 0x00) { + do { + --start; + if (m_streaminfo.getStructureEntry(start, data, 0)) + { + eDebug("get previous failed"); + return -1; + } + } while (((data & 0xFF) != 9) && ((data & 0xFF) != 0x00) && ((data & 0xFF) != 0xB3)); /* sequence start or previous frame */ + if ((data & 0xFF) != 0xB3) + start = offset; /* Failed to find corresponding sequence start, so never mind */ + } + + /* let's find the next frame after the given offset */ do { if (m_streaminfo.getStructureEntry(offset, data, 1)) { @@ -718,8 +732,8 @@ int eDVBTSTools::findFrame(off_t &_offset, size_t &len, int &direction, int fram } while (((data & 0xFF) != 9) && ((data & 0xFF) != 0x00)); /* next frame */ /* align to TS pkt start */ -// start = start - (start % 188); -// offset = offset - (offset % 188); + start = start - (start % 188); + offset = offset - (offset % 188); len = offset - start; _offset = start; diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index 883fb5a4..342f06a6 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -297,8 +297,8 @@ void eDVBCIInterfaces::recheckPMTHandlers() if (!pmthandler->getProgramInfo(p)) { int cnt=0; - for (caidSet::reverse_iterator x(p.caids.rbegin()); x != p.caids.rend(); ++x, ++cnt) - caids.push_front(*x); + for (std::set<eDVBServicePMTHandler::program::capid_pair>::reverse_iterator x(p.caids.rbegin()); x != p.caids.rend(); ++x, ++cnt) + caids.push_front(x->caid); if (service && cnt) service->m_ca = caids; } diff --git a/lib/gui/epositiongauge.cpp b/lib/gui/epositiongauge.cpp index ff98c080..e45d4a6c 100644 --- a/lib/gui/epositiongauge.cpp +++ b/lib/gui/epositiongauge.cpp @@ -112,6 +112,7 @@ int ePositionGauge::event(int event, void *data, void *data2) // painter.fill(eRect(0, 10, s.width(), s.height()-20)); pts_t in = 0, out = 0; + int xm, xm_last = -1; std::multiset<cueEntry>::iterator i(m_cue_entries.begin()); @@ -126,17 +127,22 @@ int ePositionGauge::event(int event, void *data, void *data2) continue; } else if (i->what == 1) /* out */ out = i++->where; - else if (i->what == 2) /* mark */ + else /* mark or last */ { - int xm = scale(i->where); - painter.setForegroundColor(gRGB(0xFF8080)); - painter.fill(eRect(xm - 2, 0, 4, s.height())); + xm = scale(i->where); + if (i->what == 2) { + painter.setForegroundColor(gRGB(0xFF8080)); + if (xm - 2 < xm_last) /* Make sure last is not overdrawn */ + painter.fill(eRect(xm_last, 0, 2 + xm - xm_last, s.height())); + else + painter.fill(eRect(xm - 2, 0, 4, s.height())); + } else if (i->what == 3) { + painter.setForegroundColor(gRGB(0x80FF80)); + painter.fill(eRect(xm - 1, 0, 3, s.height())); + xm_last = xm + 2; + } i++; continue; - } else /* other marker, like last position */ - { - ++i; - continue; } } diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py index 8ea9aa6a..a265a169 100644 --- a/lib/python/Components/UsageConfig.py +++ b/lib/python/Components/UsageConfig.py @@ -102,13 +102,11 @@ def InitUsageConfig(): config.seek.selfdefined_79 = ConfigNumber(default=300) config.seek.speeds_forward = ConfigSet(default=[2, 4, 8, 16, 32, 64, 128], choices=[2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128]) - config.seek.speeds_backward = ConfigSet(default=[8, 16, 32, 64, 128], choices=[1, 2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128]) + config.seek.speeds_backward = ConfigSet(default=[2, 4, 8, 16, 32, 64, 128], choices=[1, 2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128]) config.seek.speeds_slowmotion = ConfigSet(default=[2, 4, 8], choices=[2, 4, 6, 8, 12, 16, 25]) config.seek.enter_forward = ConfigSelection(default = "2", choices = ["2", "4", "6", "8", "12", "16", "24", "32", "48", "64", "96", "128"]) config.seek.enter_backward = ConfigSelection(default = "1", choices = ["1", "2", "4", "6", "8", "12", "16", "24", "32", "48", "64", "96", "128"]) - config.seek.stepwise_minspeed = ConfigSelection(default = "16", choices = ["Never", "2", "4", "6", "8", "12", "16", "24", "32", "48", "64", "96", "128"]) - config.seek.stepwise_repeat = ConfigSelection(default = "3", choices = ["2", "3", "4", "5", "6"]) config.seek.on_pause = ConfigSelection(default = "play", choices = [ ("play", _("Play")), diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py index 7f755db4..6dbcd499 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py +++ b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py @@ -2,6 +2,7 @@ from Tools.Directories import fileExists from Components.config import config, ConfigSubsection, ConfigInteger, ConfigText, ConfigSelection, getConfigListEntry, ConfigSequence, ConfigSubList import DVDTitle import xml.dom.minidom +from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_FONTS class ConfigColor(ConfigSequence): def __init__(self, default = [128,128,128]): @@ -125,6 +126,14 @@ class DVDProject: for key in self.filekeys: val = self.settings.dict()[key].getValue() if not fileExists(val): + if val[0] != "/": + if key.find("font") == 0: + val = resolveFilename(SCOPE_FONTS)+val + else: + val = resolveFilename(SCOPE_PLUGINS)+"Extensions/DVDBurn/"+val + if fileExists(val): + self.settings.dict()[key].setValue(val) + continue self.error += "\n%s '%s' not found" % (key, val) #except AttributeError: #print "loadProject AttributeError", self.error diff --git a/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml b/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml index 451e8a8b..4645260d 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml +++ b/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml @@ -3,11 +3,11 @@ <settings name="Dreambox DVD record" authormode="menu_linked" - menutemplate="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml" + menutemplate="Thumbs_menu_clouds.ddvdm.xml" titlesetmode="multi" - vmgm="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/vmgmdream.mpg" + vmgm="vmgmdream.mpg" output="dvd" - isopath="/media/hdd/movie/" + isopath="/hdd/movie/" dataformat="iso9660_4" /> <titles> </titles> diff --git a/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml b/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml index 0de7f4b6..bf6356a9 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml +++ b/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml @@ -3,17 +3,17 @@ <settings titleformat="$i. $t" subtitleformat="$D.$M.$Y, $T $C, $d" - menubg="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/dreamdvd_boat.jpg" - menuaudio="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/silence.mp2" + menubg="dreamdvd_boat.jpg" + menuaudio="silence.mp2" dimensions="(720, 576)" rows="5" cols="1" color_button="[8, 0, 0]" color_highlight="[0, 192, 192]" color_headline="[0, 0, 128]" - fontface_headline="/usr/share/fonts/nmsbd.ttf" - fontface_title="/usr/share/fonts/nmsbd.ttf" - fontface_subtitle="/usr/share/fonts/nmsbd.ttf" + fontface_headline="nmsbd.ttf" + fontface_title="nmsbd.ttf" + fontface_subtitle="nmsbd.ttf" fontsize_headline="46" fontsize_title="24" fontsize_subtitle="14" diff --git a/lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml b/lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml index c00c3fee..074f2037 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml +++ b/lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml @@ -3,17 +3,17 @@ <settings titleformat="$t" subtitleformat="$d" - menubg="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/dreamdvd_clouds.jpg" - menuaudio="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/silence.mp2" + menubg="dreamdvd_clouds.jpg" + menuaudio="silence.mp2" dimensions="(720, 576)" rows="2" cols="2" color_button="[8, 0, 0]" color_highlight="[128, 0, 0]" color_headline="[128, 0, 0]" - fontface_headline="/usr/share/fonts/nmsbd.ttf" - fontface_title="/usr/share/fonts/nmsbd.ttf" - fontface_subtitle="/usr/share/fonts/nmsbd.ttf" + fontface_headline="nmsbd.ttf" + fontface_title="nmsbd.ttf" + fontface_subtitle="nmsbd.ttf" fontsize_headline="46" fontsize_title="18" fontsize_subtitle="12" diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index 64b4ae50..67b8352b 100755 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -235,8 +235,6 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP self.saved_config_speeds_backward = config.seek.speeds_backward.value self.saved_config_enter_forward = config.seek.enter_forward.value self.saved_config_enter_backward = config.seek.enter_backward.value - self.saved_config_seek_stepwise_minspeed = config.seek.stepwise_minspeed.value - self.saved_config_seek_stepwise_repeat = config.seek.stepwise_repeat.value self.saved_config_seek_on_pause = config.seek.on_pause.value self.saved_config_seek_speeds_slowmotion = config.seek.speeds_slowmotion.value @@ -246,8 +244,6 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP config.seek.speeds_slowmotion.value = [ ] config.seek.enter_forward.value = "2" config.seek.enter_backward.value = "2" - config.seek.stepwise_minspeed.value = "Never" - config.seek.stepwise_repeat.value = "3" config.seek.on_pause.value = "play" def restore_infobar_seek_config(self): @@ -256,8 +252,6 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP config.seek.speeds_slowmotion.value = self.saved_config_seek_speeds_slowmotion config.seek.enter_forward.value = self.saved_config_enter_forward config.seek.enter_backward.value = self.saved_config_enter_backward - config.seek.stepwise_minspeed.value = self.saved_config_seek_stepwise_minspeed - config.seek.stepwise_repeat.value = self.saved_config_seek_stepwise_repeat config.seek.on_pause.value = self.saved_config_seek_on_pause def __init__(self, session, dvd_device = None, dvd_filelist = [ ], args = None): @@ -269,7 +263,7 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP HelpableScreen.__init__(self) self.save_infobar_seek_config() self.change_infobar_seek_config() - InfoBarSeek.__init__(self, useSeekBackHack=False) + InfoBarSeek.__init__(self) InfoBarPVRState.__init__(self) self.dvdScreen = self.session.instantiateDialog(DVDOverlay) diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/Makefile.am b/lib/python/Plugins/Extensions/DVDPlayer/src/Makefile.am index 7aaec9bb..3e2ee67c 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/src/Makefile.am +++ b/lib/python/Plugins/Extensions/DVDPlayer/src/Makefile.am @@ -4,6 +4,8 @@ AM_CPPFLAGS = \ -include Python.h \ -include $(top_builddir)/enigma2_config.h +AM_CXXFLAGS = @LIBDDVD_CFLAGS@ + plugindir = $(pkglibdir)/python/Plugins/Extensions/DVDPlayer plugin_LTLIBRARIES = servicedvd.la @@ -13,3 +15,4 @@ servicedvd_la_SOURCES = \ servicedvd.h servicedvd_la_LDFLAGS = -avoid-version -module +servicedvd_la_LIBADD = @LIBDDVD_LIBS@ diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py b/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py index 296d3bca..85ecc92d 100644 --- a/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py +++ b/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py @@ -16,7 +16,7 @@ from Components.MultiContent import MultiContentEntryText from Components.ScrollLabel import ScrollLabel from Components.Harddisk import harddiskmanager from Components.Task import Task, Job, job_manager, Condition -from Tools.Directories import fileExists, isMount +from Tools.Directories import fileExists, isMount, resolveFilename, SCOPE_HDD, SCOPE_MEDIA from Tools.HardwareInfo import HardwareInfo from Tools.Downloader import downloadWithProgress from enigma import eConsoleAppContainer, gFont, RT_HALIGN_LEFT, RT_HALIGN_CENTER, RT_VALIGN_CENTER, RT_WRAP, eTimer @@ -391,7 +391,7 @@ class NFIDownload(Screen): self.box = HardwareInfo().get_device_name() self.feed_base = "http://www.dreamboxupdate.com/opendreambox" #/1.5/%s/images/" % self.box - self.usbmountpoint = "/mnt/usb/" + self.usbmountpoint = resolveFilename(SCOPE_MEDIA)+"usb/" self.menulist = [] @@ -570,7 +570,7 @@ class NFIDownload(Screen): def ackedDestination(self): print "[ackedDestination]", self.branch, self.target_dir - self.container.setCWD("/mnt") + self.container.setCWD(resolveFilename(SCOPE_MEDIA)+"usb/") if self.target_dir[:8] == "/autofs/": self.target_dir = "/dev/" + self.target_dir[8:-1] @@ -792,13 +792,14 @@ If you already have a prepared bootable USB stick, please insert it now. Otherwi self.umountCallback() def main(session, **kwargs): - session.open(NFIDownload,"/home/root") + session.open(NFIDownload,resolveFilename(SCOPE_HDD)) def filescan_open(list, session, **kwargs): dev = "/dev/" + (list[0].path).rsplit('/',1)[0][7:] - print "mounting device " + dev + " to /mnt/usb..." - system("mount "+dev+" /mnt/usb/ -o rw,sync") - session.open(NFIDownload,"/mnt/usb/") + print "mounting device " + dev + " to /media/usb..." + usbmountpoint = resolveFilename(SCOPE_MEDIA)+"usb/" + system("mount %s %s -o rw,sync" % (dev, usbmountpoint)) + session.open(NFIDownload,usbmountpoint) def filescan(**kwargs): from Components.Scanner import Scanner, ScanPath diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py index e1f3e1de..a6a611d3 100755 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py @@ -1335,9 +1335,9 @@ class UpdatePlugin(Screen): self["slider"] = self.slider self.activityslider = Slider(0, 100) self["activityslider"] = self.activityslider - self.status = StaticText(_("Upgrading Dreambox... Please wait")) + self.status = StaticText(_("Please wait...")) self["status"] = self.status - self.package = StaticText() + self.package = StaticText(_("Verifying your internet connection...")) self["package"] = self.package self.oktext = _("Press OK on your remote control to continue.") @@ -1348,20 +1348,35 @@ class UpdatePlugin(Screen): self.activity = 0 self.activityTimer = eTimer() self.activityTimer.callback.append(self.doActivityTimer) - self.activityTimer.start(100, False) self.ipkg = IpkgComponent() self.ipkg.addCallback(self.ipkgCallback) - self.updating = True - self.package.setText(_("Package list update")) - self.ipkg.startCmd(IpkgComponent.CMD_UPDATE) + self.updating = False self["actions"] = ActionMap(["WizardActions"], { "ok": self.exit, "back": self.exit }, -1) + + iNetwork.checkNetworkState(self.checkNetworkCB) + self.onClose.append(self.cleanup) + + def cleanup(self): + iNetwork.stopPingConsole() + + def checkNetworkCB(self,data): + if data is not None: + if data <= 2: + self.updating = True + self.activityTimer.start(100, False) + self.package.setText(_("Package list update")) + self.status.setText(_("Upgrading Dreambox... Please wait")) + self.ipkg.startCmd(IpkgComponent.CMD_UPDATE) + else: + self.package.setText(_("Your network is not working. Please try again.")) + self.status.setText(self.oktext) def doActivityTimer(self): self.activity += 1 @@ -1440,6 +1455,9 @@ class UpdatePlugin(Screen): self.session.openWithCallback(self.exitAnswer, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your Dreambox?")) else: self.close() + else: + if not self.updating: + self.close() def exitAnswer(self, result): if result is not None and result: diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 6fa89112..4f6eafca 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -717,7 +717,7 @@ class InfoBarSeek: SEEK_STATE_PAUSE = (1, 0, 0, "||") SEEK_STATE_EOF = (1, 0, 0, "END") - def __init__(self, actionmap = "InfobarSeekActions", useSeekBackHack=True): + def __init__(self, actionmap = "InfobarSeekActions"): self.__event_tracker = ServiceEventTracker(screen=self, eventmap= { iPlayableService.evSeekableStatusChanged: self.__seekableStatusChanged, @@ -774,20 +774,10 @@ class InfoBarSeek: self.__seekableStatusChanged() def makeStateForward(self, n): -# minspeed = config.seek.stepwise_minspeed.value -# repeat = int(config.seek.stepwise_repeat.value) -# if minspeed != "Never" and n >= int(minspeed) and repeat > 1: -# return (0, n * repeat, repeat, ">> %dx" % n) -# else: - return (0, n, 0, ">> %dx" % n) + return (0, n, 0, ">> %dx" % n) def makeStateBackward(self, n): -# minspeed = config.seek.stepwise_minspeed.value -# repeat = int(config.seek.stepwise_repeat.value) -# if minspeed != "Never" and n >= int(minspeed) and repeat > 1: -# return (0, -n * repeat, repeat, "<< %dx" % n) -# else: - return (0, -n, 0, "<< %dx" % n) + return (0, -n, 0, "<< %dx" % n) def makeStateSlowMotion(self, n): return (0, 0, n, "/%d" % n) @@ -1970,20 +1960,21 @@ class InfoBarCueSheetSupport: return True def jumpPreviousMark(self): - # we add 2 seconds, so if the play position is <2s after + # we add 5 seconds, so if the play position is <5s after # the mark, the mark before will be used self.jumpPreviousNextMark(lambda x: -x-5*90000, start=True) def jumpNextMark(self): - if not self.jumpPreviousNextMark(lambda x: x): + if not self.jumpPreviousNextMark(lambda x: x-90000): self.doSeek(-1) def getNearestCutPoint(self, pts, cmp=abs, start=False): # can be optimized - beforecut = False + beforecut = True nearest = None + bestdiff = -1 + instate = True if start: - beforecut = True bestdiff = cmp(0 - pts) if bestdiff >= 0: nearest = [0, False] @@ -1992,14 +1983,19 @@ class InfoBarCueSheetSupport: beforecut = False if cp[1] == self.CUT_TYPE_IN: # Start is here, disregard previous marks diff = cmp(cp[0] - pts) - if diff >= 0: + if start and diff >= 0: nearest = cp bestdiff = diff else: nearest = None - if cp[1] in (self.CUT_TYPE_MARK, self.CUT_TYPE_LAST): + bestdiff = -1 + if cp[1] == self.CUT_TYPE_IN: + instate = True + elif cp[1] == self.CUT_TYPE_OUT: + instate = False + elif cp[1] in (self.CUT_TYPE_MARK, self.CUT_TYPE_LAST): diff = cmp(cp[0] - pts) - if diff >= 0 and (nearest is None or bestdiff > diff): + if instate and diff >= 0 and (nearest is None or bestdiff > diff): nearest = cp bestdiff = diff return nearest diff --git a/lib/service/iservice.h b/lib/service/iservice.h index 2ba7cb46..7f582495 100644 --- a/lib/service/iservice.h +++ b/lib/service/iservice.h @@ -289,6 +289,7 @@ public: sFileSize, sCAIDs, + sCAIDPIDs, sVideoType, /* MPEG2 MPEG4 */ sTags, /* space seperated list of tags */ diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index f1858c9c..6a464aff 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -1591,7 +1591,7 @@ int eDVBServicePlay::getInfo(int w) { eDVBServicePMTHandler::program program; - if (w == sCAIDs) + if (w == sCAIDs || w == sCAIDPIDs) return resIsPyObject; eDVBServicePMTHandler &h = m_timeshift_active ? m_service_handler_timeshift : m_service_handler; @@ -1732,6 +1732,8 @@ PyObject *eDVBServicePlay::getInfoObject(int w) { case sCAIDs: return m_service_handler.getCaIds(); + case sCAIDPIDs: + return m_service_handler.getCaIds(true); case sTransponderData: return eStaticServiceDVBInformation().getInfoObject(m_reference, w); default: diff --git a/main/bsod.cpp b/main/bsod.cpp index f76283e7..5b01c7c1 100644 --- a/main/bsod.cpp +++ b/main/bsod.cpp @@ -183,6 +183,7 @@ void bsodFatal(const char *component) xml.open("image"); xml.stringFromFile("dreamboxmodel", "/proc/stb/info/model"); xml.stringFromFile("kernelcmdline", "/proc/cmdline"); + xml.stringFromFile("nimsockets", "/proc/bus/nim_sockets"); if (!getConfigBool("config.plugins.crashlogautosubmit.sendAnonCrashlog", true)) { xml.cDataFromFile("dreamboxca", "/proc/stb/info/ca"); xml.cDataFromFile("enigma2settings", eEnv::resolve("${sysconfdir}/enigma2/settings"), ".password="); |
