Merge commit 'dream/master'
authorMike Looijmans <milo-software@users.sourceforge.net>
Sat, 3 Apr 2010 10:15:36 +0000 (12:15 +0200)
committerMike Looijmans <milo-software@users.sourceforge.net>
Sat, 3 Apr 2010 10:15:36 +0000 (12:15 +0200)
Conflicts:

data/encoding.conf
lib/python/Components/Harddisk.py
lib/python/Components/TimerList.py
lib/python/Screens/ScanSetup.py
po/lt.po (kept ours)
po/nl.po (kept ours)

20 files changed:
1  2 
Navigation.py
configure.ac
data/encoding.conf
data/skin_default.xml
lib/dvb/frontend.cpp
lib/dvb/frontend.h
lib/dvb/idvb.h
lib/python/Components/Harddisk.py
lib/python/Components/NimManager.py
lib/python/Components/Renderer/Listbox.py
lib/python/Components/TimerList.py
lib/python/Plugins/Extensions/DVDBurn/TitleList.py
lib/python/Screens/InfoBarGenerics.py
lib/python/Screens/Satconfig.py
lib/python/Screens/ScanSetup.py
lib/service/iservice.h
lib/service/servicedvb.cpp
lib/service/servicedvb.h
lib/service/servicemp3.cpp
po/Makefile.am

diff --cc Navigation.py
Simple merge
diff --cc configure.ac
Simple merge
@@@ -6,7 -6,10 +6,11 @@@ gre ISO8859-
  pol ISO8859-2
  rus ISO8859-5
  bul ISO8859-5
 +tha ISO8859-11
+ cze ISO6397
+ ces ISO6397
+ slo ISO6397
+ slk ISO6397
  #Sorry for that.. in DVB Spec this is the default behavior 
  #when no other encoding is given in dvb-texts..
  #but this breaks too much providers yet.. 
Simple merge
@@@ -146,9 -145,8 +146,10 @@@ public
        bool setSlotInfo(ePyObject obj); // get a tuple (slotid, slotdescr)
        static void setTypePriorityOrder(int val) { PriorityOrder = val; }
        static int getTypePriorityOrder() { return PriorityOrder; }
 +      static void setPreferredFrontend(int index) { PreferredFrontendIndex = index; }
 +      static int getPreferredFrontend() { return PreferredFrontendIndex; }
  
+       void reopenFrontend();
        int openFrontend();
        int closeFrontend(bool force=false);
        const char *getDescription() const { return m_description; }
diff --cc lib/dvb/idvb.h
Simple merge
@@@ -182,12 -182,9 +182,12 @@@ class Harddisk
                return (res >> 8)
  
        def mkfs(self):
-               cmd = "/sbin/mkfs.ext3 "
+               cmd = "mkfs.ext3 "
 -              if self.diskSize() > 4 * 1024:
 -                      cmd += "-T largefile "
 +              size = self.diskSize()
 +              if size > 2 * 1024:
 +                      cmd += "-T largefile -N %d " % (size * 32)
 +              elif size > 16 * 1024:
 +                      cmd += "-T largefile -O sparse_super "
                cmd += "-m0 -O dir_index " + self.partitionPath("1")
                res = system(cmd)
                return (res >> 8)
                for line in lines:
                        parts = line.strip().split(" ")
                        if path.realpath(parts[0]) == self.partitionPath("1"):
-                               cmd = "/bin/mount -t ext3 " + parts[0]
+                               cmd = "mount -t ext3 " + parts[0]
                                res = system(cmd)
 -                              break
 +                              return (res >> 8)
 +
 +              # device is not in fstab
 +              if self.type == self.DEVTYPE_UDEV:
 +                      # we can let udev do the job, re-read the partition table
 +                      res = system('/sbin/sfdisk -R ' + self.disk_path)
 +                      # give udev some time to make the mount, which it will do asynchronously
 +                      from time import sleep
 +                      sleep(3)
  
                return (res >> 8)
  
