Permalink
Browse files

Merge remote-tracking branch 'e2/master'

  • Loading branch information...
2 parents 4825376 + 178e281 commit 306f4ba83d965242b4cfa9d7fe3e03b644c16f49 @andyblac andyblac committed Dec 8, 2013
View
@@ -15,6 +15,7 @@ SUBDIRS = \
birthdayreminder \
bonjour \
cdinfo \
+ channelselectionshorttitle \
curlytx \
dreamexplorer \
dreamirc \
@@ -28,6 +29,7 @@ SUBDIRS = \
epgrefresh \
eurotictv \
eventlist \
+ eventposition \
filebrowser \
flashexpander \
fritzcall \
@@ -0,0 +1,2 @@
+Description: ChannelSelectionShortTitle Converter
+Depends: enigma2
@@ -0,0 +1 @@
+SUBDIRS = src
@@ -0,0 +1,39 @@
+#
+# ChannelSelectionShortTitle - Converter
+#
+# Coded by Dr.Best (c) 2013
+# Support: www.dreambox-tools.info
+# E-Mail: dr.best@dreambox-tools.info
+#
+# This plugin is open source but it is NOT free software.
+#
+# This plugin may only be distributed to and executed on hardware which
+# is licensed by Dream Multimedia GmbH.
+# In other words:
+# It's NOT allowed to distribute any parts of this plugin or its source code in ANY way
+# to hardware which is NOT licensed by Dream Multimedia GmbH.
+# It's NOT allowed to execute this plugin and its source code or even parts of it in ANY way
+# on hardware which is NOT licensed by Dream Multimedia GmbH.
+#
+# If you want to use or modify the code or parts of it,
+# you have to keep MY license and inform me about the modifications by mail.
+#
+
+from Components.Converter.Converter import Converter
+from Components.Element import cached
+from Components.config import config
+
+class ChannelSelectionShortTitle(Converter, object):
+ def __init__(self, type):
+ Converter.__init__(self, type)
+
+ @cached
+ def getText(self):
+ title = self.source.text
+ t = " (%s) " % config.servicelist.lastmode.value.upper()
+ pos = title.find(t)
+ if pos != -1:
+ title = title[pos+len(t):]
+ return title
+
+ text = property(getText)
@@ -0,0 +1,4 @@
+installdir = $(libdir)/enigma2/python/Plugins/SkinComponents/ChannelSelectionShortTitle
+converterinstalldir = $(libdir)/enigma2/python/Components/Converter
+install_DATA = README
+converterinstall_PYTHON = ChannelSelectionShortTitle.py
@@ -0,0 +1,12 @@
+Description: ChannelSelectionShortTitle Converter
+This converter truncates the original title of ChannelSelection --> "title (MODE)" will be cut off
+
+Usage:
+<widget backgroundColor="secondBG" font="Regular;24" position="70,5" render="Label" size="850,80" source="Title" transparent="1" valign="center" zPosition="1">
+ <convert type="ChannelSelectionShortTitle"/>
+</widget>
+
+
+
+
+
View
@@ -256,6 +256,9 @@ cdinfo/Makefile
cdinfo/meta/Makefile
cdinfo/src/Makefile
+channelselectionshorttitle/Makefile
+channelselectionshorttitle/src/Makefile
+
curlytx/Makefile
curlytx/meta/Makefile
curlytx/po/Makefile
@@ -337,6 +340,9 @@ eurotictv/src/Makefile
eventlist/Makefile
eventlist/src/Makefile
+eventposition/Makefile
+eventposition/src/Makefile
+
fancontrol2/Makefile
fancontrol2/meta/Makefile
fancontrol2/po/Makefile
View
@@ -54,23 +54,23 @@ def getContent(self):
return []
curEvent = self.source.getCurrentEvent()
if curEvent:
- self.epgcache.startTimeQuery(eServiceReference(ref.toString()), curEvent.getBeginTime() + curEvent.getDuration())
- i = 1
- while i <= (self.eventcount):
- event = self.epgcache.getNextTimeEntry()
- if event is not None:
- contentList.append(self.getEventTuple(event),)
- i +=1
- if self.primetime == 1:
- now = localtime(time())
- dt = datetime(now.tm_year, now.tm_mon, now.tm_mday, 20, 15)
- if time() > mktime(dt.timetuple()):
- dt += timedelta(days=1) # skip to next day...
- primeTime = int(mktime(dt.timetuple()))
- self.epgcache.startTimeQuery(eServiceReference(ref.toString()), primeTime)
- event = self.epgcache.getNextTimeEntry()
- if event and (event.getBeginTime() <= int(mktime(dt.timetuple()))):
- contentList.append(self.getEventTuple(event),)
+ if not self.epgcache.startTimeQuery(eServiceReference(ref.toString()), curEvent.getBeginTime() + curEvent.getDuration()):
+ i = 1
+ while i <= (self.eventcount):
+ event = self.epgcache.getNextTimeEntry()
+ if event is not None:
+ contentList.append(self.getEventTuple(event),)
+ i +=1
+ if self.primetime == 1:
+ now = localtime(time())
+ dt = datetime(now.tm_year, now.tm_mon, now.tm_mday, 20, 15)
+ if time() > mktime(dt.timetuple()):
+ dt += timedelta(days=1) # skip to next day...
+ primeTime = int(mktime(dt.timetuple()))
+ if not self.epgcache.startTimeQuery(eServiceReference(ref.toString()), primeTime):
+ event = self.epgcache.getNextTimeEntry()
+ if event and (event.getBeginTime() <= int(mktime(dt.timetuple()))):
+ contentList.append(self.getEventTuple(event),)
return contentList
def getEventTuple(self,event):
@@ -0,0 +1,2 @@
+Description: EventPosition Converter using ePositionGauge for event data
+Depends: enigma2
@@ -0,0 +1 @@
+SUBDIRS = src
@@ -0,0 +1,72 @@
+# -*- coding: utf-8 -*-
+#
+# EventPosition - Converter
+#
+# Coded by Dr.Best (c) 2013
+# Support: www.dreambox-tools.info
+# E-Mail: dr.best@dreambox-tools.info
+#
+# This plugin is open source but it is NOT free software.
+#
+# This plugin may only be distributed to and executed on hardware which
+# is licensed by Dream Multimedia GmbH.
+# In other words:
+# It's NOT allowed to distribute any parts of this plugin or its source code in ANY way
+# to hardware which is NOT licensed by Dream Multimedia GmbH.
+# It's NOT allowed to execute this plugin and its source code or even parts of it in ANY way
+# on hardware which is NOT licensed by Dream Multimedia GmbH.
+#
+# If you want to use or modify the code or parts of it,
+# you have to keep MY license and inform me about the modifications by mail.
+#
+
+from Converter import Converter
+from Poll import Poll
+from Components.Element import cached
+from time import time
+
+class EventPosition(Poll, Converter, object):
+ def __init__(self, type):
+ Poll.__init__(self)
+ Converter.__init__(self, type)
+ self.poll_interval = 30*1000
+ self.poll_enabled = True
+
+ @cached
+ def getPosition(self):
+ event = self.source.event
+ if event is None:
+ return None
+ now = int(time())
+ start_time = event.getBeginTime()
+ duration = event.getDuration()
+ if start_time <= now <= (start_time + duration) and duration > 0:
+ return now - start_time
+ else:
+ return 0
+
+ @cached
+ def getLength(self):
+ event = self.source.event
+ if event is None:
+ return None
+ return event.getDuration()
+
+ @cached
+ def getCutlist(self):
+ return []
+
+
+ position = property(getPosition)
+ length = property(getLength)
+ cutlist = property(getCutlist)
+
+
+ def changed(self, what):
+ if what[0] != self.CHANGED_CLEAR:
+ self.downstream_elements.changed(what)
+ if len(self.downstream_elements):
+ if not self.source.event and self.downstream_elements[0].visible:
+ self.downstream_elements[0].visible = False
+ elif self.source.event and not self.downstream_elements[0].visible:
+ self.downstream_elements[0].visible = True
@@ -0,0 +1,4 @@
+installdir = $(libdir)/enigma2/python/Plugins/SkinComponents/EventPosition
+converterinstalldir = $(libdir)/enigma2/python/Components/Converter
+install_DATA = README
+converterinstall_PYTHON = EventPosition.py
View
@@ -0,0 +1,12 @@
+Description: EventPosition Converter using ePositionGauge for event data
+
+Usage example:
+
+<widget pointer="Vali.HD.warp/shinybar.png:8,5" position="235,566" size="100,12" render="PositionGauge" source="session.Event_Now" transparent="1" zPosition="1">
+ <convert type="EventPosition"/>
+</widget>
+
+
+
+
+
@@ -1,5 +1,5 @@
from __init__ import _
-Version = "V2.9r0"
+Version = "V2.9r2"
# globale Variablen
ZielRPM = 0
AktVLT = 0
@@ -163,7 +163,7 @@ def setPWM(fanid, value):
config.plugins.FanControl.MonitorInExtension = ConfigYesNo(default = True)
config.plugins.FanControl.FanControlInExtension = ConfigYesNo(default = True)
config.plugins.FanControl.Multi = ConfigSelection(choices = [("1", "RPM"), ("2", "RPM/2")], default = "2")
-config.plugins.FanControl.EnableThread = ConfigYesNo(default = False)
+config.plugins.FanControl.EnableThread = ConfigYesNo(default = True)
def GetFanRPM():
global RPMread
@@ -944,6 +944,7 @@ def __init__(self,session):
self.dontshutdown = False
self.Recording = False
self.inStandby = False
+ self.HDDidle = True
# RPM PI controller initialization - later
self.RPMController.timer_delay = 10.0
self.RPMController.dt = 10.0
@@ -2,9 +2,9 @@
'''
Created on 30.09.2012
$Author: michael $
-$Revision: 808 $
-$Date: 2013-09-29 18:19:57 +0200 (Sun, 29 Sep 2013) $
-$Id: FritzCallFBF.py 808 2013-09-29 16:19:57Z michael $
+$Revision: 822 $
+$Date: 2013-11-30 16:42:31 +0100 (Sat, 30 Nov 2013) $
+$Id: FritzCallFBF.py 822 2013-11-30 15:42:31Z michael $
'''
# C0111 (Missing docstring)
@@ -73,7 +73,7 @@ def cleanNumber(number):
number = number.replace('(','').replace(')','').replace(' ','').replace('-','')
if number[0] == '+':
number = '00' + number[1:]
- if number.startswith(config.plugins.FritzCall.country.value):
+ if config.plugins.FritzCall.country.value and number.startswith(config.plugins.FritzCall.country.value):
number = '0' + number[len(config.plugins.FritzCall.country.value):]
return number
@@ -1371,17 +1371,18 @@ def _parseFritzBoxPhonebook(self, html):
debug("[FritzCallFBF_05_50] _parseFritzBoxPhonebook: Ignoring entry with empty number for '''%s'''" % (__(name)))
continue
else:
- thisname = name
+ thisname = name.decode('utf-8')
if config.plugins.FritzCall.showType.value and thistypes[i]:
- thisname = thisname + " (" + thistypes[i] + ")"
+ thisname = thisname + " (" + thistypes[i].decode('utf-8') + ")"
if config.plugins.FritzCall.showShortcut.value and thiscodes[i]:
thisname = thisname + ", " + _("Shortcut") + ": " + thiscodes[i]
if config.plugins.FritzCall.showVanity.value and thisvanitys[i]:
thisname = thisname + ", " + _("Vanity") + ": " + thisvanitys[i]
# debug("[FritzCallFBF_05_50] _parseFritzBoxPhonebook: Adding '''%s''' with '''%s'''" % (__(thisname.strip()), __(thisnumber, False)))
+ # debug("[FritzCallFBF_05_50] _parseFritzBoxPhonebook: Adding '''%s''' with '''%s'''" % (thisname.strip(), thisnumber))
# Beware: strings in phonebook.phonebook have to be in utf-8!
- self.phonebook.phonebook[thisnumber] = thisname
+ self.phonebook.phonebook[thisnumber] = thisname.encode('utf-8')
else:
self._notify(_("Could not parse FRITZ!Box Phonebook entry"))
View
@@ -1,10 +1,10 @@
#!/usr/bin/python
# -*- coding: UTF-8 -*-
'''
-$Id: nrzuname.py 800 2013-07-21 12:34:08Z michael $
+$Id: nrzuname.py 824 2013-12-02 16:56:32Z michael $
$Author: michael $
-$Revision: 800 $
-$Date: 2013-07-21 14:34:08 +0200 (Sun, 21 Jul 2013) $
+$Revision: 824 $
+$Date: 2013-12-02 17:56:32 +0100 (Mon, 02 Dec 2013) $
'''
# W0603 (global statement); W0141 (map, filter, etc.)
@@ -161,10 +161,10 @@ def __init__(self, number, outputFunction=out, charset="cp1252", countrycode = "
self.countrycode = countrycode
- if re.match('^\+', self.number):
+ if re.match(r'^\+', self.number):
self.number = '00' + self.number[1:]
- if self.number[:len(countrycode)] == countrycode:
+ if countrycode and self.number[:len(countrycode)] == countrycode:
self.number = '0' + self.number[len(countrycode):]
if number[0] != "0":
@@ -173,6 +173,7 @@ def __init__(self, number, outputFunction=out, charset="cp1252", countrycode = "
return
if self.number[:2] == "00":
+ debug("[ReverseLookupAndNotifier] number %s, %s" %(self.number, self.number[:4]))
if countries.has_key(self.number[:3]): # e.g. USA
self.countrycode = self.number[:3]
elif countries.has_key(self.number[:4]):
@@ -185,16 +186,10 @@ def __init__(self, number, outputFunction=out, charset="cp1252", countrycode = "
self.notifyAndReset()
return
- if countries.has_key(self.countrycode):
- debug("[ReverseLookupAndNotifier] Found website for reverse lookup")
- self.websites = countries[self.countrycode]
- self.nextWebsiteNo = 1
- self.handleWebsite(self.websites[0])
- else:
- debug("[ReverseLookupAndNotifier] Country cannot be reverse handled")
- # self.caller = _("UNKNOWN")
- self.notifyAndReset()
- return
+ debug("[ReverseLookupAndNotifier] Found website for reverse lookup")
+ self.websites = countries[self.countrycode]
+ self.nextWebsiteNo = 1
+ self.handleWebsite(self.websites[0])
def handleWebsite(self, website):
debug("[ReverseLookupAndNotifier] handleWebsite: " + website.getAttribute("name"))
Oops, something went wrong.

0 comments on commit 306f4ba

Please sign in to comment.