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

⌈⌋ branch:  streamtuner2


Diff

Differences From Artifact [1b0bc1277f]:

To Artifact [1418a05152]:


147
148
149
150
151
152
153

154



155
156
157
158
159
160
161
147
148
149
150
151
152
153
154

155
156
157
158
159
160
161
162
163
164







+
-
+
+
+






                f = gzip.open(file+".gz", "w")
                if os.path.exists(file):
                    os.unlink(file)
            else:
                f = open(file, "w")
            # encode
            data = json.dumps(data, indent=(4 if nice else None))
            try:
            f.write(data.encode("utf-8"))
                f.write(data.encode("utf-8"))
            except TypeError as e:
                f.write(data)  # Python3 sometimes wants to write strings rather than bytes
            f.close()


        # retrieve data from config file            
        def load(self, name):
            name = name + ".json"
            file = self.dir + "/" + name