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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [059815af7b]

Overview
Comment:Fix for radionet station/player page change `"streamUrl":` to `"streams":[{"url":`
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 059815af7b3d7735a7b5801630e66920b2642fdf
User & Date: mario on 2020-05-11 16:34:07
Other Links: manifest | tags
Context
2020-05-11
16:35
bump version for radionet plugin check-in: 95e3d5fa0a user: mario tags: trunk
16:34
Fix for radionet station/player page change `"streamUrl":` to `"streams":[{"url":` check-in: 059815af7b user: mario tags: trunk
16:24
Add duplicate filter for Xiph. check-in: 08803f2b56 user: mario tags: trunk
Changes

Modified contrib/radionet.py from [edd29444df] to [bb2c46f76a].

119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
        return r

    # api search is gone, now requires to fetch streamUrl from per-radio homepage
    def resolve_urn(self, row):
        if row.get("url", "-").find("urn:radionet:") != 0:
            return
        html = ahttp.get(row["homepage"])
        stream = re.findall('"streamUrl":\s*"([^"]+)"', html, re.S)
        if stream:
            row["url"] = stream[0]
            return row
    

    # extract JavaScript key from any HTML blob (needed for station query)
    def set_key(self, html):
        ls = re.findall("""apiKey: '(\w+)'""", html)
        if ls:
            self.apiKey = ls[0]










|













119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
        return r

    # api search is gone, now requires to fetch streamUrl from per-radio homepage
    def resolve_urn(self, row):
        if row.get("url", "-").find("urn:radionet:") != 0:
            return
        html = ahttp.get(row["homepage"])
        stream = re.findall('"stream[s:[{"\s]+url"[\s:]+"([^"]+)"', html, re.S|re.I)
        if stream:
            row["url"] = stream[0]
            return row
    

    # extract JavaScript key from any HTML blob (needed for station query)
    def set_key(self, html):
        ls = re.findall("""apiKey: '(\w+)'""", html)
        if ls:
            self.apiKey = ls[0]