Merge pull request #112 from mx3L/topic_servicemp3_user_agent
authorlittlesat <littlesat99@yahoo.com>
Fri, 4 Dec 2015 13:25:23 +0000 (14:25 +0100)
committerlittlesat <littlesat99@yahoo.com>
Fri, 4 Dec 2015 13:25:23 +0000 (14:25 +0100)
servicemp3 and custom user agent header

28 files changed:
lib/gdi/lcd.cpp
lib/python/Components/GUISkin.py
lib/python/Components/InputDevice.py
lib/python/Plugins/Extensions/CutListEditor/plugin.py
lib/python/Plugins/Extensions/CutListEditor/ui.py
lib/python/Plugins/Extensions/DVDBurn/plugin.py
lib/python/Plugins/Extensions/MediaPlayer/plugin.py
lib/python/Plugins/SystemPlugins/CableScan/plugin.py
lib/python/Plugins/SystemPlugins/DefaultServicesScanner/plugin.py
lib/python/Plugins/SystemPlugins/FastScan/plugin.py
lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py
lib/python/Plugins/SystemPlugins/HdmiCEC/plugin.py
lib/python/Plugins/SystemPlugins/OSD3DSetup/plugin.py
lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py
lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py
lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py
lib/python/Plugins/SystemPlugins/VideoClippingSetup/plugin.py
lib/python/Screens/About.py
lib/python/Screens/EpgSelection.py
lib/python/Screens/NetworkSetup.py
lib/python/Screens/ServiceInfo.py
lib/python/Screens/SubservicesQuickzap.py
lib/python/Screens/TaskView.py
lib/python/Screens/TimeDateInput.py
lib/python/Screens/VirtualKeyBoard.py
lib/service/servicemp3.cpp
lib/service/servicemp3.h
mytest.py

index aed9f44..865fa39 100644 (file)
@@ -17,7 +17,7 @@ eLCD *eLCD::instance;
 eLCD::eLCD()
 {
        lcdfd = -1;
-       locked=0;
+       locked = 0;
        instance = this;
 }
 
@@ -29,10 +29,10 @@ eLCD *eLCD::getInstance()
 void eLCD::setSize(int xres, int yres, int bpp)
 {
        res = eSize(xres, yres);
-       _buffer=new unsigned char[xres * yres * bpp/8];
-       memset(_buffer, 0, res.height()*res.width()*bpp/8);
-       _stride=res.width()*bpp/8;
-       eDebug("[eLCD] (%dx%dx%d) buffer %p %d bytes, stride %d", xres, yres, bpp, _buffer, xres*yres*bpp/8, _stride);
+       _buffer = new unsigned char[xres * yres * bpp/8];
+       memset(_buffer, 0, res.height() * res.width() * bpp / 8);
+       _stride = res.width() * bpp / 8;
+       eDebug("[eLCD] (%dx%dx%d) buffer %p %d bytes, stride %d", xres, yres, bpp, _buffer, xres * yres * bpp / 8, _stride);
 }
 
 eLCD::~eLCD()
@@ -46,13 +46,13 @@ int eLCD::lock()
        if (locked)
                return -1;
 
-       locked=1;
+       locked = 1;
        return lcdfd;
 }
 
 void eLCD::unlock()
 {
-       locked=0;
+       locked = 0;
 }
 
 #ifdef HAVE_TEXTLCD
@@ -69,7 +69,7 @@ void eLCD::renderText(ePoint start, const char *text)
 
 eDBoxLCD::eDBoxLCD()
 {
-       int xres=132, yres=64, bpp=8;
+       int xres = 132, yres = 64, bpp = 8;
        flipped = false;
        inverted = 0;
        lcd_type = 0;
@@ -81,10 +81,9 @@ eDBoxLCD::eDBoxLCD()
                    !access("/proc/stb/fp/oled_brightness", W_OK) )
                        lcd_type = 2;
                lcdfd = open("/dev/dbox/lcd0", O_RDWR);
-       } else
-       {
-               lcd_type = 1;
        }
+       else
+               lcd_type = 1;
 
        if (lcdfd < 0)
                eDebug("[eDboxLCD] No oled0 or lcd0 device found!");
