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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [a2142151c0]

Overview
Comment:Better cleaup of regex-extracted entries.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a2142151c05b1939088e6d6a8feb0c38449851bc
User & Date: mario on 2014-05-30 23:21:30
Other Links: manifest | tags
Context
2014-05-30
23:22
New channel module "iCast.io" as seen in VLC lua scripts. (Quite efficient, but station entries of medium quality.) check-in: 26b942d018 user: mario tags: trunk
23:21
Better cleaup of regex-extracted entries. check-in: a2142151c0 user: mario tags: trunk
23:21
Enhance configurability of language, remove default categories. check-in: 846623040b user: mario tags: trunk
Changes

Modified channels/internet_radio.py from [bb1ce6b50e] to [fff2459591].

225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
                uu = rx_data.search(div)
                if uu:
                    (url, genres, title, playing, homepage, bitrate, listeners) = uu.groups()
                    
                    # transform data
                    r.append({
                        "url": url,
                        "genre": self.strip_tags(genres),
                        "homepage": http.fix_url(homepage),
                        "title": (title if title else "").strip(),
                        "playing": (playing if playing else "").strip(),
                        "bitrate": int(bitrate if bitrate else 0),
                        "listeners": int(listeners if listeners else 0),
                        "format": "audio/mpeg", # there is no stream info on that, but internet-radio.org.uk doesn't seem very ogg-friendly anyway, so we assume the default here
                    })
                else:
                    __print__(dbg.ERR, "rx missed", div)
        return r









|
|
|
|
|
|







225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
                uu = rx_data.search(div)
                if uu:
                    (url, genres, title, playing, homepage, bitrate, listeners) = uu.groups()
                    
                    # transform data
                    r.append({
                        "url": url,
                        "genre": self.strip_tags(genres or ""),
                        "homepage": http.fix_url(homepage or ""),
                        "title": (title or "").strip().replace("\n", " "),
                        "playing": (playing or "").strip().replace("\n", " "),
                        "bitrate": int(bitrate or 0),
                        "listeners": int(listeners or 0),
                        "format": "audio/mpeg", # there is no stream info on that, but internet-radio.org.uk doesn't seem very ogg-friendly anyway, so we assume the default here
                    })
                else:
                    __print__(dbg.ERR, "rx missed", div)
        return r