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

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [833278b4e6]:

To Artifact [0fccb051e3]:


37
38
39
40
41
42
43

44
45
46
47
48
49
50
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51







+







# Also provides a simple logging interface with log.TYPE(...),
# which is also pre-instantiated.


from __future__ import print_function
import os, glob
import sys
from traceback import format_exc
import json
import gzip
import platform
import re
from compat2and3 import gzip_decode, find_executable, PY2, PY3
import zlib
import zipfile
135
136
137
138
139
140
141
142

143
144
145
146
147
148
149
136
137
138
139
140
141
142

143
144
145
146
147
148
149
150







-
+







            "bookmarks": 1,
            "search": 1,
            "streamedit": 1,
            "configwin": 1,
        }
        self.tmp = os.environ.get("TEMP", "/tmp") + "/streamtuner2"
        self.nothreads = 0
        self.max_streams = "500"
        self.max_streams = 500
        self.internetradio_max_pages = 5
        self.show_bookmarks = 1
        self.show_favicons = 1
        self.load_favicon = 1
        self.heuristic_bookmark_update = 0
        self.retain_deleted = 0
        self.auto_save_appstate = 1
370
371
372
373
374
375
376

377





378
379
380
381
382
383
384
371
372
373
374
375
376
377
378

379
380
381
382
383
384
385
386
387
388
389
390







+
-
+
+
+
+
+







                return
        # color/prefix
        if conf.windows:
            method = "[%s]" % method
        else:
            method = r"[{}[{}]".format(self.colors.get(method.split("_")[0], "47m"), method)
        # output
        print(
        print(method + " " + " ".join([str(a) for a in args]), file=sys.stderr)
            method + " " + " " . join(
                format_exc(a) if isinstance(a, Exception) else str(a) for a in args
            ),
            file=sys.stderr
        )

    # Colors
    colors = {
        "ERR":  "31m",          # red    ERROR
        "INIT": "38;5;196m",    # red    INIT ERROR
        "WARN": "38;5;208m",    # orange WARNING
        "EXEC": "38;5;66m",     # green  EXEC