@@ -98,7 +97,7 @@ eDBoxLCD::eDBoxLCD()
 #define        LCD_MODE_BIN            1
 #endif
 
-               int i=LCD_MODE_BIN;
+               int i = LCD_MODE_BIN;
                ioctl(lcdfd, LCD_IOCTL_ASC_MODE, &i);
                FILE *f = fopen("/proc/stb/lcd/xres", "r");
                if (f)
@@ -124,11 +123,11 @@ eDBoxLCD::eDBoxLCD()
                        lcd_type = 3;
                }
                eDebug("[eDboxLCD] xres=%d, yres=%d, bpp=%d lcd_type=%d", xres, yres, bpp, lcd_type);
+
+               instance = this;
+               setSize(xres, yres, bpp);
        }
 #endif
-       instance = this;
-
-       setSize(xres, yres, bpp);
 }
 
 void eDBoxLCD::setInverted(unsigned char inv)
@@ -146,6 +145,8 @@ void eDBoxLCD::setFlipped(bool onoff)
 int eDBoxLCD::setLCDContrast(int contrast)
 {
 #ifndef NO_LCD
+       if (lcdfd < 0)
+               return(0);
 
 #ifndef LCD_IOCTL_SRV
 #define LCDSET                  0x1000
@@ -154,13 +155,13 @@ int eDBoxLCD::setLCDContrast(int contrast)
        eDebug("[eDboxLCD] setLCDContrast %d", contrast);
 
        int fp;
-       if((fp=open("/dev/dbox/fp0", O_RDWR))<0)
+       if((fp = open("/dev/dbox/fp0", O_RDWR)) < 0)
        {
                eDebug("[eDboxLCD] can't open /dev/dbox/fp0: %m");
                return(-1);
        }
 
-       if(ioctl(lcdfd, LCD_IOCTL_SRV, &contrast)<0)
+       if(ioctl(lcdfd, LCD_IOCTL_SRV, &contrast) < 0)
                eDebug("[eDboxLCD] can't set lcd contrast: %m");
        close(fp);
 #endif
@@ -170,20 +171,23 @@ int eDBoxLCD::setLCDContrast(int contrast)
 int eDBoxLCD::setLCDBrightness(int brightness)
 {
 #ifndef NO_LCD
+       if (lcdfd < 0)
+               return(0);
+
        eDebug("[eDboxLCD] setLCDBrightness %d", brightness);
-       FILE *f=fopen("/proc/stb/lcd/oled_brightness", "w");
+       FILE *f = fopen("/proc/stb/lcd/oled_brightness", "w");
        if (!f)
                f = fopen("/proc/stb/fp/oled_brightness", "w");
        if (f)
        {
                if (fprintf(f, "%d", brightness) == 0)
-                       eDebug("[eDboxLCD] write /proc/stb/lcd/oled_brightness failed: %m");
+                       eDebug("[eDboxLCD] write /proc/stb/lcd|fp/oled_brightness failed: %m");
                fclose(f);
        }
        else
        {
                int fp;
-               if((fp=open("/dev/dbox/fp0", O_RDWR)) < 0)
+               if ((fp = open("/dev/dbox/fp0", O_RDWR)) < 0)
                {
                        eDebug("[eDboxLCD] can't open /dev/dbox/fp0: %m");
                        return(-1);
@@ -191,7 +195,7 @@ int eDBoxLCD::setLCDBrightness(int brightness)
 #ifndef FP_IOCTL_LCD_DIMM
 #define FP_IOCTL_LCD_DIMM       3
 #endif
-               if(ioctl(fp, FP_IOCTL_LCD_DIMM, &brightness) < 0)
+               if (ioctl(fp, FP_IOCTL_LCD_DIMM, &brightness) < 0)
                        eDebug("[eDboxLCD] can't set lcd brightness: %m");
                close(fp);
        }
@@ -201,10 +205,10 @@ int eDBoxLCD::setLCDBrightness(int brightness)
 
 eDBoxLCD::~eDBoxLCD()
 {
-       if (lcdfd>=0)
+       if (lcdfd >= 0)
        {
                close(lcdfd);
-               lcdfd=-1;
+               lcdfd = -1;
        }
 }
 
@@ -216,17 +220,15 @@ void eDBoxLCD::update()
 
        if (lcd_type == 0 || lcd_type == 2)
        {
-               unsigned char raw[132*8];
+               unsigned char raw[132 * 8];
                int x, y, yy;
-               for (y=0; y<8; y++)
+               for (y = 0; y < 8; y++)
                {
-                       for (x=0; x<132; x++)
+                       for (x = 0; x < 132; x++)
                        {
-                               int pix=0;
-                               for (yy=0; yy<8; yy++)
-                               {
-                                       pix|=(_buffer[(y*8+yy)*132+x]>=108)<<yy;
-                               }
+                               int pix = 0;
+                               for (yy = 0; yy < 8; yy++)
+                                       pix |= (_buffer[(y * 8 + yy) * 132 + x] >= 108) << yy;
                                if (flipped)
                                {
                                        /* 8 pixels per byte, swap bits */
@@ -234,12 +236,10 @@ void eDBoxLCD::update()
                                        raw[(7 - y) * 132 + (131 - x)] = BIT_SWAP(pix ^ inverted);
                                }
                                else
-                               {
                                        raw[y * 132 + x] = pix ^ inverted;
-                               }
                        }
                }
-               write(lcdfd, raw, 132*8);
+               write(lcdfd, raw, 132 * 8);
        }
        else if (lcd_type == 3)
        {
@@ -254,34 +254,28 @@ void eDBoxLCD::update()
                                for (unsigned int x = 0; x < width; x++)
                                {
                                        if (flipped)
-                                       {
                                                /* 8bpp, no bit swapping */
                                                raw[(height - 1 - y) * width + (width - 1 - x)] = _buffer[y * width + x] ^ inverted;
-                                       }
                                        else
-                                       {
                                                raw[y * width + x] = _buffer[y * width + x] ^ inverted;
-                                       }
                                }
                        }
                        write(lcdfd, raw, _stride * height);
                }
                else
-               {
                        write(lcdfd, _buffer, _stride * res.height());
-               }
        }
        else /* lcd_type == 1 */
        {
-               unsigned char raw[64*64];
+               unsigned char raw[64 * 64];
                int x, y;
-               memset(raw, 0, 64*64);
-               for (y=0; y<64; y++)
+               memset(raw, 0, 64 * 64);
+               for (y = 0; y < 64; y++)
                {
-                       int pix=0;
-                       for (x=0; x<128 / 2; x++)
+                       int pix = 0;
+                       for (x = 0; x < 128 / 2; x++)
                        {
-                               pix = (_buffer[y*132 + x * 2 + 2] & 0xF0) |(_buffer[y*132 + x * 2 + 1 + 2] >> 4);
+                               pix = (_buffer[y * 132 + x * 2 + 2] & 0xF0) | (_buffer[y * 132 + x * 2 + 1 + 2] >> 4);
                                if (inverted)
                                        pix = 0xFF - pix;
                                if (flipped)
@@ -293,12 +287,10 @@ void eDBoxLCD::update()
                                        raw[(63 - y) * 64 + (63 - x)] = byte;
                                }
                                else
-                               {
                                        raw[y * 64 + x] = pix;
-                               }
                        }
                }
-               write(lcdfd, raw, 64*64);
+               write(lcdfd, raw, 64 * 64);
        }
 #endif
 }