Simple merge
@@@ -17,31 -17,37 +17,30 @@@ class TimerList(HTMLComponent, GUICompo
        def buildTimerEntry(self, timer, processed):
                width = self.l.getItemSize().width()
                res = [ None ]
 -              res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 0, width, 30, 0, RT_HALIGN_LEFT|RT_VALIGN_CENTER, timer.service_ref.getServiceName()))
 -              res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 30, width, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, timer.name))
 +              x = (2*width) // 3
 +              res.append((eListboxPythonMultiContent.TYPE_TEXT, 24, 0, x-24, 25, 1, RT_HALIGN_LEFT|RT_VALIGN_BOTTOM, timer.name))
 +              res.append((eListboxPythonMultiContent.TYPE_TEXT, x, 0, width-x, 25, 0, RT_HALIGN_RIGHT|RT_VALIGN_BOTTOM, timer.service_ref.getServiceName()))
  
 -              repeatedtext = ""
                days = ( _("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat"), _("Sun") )
 +              begin = FuzzyTime(timer.begin)
                if timer.repeated:
 +                      repeatedtext = []
                        flags = timer.repeated
 -                      count = 0
                        for x in (0, 1, 2, 3, 4, 5, 6):
 -                                      if (flags & 1 == 1):
 -                                              if (count != 0):
 -                                                      repeatedtext += ", "
 -                                              repeatedtext += days[x]
 -                                              count += 1
 -                                      flags = flags >> 1
 -                      if timer.justplay:
 -                              if timer.end - timer.begin < 4: # rounding differences
 -                                      res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, width-150, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + ((" %s "+ _("(ZAP)")) % (FuzzyTime(timer.begin)[1]))))
 -                              else:
 -                                      res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, width-150, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + ((" %s ... %s (%d " + _("mins") + ") ") % (FuzzyTime(timer.begin)[1], FuzzyTime(timer.end)[1], (timer.end - timer.begin) / 60)) + _("(ZAP)")))
 -                      else:
 -                              res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, width-150, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + ((" %s ... %s (%d " + _("mins") + ")") % (FuzzyTime(timer.begin)[1], FuzzyTime(timer.end)[1], (timer.end - timer.begin) / 60))))
 +                              if (flags & 1 == 1):
 +                                      repeatedtext.append(days[x])
 +                              flags = flags >> 1
 +                      repeatedtext = ", ".join(repeatedtext)
 +                      if self.iconRepeat:
 +                              res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 0, 25, 20, 20, self.iconRepeat))
                else:
 -                      if timer.justplay:
 -                              if timer.end - timer.begin < 4:
 -                                      res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, width-150, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + (("%s, %s " + _("(ZAP)")) % (FuzzyTime(timer.begin)))))
 -                              else:
 -                                      res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, width-150, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + (("%s, %s ... %s (%d " + _("mins") + ") ") % (FuzzyTime(timer.begin) + FuzzyTime(timer.end)[1:] + ((timer.end - timer.begin) / 60,))) + _("(ZAP)")))
 -                      else:
 -                              res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, width-150, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + (("%s, %s ... %s (%d " + _("mins") + ")") % (FuzzyTime(timer.begin) + FuzzyTime(timer.end)[1:] + ((timer.end - timer.begin) / 60,)))))
 -
 +                      repeatedtext = begin[0] # date
 +              if timer.justplay: 
 +                      text = repeatedtext + ((" %s "+ _("(ZAP)")) % (begin[1])) 
 +              else:
 +                      text = repeatedtext + ((" %s ... %s (%d " + _("mins") + ")") % (begin[1], FuzzyTime(timer.end)[1], (timer.end - timer.begin) / 60))
 +              res.append((eListboxPythonMultiContent.TYPE_TEXT, 150, 25, width-150, 20, 1, RT_HALIGN_RIGHT|RT_VALIGN_TOP, text))
 +              icon = None
                if not processed:
                        if timer.state == TimerEntry.StateWaiting:
                                state = _("waiting")
