Skip to content

Commit

Permalink
FIX: Make old-style tags.json compatible again
Browse files Browse the repository at this point in the history
  • Loading branch information
domibarton committed Apr 15, 2020
1 parent 0a2e63e commit fbe9560
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mopidy_pummeluff/actions/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def as_dict(self, include_scanned=False):
:rtype: dict
'''
data = {
'tag_class': self.__class__.__name__,
'action_class': self.__class__.__name__,
'uid': self.uid,
'alias': self.alias or '',
'parameter': self.parameter or '',
Expand Down
3 changes: 3 additions & 0 deletions mopidy_pummeluff/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ def unserialize_item(cls, item):
:return: The action
:rtype: actions.Action
'''
if 'tag_class' in item:
item['action_class'] = item.pop('tag_class')

return item['uid'], cls.init_action(**item)

@classmethod
Expand Down

0 comments on commit fbe9560

Please sign in to comment.