Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ branch:  streamtuner2


Diff

Differences From Artifact [1f7ebfaebc]:

To Artifact [759da668d2]:


17
18
19
20
21
22
23




24
25
26
27
28
29
30
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34







+
+
+
+






#  pygtk-objects crawled into the streams[] lists, because rows
#  might have been queried from the widgets.
#


#-- reading and writing json (for the config module)  ----------------------------------

import sys
if sys.version_info > (2, 9):
    unicode = str
    #dict.iteritems = dict.items

# try to load the system module first
try:
        from json import dump as json_dump, load as json_load
except:
        print("no native Python JSON module")
80
81
82
83
84
85
86
87

88
89
90
91
92
93
94
95
96
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100







-
+








        elif type(obj) == unicode:
                return str(obj)
        elif type(obj) in (list, tuple, set):
                obj = list(obj)
                for i,v in enumerate(obj):
                        obj[i] = filter_data(v)
        elif type(obj) == dict:
                for i,v in obj.iteritems():
                for i,v in list(obj.items()):
                        i = filter_data(i)
                        obj[i] = filter_data(v)
        else:
                print("invalid object in data, converting to string: ", type(obj), obj)
                obj = str(obj)
        return obj