| -rw-r--r-- | print_xmmsv | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/print_xmmsv b/print_xmmsv index 3cc48d5..f55aa8a 100644 --- a/print_xmmsv +++ b/print_xmmsv @@ -34,11 +34,12 @@ class XmmsValue (object): def parse_dict(self, val): result = {} try: + # old style dict lst = val["flatlist"]["list"] for x in range(0, val["flatlist"]["size"], 2): - result[str(lst[x])] = self.parse_value(lst[x+1]) - self.print_value(lst[x+1]) + result[self.parse_value(lst[x])] = self.parse_value(lst[x+1]) except RuntimeError, e: + # new style dict for x in range(0, (1 << int(val["size"]))): entry = val["data"][x] # skip empty and deleted entries |
