2018-01-08, 12:38
Ok I can give you the requested changes directly here, no problem...
1) default.py & standalone.py, latest addon version, line 99+
change to something like this:
Reason: Skin's metadata provision has several resolutions and getting the first (with a slice) does not mean it will be correct for any given setup. Parenthesis is also redundant.
Second requested change:
Ability to set a banner/thumbnail/logo/whatever at top left or top right corner corner. Spacing can be 20 or 30 pixels for example from each edge. It can also be a remote url, I suppose.
Finally, be able to set a single image via the settings:
Example of settings.xml
Additionally, I 'd like to provide Greek translation. But this when you complete your changes.
1) default.py & standalone.py, latest addon version, line 99+
Code:
def _get_skin_resolution(self):
xmlFile = os.path.join(xbmc.translatePath("special://skin/"), "addon.xml")
xmldoc = minidom.parse(xmlFile)
res = xmldoc.getElementsByTagName("res")
xval = int(res[0].attributes["width"].value)
yval = int(res[0].attributes["height"].value)
return(xval, yval)
Code:
def _get_skin_resolution(self):
xval = xbmc.getInfoLabel('System.ScreenWidth')
yval = xbmc.getInfoLabel('System.ScreenHeight')
return int(xval), int(yval)
Reason: Skin's metadata provision has several resolutions and getting the first (with a slice) does not mean it will be correct for any given setup. Parenthesis is also redundant.
Second requested change:
Ability to set a banner/thumbnail/logo/whatever at top left or top right corner corner. Spacing can be 20 or 30 pixels for example from each edge. It can also be a remote url, I suppose.
Finally, be able to set a single image via the settings:
Example of settings.xml
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
<category label="30000">
<setting id="on" label="30001" type="bool" default="true"/>
<setting id="changetime" label="30002" type="slider" default="30" range="5,5,120" option="int"/>
<setting id="cyclepause" label="30004" type="slider" default="30" range="0,10,240" option="int"/>
<setting id="bannerpos" label="30003" type="enum" lvalues="30011|30012" default="1"/>
<setting id="yoffset" label="30006" type="slider" default="15" range="0,5,40" option="int"/>
<setting id="random" label="30005" type="bool" default="false"/>
<setting id="single_file" label="Set just a single file for display" type="bool" default="false"/>
<setting id="image_file" label="Image file" type="file" default="" visible="eq(-1,true)"/>
</category>
</settings>
Additionally, I 'd like to provide Greek translation. But this when you complete your changes.