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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [27b9174109]

Overview
Comment:Fix UTF-8 text decoding for CSV after downloading as binary.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 27b91741099ff30f5bbff2a8200ca3d5b86f216c
User & Date: mario on 2015-05-07 01:22:58
Other Links: manifest | tags
Context
2015-05-07
17:09
Remove unsupported view-source: URL prefix, rewrite links from /cat/ to /doc/tip/ for downloading/plain view instead of text/html browsing. check-in: 8e4f191706 user: mario tags: trunk
01:22
Fix UTF-8 text decoding for CSV after downloading as binary. check-in: 27b9174109 user: mario tags: trunk
01:20
Add description: line. check-in: 749946913c user: mario tags: trunk
Changes

Modified contrib/glrp.py from [7d8403e72c] to [698577c08b].

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
    audioformat = "audio/mpeg"
    titles = dict(listeners=False, bitrate=False, playing="Location")


    # Imports the CSV once and populates streams
    def update_categories(self):

        dat = ahttp.get("http://fossil.include-once.org/streamtuner2/cat/contrib/glrp.csv.gz")
        dat = gzip_decode(dat)

        self.streams = {}
        if dat:
            ls = csv.reader(dat.split("\n"))
            for title, url, genre, location, fav in [x for x in ls if len(x)==5]:
                if not self.streams.get(genre):
                    self.streams[genre] = []







|
|







36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
    audioformat = "audio/mpeg"
    titles = dict(listeners=False, bitrate=False, playing="Location")


    # Imports the CSV once and populates streams
    def update_categories(self):

        dat = ahttp.get("http://fossil.include-once.org/streamtuner2/cat/contrib/glrp.csv.gz", binary=1)
        dat = gzip_decode(dat).decode("utf-8")

        self.streams = {}
        if dat:
            ls = csv.reader(dat.split("\n"))
            for title, url, genre, location, fav in [x for x in ls if len(x)==5]:
                if not self.streams.get(genre):
                    self.streams[genre] = []