Simple merge
Simple merge
@@@ -127,51 -127,39 +127,52 @@@ class CableTransponderSearchSupport
                self.cable_search_session.close(True)
  
        def getCableTransponderData(self, str):
 -              data = str.split()
 -              if len(data):
 -                      if data[0] == 'OK':
 -                              print str
 -                              parm = eDVBFrontendParametersCable()
 -                              qam = { "QAM16" : parm.Modulation_QAM16,
 -                                      "QAM32" : parm.Modulation_QAM32,
 -                                      "QAM64" : parm.Modulation_QAM64,
 -                                      "QAM128" : parm.Modulation_QAM128,
 -                                      "QAM256" : parm.Modulation_QAM256 }
 -                              inv = { "INVERSION_OFF" : parm.Inversion_Off,
 -                                      "INVERSION_ON" : parm.Inversion_On,
 -                                      "INVERSION_AUTO" : parm.Inversion_Unknown }
 -                              fec = { "FEC_AUTO" : parm.FEC_Auto,
 -                                      "FEC_1_2" : parm.FEC_1_2,
 -                                      "FEC_2_3" : parm.FEC_2_3,
 -                                      "FEC_3_4" : parm.FEC_3_4,
 -                                      "FEC_5_6": parm.FEC_5_6,
 -                                      "FEC_7_8" : parm.FEC_7_8,
 -                                      "FEC_8_9" : parm.FEC_8_9,
 -                                      "FEC_NONE" : parm.FEC_None }
 -                              parm.frequency = int(data[1])
 -                              parm.symbol_rate = int(data[2])
 -                              parm.fec_inner = fec[data[3]]
 -                              parm.modulation = qam[data[4]]
 -                              parm.inversion = inv[data[5]]
 -                              self.__tlist.append(parm)
 -              tmpstr = _("Try to find used Transponders in cable network.. please wait...")
 -              tmpstr += "\n\n"
 -              tmpstr += data[1]
 -              tmpstr += " kHz "
 -              tmpstr += data[0]
 -              self.cable_search_session["text"].setText(tmpstr)
 +              #prepend any remaining data from the previous call
 +              str = self.remainingdata + str
 +              #split in lines
 +              lines = str.split('\n')
 +              #'str' should end with '\n', so when splitting, the last line should be empty. If this is not the case, we received an incomplete line
 +              if len(lines[-1]):
 +                      #remember this data for next time
 +                      self.remainingdata = lines[-1]
 +                      lines = lines[0:-1]
 +              else:
 +                      self.remainingdata = ""
 +
 +              for line in lines:
 +                      data = line.split()
 +                      if len(data):
 +                              if data[0] == 'OK':
 +                                      print str
 +                                      parm = eDVBFrontendParametersCable()
 +                                      qam = { "QAM16" : parm.Modulation_QAM16,
 +                                              "QAM32" : parm.Modulation_QAM32,
 +                                              "QAM64" : parm.Modulation_QAM64,
 +                                              "QAM128" : parm.Modulation_QAM128,
 +                                              "QAM256" : parm.Modulation_QAM256 }
 +                                      inv = { "INVERSION_OFF" : parm.Inversion_Off,
-                                               "INVERSION_ON" : parm.Inversion_On }
++                                              "INVERSION_ON" : parm.Inversion_On,
++                                              "INVERSION_AUTO" : parm.Inversion_Unknown }
 +                                      fec = { "FEC_AUTO" : parm.FEC_Auto,
 +                                              "FEC_1_2" : parm.FEC_1_2,
 +                                              "FEC_2_3" : parm.FEC_2_3,
 +                                              "FEC_3_4" : parm.FEC_3_4,
 +                                              "FEC_5_6": parm.FEC_5_6,
 +                                              "FEC_7_8" : parm.FEC_7_8,
 +                                              "FEC_8_9" : parm.FEC_8_9,
 +                                              "FEC_NONE" : parm.FEC_None }
 +                                      parm.frequency = int(data[1])
 +                                      parm.symbol_rate = int(data[2])
 +                                      parm.fec_inner = fec[data[3]]
 +                                      parm.modulation = qam[data[4]]
 +                                      parm.inversion = inv[data[5]]
 +                                      self.__tlist.append(parm)
 +                              tmpstr = _("Try to find used Transponders in cable network.. please wait...")
 +                              tmpstr += "\n\n"
 +                              tmpstr += data[1]
 +                              tmpstr += " kHz "
 +                              tmpstr += data[0]
 +                              self.cable_search_session["text"].setText(tmpstr)
  
        def startCableTransponderSearch(self, nim_idx):
                if not self.tryGetRawFrontend(nim_idx):
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc po/Makefile.am
Simple merge