Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Aug 22, 2015
2 parents 7d389d2 + 2c2b977 commit 9b5cbf4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
11 changes: 6 additions & 5 deletions resources/lib/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def _parse_shortcut( self, item ):
if additionalProperties is not None:
listitem.setProperty( "additionalListItemProperties", additionalProperties.text )
for property in eval( additionalProperties.text ):
if property[1].startswith("$"):
if property[1].startswith("$") and not property[ 1 ].startswith( "$SKIN" ):
#Translate some listItem properties if needed so they're displayed correctly in the gui
listitem.setProperty(property[0],xbmc.getInfoLabel(property[1]))
else:
Expand Down Expand Up @@ -1606,10 +1606,11 @@ def _add_additionalproperty( self, listitem, propertyName, propertyValue ):
properties.append( [propertyName, DATA.local( propertyValue )[0] ] )

#translate any INFO labels (if needed) so they will be displayed correctly in the gui
if propertyValue.startswith("$"):
listitem.setProperty( propertyName, xbmc.getInfoLabel(propertyValue) )
else:
listitem.setProperty( propertyName, DATA.local( propertyValue )[2] )
if propertyValue:
if propertyValue.startswith("$") and not propertyValue.startswith( "$SKIN" ):
listitem.setProperty( propertyName, xbmc.getInfoLabel(propertyValue) )
else:
listitem.setProperty( propertyName, DATA.local( propertyValue )[2] )

listitem.setProperty( "additionalListItemProperties", repr( properties ) )

Expand Down
7 changes: 4 additions & 3 deletions resources/lib/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from xml.sax.saxutils import escape as escapeXML
from traceback import print_exc
from unidecode import unidecode
from unicodeutils import try_decode
import datafunctions, nodefunctions
DATA = datafunctions.DataFunctions()
NODE = nodefunctions.NodeFunctions()
Expand Down Expand Up @@ -1500,9 +1501,9 @@ def explorer( self, history, location, label, thumbnail, itemType, isWidget = Fa
widgetType = None
addonType = None

dialogLabel = label[0].replace( " >", "" )
dialogLabel = try_decode( label[0] ).replace( " >", "" )
if len( label ) != 1:
dialogLabel = label[0].replace( " >", "" ) + " - " + label[ len( label ) - 1 ].replace( " >", "" )
dialogLabel = try_decode( label[0] ).replace( " >", "" ) + " - " + try_decode( label[ -1 ] ).replace( " >", "" )

listings = []

Expand Down Expand Up @@ -1574,7 +1575,7 @@ def explorer( self, history, location, label, thumbnail, itemType, isWidget = Fa
listitem = self._create( [ item[ "file" ], "%s >" %( item[ "label" ] ), "", {"icon": "DefaultFolder.png", "thumb": thumb} ] )

# Add widget properties
widgetName = label[0].replace( " >", "" ) + " - " + item[ "label" ]
widgetName = try_decode(label[0]).replace( " >", "" ) + " - " + item[ "label" ]
listitem.setProperty( "widget", "Library" )
listitem.setProperty( "widgetName", widgetName )
listitem.setProperty( "widgetType", widgetType )
Expand Down

0 comments on commit 9b5cbf4

Please sign in to comment.