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

⌈⌋ branch:  streamtuner2


Diff

Differences From Artifact [7d8403e72c]:

To Artifact [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] = []