index f26c825..5d4068a 100644 (file)
@@ -58,10 +58,12 @@ class GUISkin:
                return None
 
        def addSummary(self, summary):
-               self.summaries.append(summary)
+               if summary is not None:
+                       self.summaries.append(summary)
 
        def removeSummary(self, summary):
-               self.summaries.remove(summary)
+               if summary is not None:
+                       self.summaries.remove(summary)
 
        def setTitle(self, title):
                if self.instance:
index 0d6e188..9d511d9 100644 (file)
@@ -40,7 +40,7 @@ class inputDevices:
                                self.name = self.name[:self.name.find("\0")]
                                os_close(self.fd)
                        except (IOError,OSError), err:
-                               print '[iInputDevices] getInputDevices  <ERROR: ioctl(EVIOCGNAME): ' + str(err) + ' >'
+                               print '[iInputDevices] getInputDevices " + evdev + " <ERROR: ioctl(EVIOCGNAME): ' + str(err) + ' >'
                                self.name = None
 
                        if self.name:
index c579162..3e1370b 100644 (file)
@@ -9,5 +9,5 @@ def main(session, service, **kwargs):
        session.open(CutListEditor, service)
 
 def Plugins(**kwargs):
-       return PluginDescriptor(name="Cutlist Editor", description=_("Cutlist editor..."),
+       return PluginDescriptor(name= _("Cutlist editor"), description=_("Cutlist editor..."),
                where = PluginDescriptor.WHERE_MOVIELIST, needsRestart = False, fnc=main)
index 3acb4dd..383aea5 100644 (file)
@@ -144,6 +144,7 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He
        def __init__(self, session, service):
                self.skin = CutListEditor.skin
                Screen.__init__(self, session)
+               self.setTitle(_("Cutlist editor"))
                InfoBarSeek.__init__(self, actionmap = "CutlistSeekActions")
                InfoBarCueSheetSupport.__init__(self)
                InfoBarBase.__init__(self, steal_current_service = True)
index ca15597..b1e3321 100644 (file)
@@ -13,5 +13,5 @@ def main_add(session, service, **kwargs):
 
 def Plugins(**kwargs):
        descr = _("Burn to DVD")
-       return [PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_MOVIELIST, needsRestart = True, fnc=main_add, icon="dvdburn.png"),
-               PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = True, fnc=main, icon="dvdburn.png") ]
+       return [PluginDescriptor(name= _("DVD Burn"), description=descr, where = PluginDescriptor.WHERE_MOVIELIST, needsRestart = True, fnc=main_add, icon="dvdburn.png"),
+               PluginDescriptor(name= _("DVD Burn"), description=descr, where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = True, fnc=main, icon="dvdburn.png") ]
index d696969..dc2f74f 100644 (file)
@@ -113,6 +113,8 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarScreenSaver, InfoBarSeek, InfoBarA
                self.oldService = self.session.nav.getCurrentlyPlayingServiceReference()
                self.session.nav.stopService()
 
