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

⌈⌋ branch:  streamtuner2


Check-in [b4fb10f598]

Overview
Comment:If enabling https/certifi doesn't seem to work, just suppress ssl warnings.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:b4fb10f5980df949b06a6133b80df24bdf1c096b
User & Date: mario on 2020-05-18 12:58:41
Other Links: manifest | tags
Context
2020-05-18
12:59
Apply absolute path for icon pixmap check-in: 043ec4351b user: mario tags: trunk
12:58
If enabling https/certifi doesn't seem to work, just suppress ssl warnings. check-in: b4fb10f598 user: mario tags: trunk
12:58
Add notes on deprecations. check-in: c032acbb92 user: mario tags: trunk
Changes

Modified ahttp.py from [fc85eaddb9] to [e3550d5d4c].

24
25
26
27
28
29
30










31
32
33
34
35
36
37
..
46
47
48
49
50
51
52


53
54
55
56
57
58
59
    httplib.HTTPConnection.debuglevel = 1
    logging.basicConfig() 
    logging.getLogger().setLevel(logging.DEBUG)
    requests_log = logging.getLogger("requests.packages.urllib3")
    requests_log.setLevel(logging.DEBUG)
    requests_log.propagate = True











#-- hooks to progress meter and status bar in main window
feedback = None

# Sets either text or percentage of main windows' status bar.
#
# Can either take a float parameter (e.g. 0.99 for % indicator)
# or text message. Alternatively two parameters to update both.
................................................................................
  if feedback:
    try: [feedback(d, timeout=timeout) for d in args]
    except: pass


# prepare default query object
session = requests.Session()


# default HTTP headers for requests
session.headers.update({
    "User-Agent": "streamtuner2/2.2 (X11; Linux amd64; rv:52.0) like WinAmp/2.1",
    "Accept": "*/*",
    "Accept-Language": "en-US,en,de,es,fr,it,*;q=0.1",
    "Accept-Encoding": "gzip, deflate",
    "Accept-Charset": "UTF-8, ISO-8859-1;q=0.5, *;q=0.1",







>
>
>
>
>
>
>
>
>
>







 







>
>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
..
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
    httplib.HTTPConnection.debuglevel = 1
    logging.basicConfig() 
    logging.getLogger().setLevel(logging.DEBUG)
    requests_log = logging.getLogger("requests.packages.urllib3")
    requests_log.setLevel(logging.DEBUG)
    requests_log.propagate = True

#-- ssl
try:
    import certifi
    from requests.packages.urllib3.exceptions import InsecureRequestWarning
    ca_certs = certifi.where()
    requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
except Exception as e:
    log.WARN("No SSL support. Try `sudo pip install urllib3[secure] certifi`", e)
    ca_certs = False

#-- hooks to progress meter and status bar in main window
feedback = None

# Sets either text or percentage of main windows' status bar.
#
# Can either take a float parameter (e.g. 0.99 for % indicator)
# or text message. Alternatively two parameters to update both.
................................................................................
  if feedback:
    try: [feedback(d, timeout=timeout) for d in args]
    except: pass


# prepare default query object
session = requests.Session()
session.verify = ca_certs
#log.SESS(session.__dict__)
# default HTTP headers for requests
session.headers.update({
    "User-Agent": "streamtuner2/2.2 (X11; Linux amd64; rv:52.0) like WinAmp/2.1",
    "Accept": "*/*",
    "Accept-Language": "en-US,en,de,es,fr,it,*;q=0.1",
    "Accept-Encoding": "gzip, deflate",
    "Accept-Charset": "UTF-8, ISO-8859-1;q=0.5, *;q=0.1",