Skip to content

Commit

Permalink
add no_reload param
Browse files Browse the repository at this point in the history
  • Loading branch information
jurialmunkey committed Jul 16, 2022
1 parent af43e9d commit 5714799
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon id="script.skinvariables"
version="1.0.3"
version="1.0.4"
name="Skin Variables"
provider-name="jurialmunkey">
<requires>
Expand Down
5 changes: 1 addition & 4 deletions resources/lib/fileutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def write_file(filepath=None, content=None):
f.close()


def write_skinfile(filename=None, folders=None, content=None, hashvalue=None, hashname=None, reloadskin=True, checksum=None):
def write_skinfile(filename=None, folders=None, content=None, hashvalue=None, hashname=None, checksum=None):
if not filename or not folders or not content:
return

Expand All @@ -48,6 +48,3 @@ def write_skinfile(filename=None, folders=None, content=None, hashvalue=None, ha

if checksum:
xbmc.executebuiltin('Skin.SetString({},{})'.format(checksum, make_hash(content)))

if reloadskin:
xbmc.executebuiltin('ReloadSkin()')
3 changes: 2 additions & 1 deletion resources/lib/skinvariables.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def get_skinvariable(self, variable, expression=False):
skin_vars.append(build_var)
return skin_vars

def update_xml(self, force=False, skinfolder=None, **kwargs):
def update_xml(self, force=False, skinfolder=None, no_reload=False, **kwargs):
if not self.meta:
return

Expand Down Expand Up @@ -170,3 +170,4 @@ def update_xml(self, force=False, skinfolder=None, **kwargs):
hashvalue=hashvalue, hashname='script-skinvariables-hash')

p_dialog.close()
xbmc.executebuiltin('ReloadSkin()') if not no_reload else None
3 changes: 2 additions & 1 deletion resources/lib/viewtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def xmlfile_exists(self, skinfolder=None, hashname='script-skinviewtypes-checksu
return False
return True

def update_xml(self, force=False, skinfolder=None, contentid=None, viewid=None, pluginname=None, configure=False, **kwargs):
def update_xml(self, force=False, skinfolder=None, contentid=None, viewid=None, pluginname=None, configure=False, no_reload=False, **kwargs):
if not self.meta:
return

Expand Down Expand Up @@ -323,3 +323,4 @@ def update_xml(self, force=False, skinfolder=None, contentid=None, viewid=None,

if makexml or not self.xmlfile_exists(skinfolder):
self.make_xmlfile(skinfolder=skinfolder, hashvalue=hashvalue)
xbmc.executebuiltin('ReloadSkin()') if not no_reload else None

0 comments on commit 5714799

Please sign in to comment.