Skip to content

Commit

Permalink
Merge pull request #66 from anxdpanic/dev
Browse files Browse the repository at this point in the history
2.0.0~alpha8
  • Loading branch information
anxdpanic authored Sep 3, 2021
2 parents c4b890f + c89d7cd commit 7477c9c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.skinshortcuts" name="Skin Shortcuts" version="2.0.0~alpha7" provider-name="BigNoid, marcelveldt, SiLVO">
<addon id="script.skinshortcuts" name="Skin Shortcuts" version="2.0.0~alpha8" provider-name="BigNoid, marcelveldt, SiLVO">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.unidecode" version="1.1.1+matrix.2"/>
Expand Down
12 changes: 6 additions & 6 deletions resources/lib/skinshorcuts/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1469,23 +1469,23 @@ def onClick(self, control_id): # pylint: disable=invalid-name
restore_items = []

# Save the labelID list from DATA
original_label_id_list = self.data_func.labelIDList
self.data_func.labelIDList = []
original_label_id_list = self.data_func.label_id_list
self.data_func.label_id_list = []

# Get a list of all shortcuts that were originally in the menu and
# restore labelIDList
# restore label_id_list
self.data_func.clear_label_id()
shortcuts = self.data_func.get_shortcuts(self.group,
default_group=self.default_group,
defaults_only=True)
self.data_func.labelIDList = original_label_id_list
self.data_func.label_id_list = original_label_id_list

for shortcut in shortcuts.getroot().findall("shortcut"):
# Parse the shortcut
item = self._parse_shortcut(shortcut)

# Check if a shortcuts labelID is already in the list
if item[1].getProperty("labelID") not in self.data_func.labelIDList:
if item[1].getProperty("labelID") not in self.data_func.label_id_list:
restore_pretty.append(self.lib_func.create(
["", item[1].getLabel(), item[1].getLabel2(), {
"icon": item[1].getProperty("icon")
Expand All @@ -1510,7 +1510,7 @@ def onClick(self, control_id): # pylint: disable=invalid-name

# We now have our shortcut to return. Add it to self.all_list_items and labelID list
self.all_list_items.append(restore_items[restore_shortcut])
self.data_func.labelIDList.append(
self.data_func.label_id_list.append(
restore_items[restore_shortcut].getProperty("labelID")
)

Expand Down
2 changes: 1 addition & 1 deletion resources/lib/skinshorcuts/xmlfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def writexml(self, profilelist, mainmenu_id, groups, num_levels, build_mode,
self.data_func.clear_label_id()

# Clear any additional properties, which may be for a different profile
self.data_func.currentProperties = None
self.data_func.current_properties = None

# Create objects to hold the items
menuitems = []
Expand Down

0 comments on commit 7477c9c

Please sign in to comment.