The branch, gotham has been updated via d87f6e8278ee85be93a416a9a61709e30c4b4e97 (commit) from d9115eec79c4711f740d8cdbf0f47955d3755b36 (commit)
- Log ----------------------------------------------------------------- http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=d87f6e8278ee85be93a416a9a61709e30c4b4e97 commit d87f6e8278ee85be93a416a9a61709e30c4b4e97 Author: Martijn Kaijser <mcm.kaij...@gmail.com> Date: Tue Aug 19 18:47:57 2014 +0200 [script.xbmc.lcdproc] 2.5.1 diff --git a/script.xbmc.lcdproc/addon.xml b/script.xbmc.lcdproc/addon.xml index 04e9231..984ff64 100644 --- a/script.xbmc.lcdproc/addon.xml +++ b/script.xbmc.lcdproc/addon.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<addon id="script.xbmc.lcdproc" name="XBMC LCDproc" version="2.5.0" provider-name="Team XBMC: Memphiz, Daniel 'herrnst' Scheller"> +<addon id="script.xbmc.lcdproc" name="XBMC LCDproc" version="2.5.1" provider-name="Team XBMC: Memphiz, Daniel 'herrnst' Scheller"> <requires> <import addon="xbmc.python" version="2.14.0"/> <import addon="xbmc.addon" version="12.0.0"/> diff --git a/script.xbmc.lcdproc/changelog.txt b/script.xbmc.lcdproc/changelog.txt index 27e39fe..61eeba8 100644 --- a/script.xbmc.lcdproc/changelog.txt +++ b/script.xbmc.lcdproc/changelog.txt @@ -1,3 +1,7 @@ +2.5.1 +- Fix name conflict with the LCDproc PyEgg +- Split setup command list loop to initialise hbars before icons, fixes progress bars not being shown if placed after any icons on RasbPi +- Fix charset encoding exceptions on LCD.xml load if it contains UTF8 chars 2.5.0 (Gotham) - Initial version for XBMC Gotham with updated dependencies - BBcode tags are stripped before sending content to the display (reported to happen on e.g. OpenELEC) diff --git a/script.xbmc.lcdproc/lcdmain.py b/script.xbmc.lcdproc/lcdmain.py index 182a259..08c7f4b 100644 --- a/script.xbmc.lcdproc/lcdmain.py +++ b/script.xbmc.lcdproc/lcdmain.py @@ -32,7 +32,7 @@ __icon__ = os.path.join(__cwd__,"icon.png") __scriptname__ = "XBMC LCDproc" BASE_RESOURCE_PATH = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'lib' ) ) -sys.path.append (BASE_RESOURCE_PATH) +sys.path.insert(0, BASE_RESOURCE_PATH) from settings import * from lcdproc import * diff --git a/script.xbmc.lcdproc/resources/lib/lcdbase.py b/script.xbmc.lcdproc/resources/lib/lcdbase.py index e684eb5..dcfdbe8 100644 --- a/script.xbmc.lcdproc/resources/lib/lcdbase.py +++ b/script.xbmc.lcdproc/resources/lib/lcdbase.py @@ -389,7 +389,8 @@ class LcdBase(): if line.text == None: linetext = "" else: - linetext = str(line.text).strip() + # prepare text line for XBMC's expected encoding + linetext = line.text.strip().encode(self.m_strInfoLabelEncoding, "ignore") # make sure linetext has something so re.match won't fail if linetext != "": @@ -405,7 +406,7 @@ class LcdBase(): return # progressbar line if InfoLabel exists - if str(linetext).lower().find("$info[lcd.progressbar]") >= 0: + if linetext.lower().find("$info[lcd.progressbar]") >= 0: linedescriptor['type'] = LCD_LINETYPE.LCD_LINETYPE_PROGRESS linedescriptor['endx'] = int(self.m_iCellWidth) * int(self.m_iColumns) @@ -415,32 +416,32 @@ class LcdBase(): linedescriptor['endx'] = int(self.m_iCellWidth) * (int(self.GetColumns()) - 2) # textline with icon in front - elif str(linetext).lower().find("$info[lcd.playicon]") >= 0: + elif linetext.lower().find("$info[lcd.playicon]") >= 0: linedescriptor['type'] = LCD_LINETYPE.LCD_LINETYPE_ICONTEXT linedescriptor['startx'] = int(1 + self.m_iIconTextOffset) # icon widgets take 2 chars, so shift text offset (default: 2) # support Python < 2.7 (e.g. Debian Squeeze) if self.m_vPythonVersion < (2, 7): - linedescriptor['text'] = str(re.sub(r'\s?' + re.escape("$INFO[LCD.PlayIcon]") + '\s?', ' ', str(linetext))).strip() + linedescriptor['text'] = re.sub(r'\s?' + re.escape("$INFO[LCD.PlayIcon]") + '\s?', ' ', linetext).strip() else: - linedescriptor['text'] = str(re.sub(r'\s?' + re.escape("$INFO[LCD.PlayIcon]") + '\s?', ' ', str(linetext), flags=re.IGNORECASE)).strip() + linedescriptor['text'] = re.sub(r'\s?' + re.escape("$INFO[LCD.PlayIcon]") + '\s?', ' ', linetext, flags=re.IGNORECASE).strip() # standard (scrolling) text line else: linedescriptor['type'] = LCD_LINETYPE.LCD_LINETYPE_TEXT - linedescriptor['text'] = str(linetext) + linedescriptor['text'] = linetext # check for alignment pseudo-labels - if str(linetext).lower().find("$info[lcd.aligncenter]") >= 0: + if linetext.lower().find("$info[lcd.aligncenter]") >= 0: linedescriptor['align'] = LCD_LINEALIGN.LCD_LINEALIGN_CENTER - if str(linetext).lower().find("$info[lcd.alignright]") >= 0: + if linetext.lower().find("$info[lcd.alignright]") >= 0: linedescriptor['align'] = LCD_LINEALIGN.LCD_LINEALIGN_RIGHT if self.m_vPythonVersion < (2, 7): - linedescriptor['text'] = str(re.sub(r'\s?' + re.escape("$INFO[LCD.AlignCenter]") + '\s?', ' ', linedescriptor['text'])).strip() - linedescriptor['text'] = str(re.sub(r'\s?' + re.escape("$INFO[LCD.AlignRight]") + '\s?', ' ', linedescriptor['text'])).strip() + linedescriptor['text'] = re.sub(r'\s?' + re.escape("$INFO[LCD.AlignCenter]") + '\s?', ' ', linedescriptor['text']).strip() + linedescriptor['text'] = re.sub(r'\s?' + re.escape("$INFO[LCD.AlignRight]") + '\s?', ' ', linedescriptor['text']).strip() else: - linedescriptor['text'] = str(re.sub(r'\s?' + re.escape("$INFO[LCD.AlignCenter]") + '\s?', ' ', linedescriptor['text'], flags=re.IGNORECASE)).strip() - linedescriptor['text'] = str(re.sub(r'\s?' + re.escape("$INFO[LCD.AlignRight]") + '\s?', ' ', linedescriptor['text'], flags=re.IGNORECASE)).strip() + linedescriptor['text'] = re.sub(r'\s?' + re.escape("$INFO[LCD.AlignCenter]") + '\s?', ' ', linedescriptor['text'], flags=re.IGNORECASE).strip() + linedescriptor['text'] = re.sub(r'\s?' + re.escape("$INFO[LCD.AlignRight]") + '\s?', ' ', linedescriptor['text'], flags=re.IGNORECASE).strip() self.m_lcdMode[mode].append(linedescriptor) diff --git a/script.xbmc.lcdproc/resources/lib/lcdproc.py b/script.xbmc.lcdproc/resources/lib/lcdproc.py index eb54ee3..55fa51e 100644 --- a/script.xbmc.lcdproc/resources/lib/lcdproc.py +++ b/script.xbmc.lcdproc/resources/lib/lcdproc.py @@ -161,7 +161,7 @@ class LCDProc(LcdBase): # Initialize command list var strInitCommandList = "" - # Setup widgets + # Setup widgets (scrollers and hbars first) for i in range(1,int(self.m_iRows)+1): # Text widgets strInitCommandList += "widget_add xbmc lineScroller" + str(i) + " scroller\n" @@ -172,14 +172,17 @@ class LCDProc(LcdBase): # Reset bars to zero strInitCommandList += "widget_set xbmc lineProgress" + str(i) + " 0 0 0\n" + self.m_strLineText[i-1] = "" + self.m_strLineType[i-1] = "" + + # Setup icons last + for i in range(1,int(self.m_iRows)+1): # Icons strInitCommandList += "widget_add xbmc lineIcon" + str(i) + " icon\n" # Default icon strInitCommandList += "widget_set xbmc lineIcon" + str(i) + " 0 0 BLOCK_FILLED\n" - self.m_strLineText[i-1] = "" - self.m_strLineType[i-1] = "" self.m_strLineIcon[i-1] = "" for i in range(1,int(self.m_iBigDigits + 1)): ----------------------------------------------------------------------- Summary of changes: script.xbmc.lcdproc/addon.xml | 2 +- script.xbmc.lcdproc/changelog.txt | 4 ++++ script.xbmc.lcdproc/lcdmain.py | 2 +- script.xbmc.lcdproc/resources/lib/lcdbase.py | 25 +++++++++++++------------ script.xbmc.lcdproc/resources/lib/lcdproc.py | 9 ++++++--- 5 files changed, 25 insertions(+), 17 deletions(-) hooks/post-receive -- Scripts ------------------------------------------------------------------------------ _______________________________________________ Xbmc-addons mailing list Xbmc-addons@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xbmc-addons