Release Banners - (Display ad-banners over full screen video)
#69
(2018-01-08, 12:38)twilight0 Wrote: Ok I can give you the requested changes directly here, no problem...

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)
change to something like this:
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.
 Just tested with getInfoLabel('System.ScreenWidth') and it DOESN'T center the image correctly, while with my code it does... ??
Reply


Messages In This Thread
RE: Banners - by misa - 2016-11-28, 12:18
RE: Banners - by docwra - 2016-11-28, 12:27
RE: Banners - by DjBeNI - 2016-11-28, 14:02
RE: Banners - by User 325245 - 2016-11-28, 15:09
RE: Banners - by DjBeNI - 2016-11-28, 18:27
RE: Banners - by User 325245 - 2016-11-28, 20:13
RE: Banners - by DjBeNI - 2016-11-28, 22:07
RE: Banners - by User 325245 - 2016-11-28, 22:47
RE: Banners - by DjBeNI - 2016-11-28, 23:30
RE: Banners - by User 325245 - 2016-11-29, 00:04
RE: Banners - by User 325245 - 2016-11-29, 11:50
RE: Banners - by User 325245 - 2016-11-30, 11:08
RE: Banners - by misa - 2016-12-06, 17:16
RE: Banners - by User 325245 - 2016-12-06, 19:24
RE: Banners - by misa - 2016-12-06, 20:46
RE: Banners - by User 325245 - 2016-12-06, 22:20
RE: Banners - by User 325245 - 2016-12-07, 09:43
RE: Banners - by misa - 2016-12-07, 10:14
RE: Banners - by User 325245 - 2016-12-09, 15:10
RE: Banners - by User 325245 - 2016-12-11, 01:59
RE: Banners - (Display ad-banners over full screen video) - by User 325245 - 2018-01-09, 11:06
Logout Mark Read Team Forum Stats Members Help
Banners - (Display ad-banners over full screen video)1