+               self.setTitle(_("Media player"))
+
                self.playlistparsers = {}
                self.addPlaylistParser(PlaylistIOM3U, "m3u")
                self.addPlaylistParser(PlaylistIOPLS, "pls")
index 7c59f4b..8f95229 100644 (file)
@@ -66,6 +66,7 @@ class CableScanStatus(Screen):
 
        def __init__(self, session, scanTuner, scanNetwork, scanFrequency, scanSymbolRate, scanModulation, keepNumbers, hdList):
                Screen.__init__(self, session)
+               self.setTitle(_("Cable Scan"))
                self.scanTuner = scanTuner
                self.scanNetwork = scanNetwork
                self.scanFrequency = scanFrequency
@@ -131,6 +132,8 @@ class CableScanScreen(ConfigListScreen, Screen):
        def __init__(self, session):
                Screen.__init__(self, session)
 
+               self.setTitle(_("Cable Scan"))
+
                self["actions"] = ActionMap(["SetupActions", "MenuActions"],
                {
                        "ok": self.keyGo,
index a27cc12..878a38e 100644 (file)
@@ -134,4 +134,4 @@ def DefaultServicesScannerMain(session, **kwargs):
        session.open(DefaultServicesScannerPlugin)
 
 def Plugins(**kwargs):
-       return PluginDescriptor(name="Default Services Scanner", description=_("Scans default lamedbs sorted by satellite with a connected dish positioner"), where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc=DefaultServicesScannerMain)
+       return PluginDescriptor(name=_("Default Services Scanner"), description=_("Scans default lamedbs sorted by satellite with a connected dish positioner"), where = PluginDescriptor.WHERE_PLUGINMENU, needsRestart = False, fnc=DefaultServicesScannerMain)
index 3155989..389a95e 100644 (file)
@@ -30,6 +30,7 @@ class FastScanStatus(Screen):
 
        def __init__(self, session, scanTuner=0, transponderParameters=None, scanPid=900, keepNumbers=False, keepSettings=False, providerName='Favorites'):
                Screen.__init__(self, session)
+               self.setTitle(_("Fast Scan"))
                self.scanPid = scanPid
                self.scanTuner = scanTuner
                self.transponderParameters = transponderParameters
@@ -147,6 +148,8 @@ class FastScanScreen(ConfigListScreen, Screen):
        def __init__(self, session, nimList):
                Screen.__init__(self, session)
 
+               self.setTitle(_("Fast Scan"))
+
                self["actions"] = ActionMap(["SetupActions", "MenuActions"],
                {
                        "ok": self.keyGo,
index eec53e3..75b3fa3 100644 (file)
@@ -27,6 +27,8 @@ class FPUpgrade(Screen):
                self.skin = FPUpgrade.skin
                Screen.__init__(self, session)
 
+               self.setTitle(_("FP upgrade required"))
+
                from Tools.StbHardware import getFPVersion
                version = str(getFPVersion() or "N/A")
                newversion = str(getUpgradeVersion() or "N/A")
@@ -58,6 +60,8 @@ class SystemMessage(Screen):
 
                Screen.__init__(self, session)
 
+               self.setTitle(_("System Message"))
+
                self["text"] = StaticText(message)
 
                self["actions"] = ActionMap(["OkCancelActions"],
@@ -76,11 +80,11 @@ def Plugins(**kwargs):
        newversion = getUpgradeVersion() or 0
        list = []
        if version is not None and version < newversion:
-               list.append(PluginDescriptor(name="FP Upgrade", where = PluginDescriptor.WHERE_WIZARD, needsRestart = True, fnc=(8, FPUpgrade)))
+               list.append(PluginDescriptor(name=_("FP Upgrade"), where = PluginDescriptor.WHERE_WIZARD, needsRestart = True, fnc=(8, FPUpgrade)))
 
        try:
                msg = open("/proc/stb/message").read()
-               list.append(PluginDescriptor(name="System Message Check", where = PluginDescriptor.WHERE_WIZARD, needsRestart = True, fnc=(9, SystemMessage, msg)))
+               list.append(PluginDescriptor(name=_("System Message Check"), where = PluginDescriptor.WHERE_WIZARD, needsRestart = True, fnc=(9, SystemMessage, msg)))
        except:
                pass
 
index e5996cb..9dc708b 100644 (file)
@@ -23,6 +23,8 @@ class HdmiCECSetupScreen(Screen, ConfigListScreen):
                self.skin = HdmiCECSetupScreen.skin
                Screen.__init__(self, session)
 
+               self.setTitle(_("HDMI CEC setup"))
+
                from Components.ActionMap import ActionMap
                from Components.Button import Button
 
index 3c02ee9..698890d 100644 (file)
@@ -26,6 +26,8 @@ class OSD3DSetupScreen(Screen, ConfigListScreen):
                self.skin = OSD3DSetupScreen.skin
                Screen.__init__(self, session)
 
+               self.setTitle(_("OSD 3D setup"))
+
                from Components.ActionMap import ActionMap
                from Components.Button import Button
 
index e3f106b..7b5ae8c 100644 (file)
@@ -15,6 +15,8 @@ class SecParameterSetup(Screen, ConfigListScreen):
        def __init__(self, session):
                self.skin = SecParameterSetup.skin
 
+               self.setTitle(_("Satellite equipment setup"))
+
                self["actions"] = ActionMap(["SetupActions", "MenuActions"],
                {
                        "ok": self.keySave,
index 64c2a66..f27b4c0 100644 (file)
@@ -18,8 +18,7 @@ SKINXML = "skin.xml"
 DEFAULTSKIN = "<Default Skin>"
 
 class SkinSelector(Screen):
-       # for i18n:
-       # _("Choose your Skin")
+
        skinlist = []
        root = os.path.join(eEnv.resolve("${datadir}"),"enigma2")
 
@@ -27,6 +26,8 @@ class SkinSelector(Screen):
 
                Screen.__init__(self, session)
 
+               self.setTitle(_("Select your Skin"))
+
                self.skinlist = []
                self.previewPath = ""
                if os.path.exists(os.path.join(self.root, SKINXML)):
@@ -100,7 +101,7 @@ class SkinSelector(Screen):
 
                print "Skinselector: Selected Skin: "+self.root+self.skinfile
                restartbox = self.session.openWithCallback(self.restartGUI,MessageBox,_("GUI needs a restart to apply a new skin\nDo you want to restart the GUI now?"), MessageBox.TYPE_YESNO)
-               restartbox.setTitle(_("Restart GUI now?"))
+               restartbox.setTitle(_("Restart GUI"))
 
        def loadPreview(self):
                if self["SkinList"].getCurrent() == DEFAULTSKIN:
@@ -128,9 +129,9 @@ def SkinSelMain(session, **kwargs):
 
 def SkinSelSetup(menuid, **kwargs):
        if menuid == "system":
-               return [(_("Skin"), SkinSelMain, "skin_selector", None)]
+               return [(_("Skin selector"), SkinSelMain, "skin_selector", None)]
        else:
                return []
 
 def Plugins(**kwargs):
-       return PluginDescriptor(name="Skinselector", description="Select Your Skin", where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=SkinSelSetup)
+       return PluginDescriptor(name="Skin selector", description= _("Select your Skin"), where = PluginDescriptor.WHERE_MENU, needsRestart = False, fnc=SkinSelSetup)
index 3132420..ac8f105 100644 (file)
@@ -12,7 +12,7 @@ from Components.FanControl import fancontrol
 
 class TempFanControl(Screen, ConfigListScreen):
        skin = """
-               <screen position="center,center" size="570,420" title="Fan Control" >
+               <screen position="center,center" size="570,420" title="Temperature and fan control" >
                        <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
                        <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
                        <ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" />
@@ -94,6 +94,8 @@ class TempFanControl(Screen, ConfigListScreen):
        def __init__(self, session, args = None):
                Screen.__init__(self, session)
 
+               self.setTitle(_("Temperature and fan control"))
+
                templist = sensors.getSensorsList(sensors.TYPE_TEMPERATURE)
                tempcount = len(templist)
                fanlist = sensors.getSensorsList(sensors.TYPE_FAN_RPM)
index 53d4c04..971e866 100644 (file)
@@ -22,6 +22,8 @@ class VideoClippingCoordinates(Screen, ConfigListScreen):
                self.skin = VideoClippingCoordinates.skin
                Screen.__init__(self, session)
 
+               self.setTitle(_("Video clipping setup"))
+
                from Components.ActionMap import ActionMap
                from Components.Button import Button
 
@@ -124,6 +126,6 @@ def Plugins(**kwargs):
        from os import path
        if path.exists("/proc/stb/vmpeg/0/clip_left"):
                from Plugins.Plugin import PluginDescriptor
-               return [PluginDescriptor(name = "Video clipping setup", description = "clip overscan / letterbox borders", where = PluginDescriptor.WHERE_PLUGINMENU, fnc = main),
+               return [PluginDescriptor(name = _("Video clipping setup"), description = _("clip overscan / letterbox borders"), where = PluginDescriptor.WHERE_PLUGINMENU, fnc = main),
                                        PluginDescriptor(name = "Video clipping  setup", description = "", where = PluginDescriptor.WHERE_SESSIONSTART, fnc = startup)]
        return []
index 0099fd0..a3fdf6c 100644 (file)
@@ -21,6 +21,7 @@ import skin
 class About(Screen):
        def __init__(self, session):
                Screen.__init__(self, session)
+               self.setTitle(_("About"))
                hddsplit, = skin.parameters.get("AboutHddSplit", (0,))
 
                AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n"
index 427972f..e57ec81 100644 (file)
@@ -36,6 +36,7 @@ class EPGSelection(Screen):
 
        def __init__(self, session, service, zapFunc=None, eventid=None, bouquetChangeCB=None, serviceChangeCB=None):
                Screen.__init__(self, session)
+               self.setTitle(_("EPG Selection"))
                self.bouquetChangeCB = bouquetChangeCB
                self.serviceChangeCB = serviceChangeCB
                self.ask_time = -1 #now
index 9491dd2..566df46 100644 (file)
@@ -26,7 +26,7 @@ class NetworkAdapterSelection(Screen,HelpableScreen):
        def __init__(self, session):
                Screen.__init__(self, session)
                HelpableScreen.__init__(self)
-
+               self.setTitle(_("Select a network adapter"))
                self.wlan_errortext = _("No working wireless network adapter found.\nPlease verify that you have attached a compatible WLAN device and your network is configured correctly.")
                self.lan_errortext = _("No working local network adapter found.\nPlease verify that you have attached a network cable and your network is configured correctly.")
                self.oktext = _("Press OK on your remote control to continue.")
@@ -215,6 +215,7 @@ class NameserverSetup(Screen, ConfigListScreen, HelpableScreen):
        def __init__(self, session):
                Screen.__init__(self, session)
                HelpableScreen.__init__(self)
+               self.setTitle(_("Configure nameservers"))
                self.backupNameserverList = iNetwork.getNameserverList()[:]
                print "backup-list:", self.backupNameserverList
 
@@ -361,6 +362,7 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen):
                self["HelpWindow"].hide()
 
        def layoutFinished(self):
+               self.setTitle(_("Network setup"))
                self["DNS1"].setText(self.primaryDNS.getText())
                self["DNS2"].setText(self.secondaryDNS.getText())
                if self.ipConfigEntry.getText() is not None:
@@ -372,7 +374,7 @@ class AdapterSetup(Screen, ConfigListScreen, HelpableScreen):
                        self["IP"].setText(_("N/A"))
                if self.netmaskConfigEntry.getText() is not None:
                        if self.netmaskConfigEntry.getText() == "0.0.0.0":
-                                       self["Mask"].setText(_("N/A"))
+                               self["Mask"].setText(_("N/A"))
                        else:
                                self["Mask"].setText(self.netmaskConfigEntry.getText())
                else:
@@ -788,6 +790,7 @@ class AdapterSetupConfiguration(Screen, HelpableScreen):
                self.loadDescription()
 
        def layoutFinished(self):
+               self.setTitle(_("Network configuration"))
                idx = 0
                self["menulist"].moveToIndex(idx)
                self.loadDescription()
index b828945..d046257 100644 (file)
@@ -69,6 +69,8 @@ class ServiceInfo(Screen):
        def __init__(self, session, serviceref=None):
                Screen.__init__(self, session)
 
+               self.setTitle(_("Service Info"))
+
                self["actions"] = ActionMap(["OkCancelActions", "ColorActions"],
                {
                        "ok": self.close,
index e38933a..075121f 100644 (file)
@@ -16,6 +16,7 @@ class SubservicesQuickzap(InfoBarBase, InfoBarShowHide, InfoBarMenu, \
 
        def __init__(self, session, subservices):
                Screen.__init__(self, session)
+               self.setTitle(_("Subservices"))
                for x in InfoBarBase, InfoBarShowHide, InfoBarMenu, \
                                InfoBarInstantRecord, InfoBarSeek, InfoBarTimeshift, \
                                InfoBarTimeshiftState, InfoBarSubtitleSupport, \
index 1c9e228..20305e1 100644 (file)
@@ -18,6 +18,7 @@ class JobView(InfoBarNotifications, Screen, ConfigListScreen):
                ConfigListScreen.__init__(self, [])
                self.parent = parent
                self.job = job
+               self.setTitle(_("Job overview"))
 
                self["job_name"] = StaticText(job.name)
                self["job_progress"] = Progress()
index ba6c2bf..5305b56 100644 (file)
@@ -10,6 +10,7 @@ import datetime
 class TimeDateInput(Screen, ConfigListScreen):
        def __init__(self, session, config_time=None, config_date=None):
                Screen.__init__(self, session)
+               self.setTitle(_("Date/time input"))
                self["oktext"] = Label(_("OK"))
                self["canceltext"] = Label(_("Cancel"))
                self["ok"] = Pixmap()
index ede08f9..ac85559 100644 (file)
@@ -28,6 +28,7 @@ class VirtualKeyBoard(Screen):
 
        def __init__(self, session, title="", **kwargs):
                Screen.__init__(self, session)
+               self.setTitle(_("Virtual keyboard"))
                self.keys_list = []
                self.shiftkeys_list = []
                self.lang = language.getLanguage()
index ff19cf1..5000224 100644 (file)
@@ -416,6 +416,7 @@ eServiceMP3::eServiceMP3(eServiceReference ref):
        m_paused = false;
        m_seek_paused = false;
        m_cuesheet_loaded = false; /* cuesheet CVR */
+       m_user_paused = false;
 #if GST_VERSION_MAJOR >= 1
        m_use_chapter_entries = false; /* TOC chapter support CVR */
        m_last_seek_pos = 0; /* CVR last seek position */
@@ -755,7 +756,7 @@ RESULT eServiceMP3::start()
        {
                eDebug("[eServiceMP3] starting pipeline");
                GstStateChangeReturn ret;
-               ret = gst_element_set_state (m_gst_playbin, GST_STATE_PLAYING);
+               ret = gst_element_set_state (m_gst_playbin, GST_STATE_PAUSED);
 
                switch(ret)
                {
@@ -1752,6 +1753,7 @@ void eServiceMP3::gstBusCall(GstMessage *msg)
                                {
                                        if ( m_sourceinfo.is_streaming && m_streamingsrc_timeout )
                                                m_streamingsrc_timeout->stop();
+                                       m_user_paused = false;
                                        m_paused = false;
                                        if (m_seek_paused)
                                        {
@@ -1763,6 +1765,7 @@ void eServiceMP3::gstBusCall(GstMessage *msg)
                                }       break;
                                case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
                                {
+                                       m_user_paused = true;
                                        m_paused = true;
                                }       break;
                                case GST_STATE_CHANGE_PAUSED_TO_READY:
@@ -2035,6 +2038,8 @@ void eServiceMP3::gstBusCall(GstMessage *msg)
                                if (m_errorInfo.missing_codec.find("video/") == 0 || (m_errorInfo.missing_codec.find("audio/") == 0 && m_audioStreams.empty()))
                                        m_event((iPlayableService*)this, evUser+12);
                        }
+                       if(!m_user_paused)
+                               gst_element_set_state (m_gst_playbin, GST_STATE_PLAYING);
                        break;
                }
                case GST_MESSAGE_ELEMENT:
index 1f21efd..55df3f7 100644 (file)
@@ -303,6 +303,7 @@ private:
        bool m_seek_paused;
        /* cuesheet load check */
        bool m_cuesheet_loaded;
+       bool m_user_paused;
        /* servicemMP3 chapter TOC support CVR */
 #if GST_VERSION_MAJOR >= 1
        bool m_use_chapter_entries;
index d709850..f30f5c2 100644 (file)
--- a/mytest.py
+++ b/mytest.py
@@ -224,7 +224,7 @@ class Session:
                self.current_dialog.restoreKeyboardMode()
                self.current_dialog.hide()
 
-               if last:
+               if last and self.summary is not None:
                        self.current_dialog.removeSummary(self.summary)
                        self.popSummary()
 
@@ -236,12 +236,13 @@ class Session:
                screen.doClose()
 
        def instantiateSummaryDialog(self, screen, **kwargs):
-               self.pushSummary()
-               summary = screen.createSummary() or SimpleSummary
-               arguments = (screen,)
-               self.summary = self.doInstantiateDialog(summary, arguments, kwargs, self.summary_desktop)
-               self.summary.show()
-               screen.addSummary(self.summary)
+               if self.summary_desktop is not None:
+                       self.pushSummary()
+                       summary = screen.createSummary() or SimpleSummary
+                       arguments = (screen,)
+                       self.summary = self.doInstantiateDialog(summary, arguments, kwargs, self.summary_desktop)
+                       self.summary.show()
+                       screen.addSummary(self.summary)
 
        def doInstantiateDialog(self, screen, arguments, kwargs, desktop):
                # create dialog
@@ -312,8 +313,8 @@ class Session:
        def pushSummary(self):
                if self.summary is not None:
                        self.summary.hide()
-               self.summary_stack.append(self.summary)
-               self.summary = None
+                       self.summary_stack.append(self.summary)
+                       self.summary = None
 
        def popSummary(self):
                if self.summary is not None: