34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49 | listformat = "srv"
audioformat = "audio/mpeg"
titles = dict(listeners=False, bitrate=False, playing="Location")
# Imports the CSV once and populates streams
def update_categories(self):
#dal = ahttp.get("http://fossil.include-once.org/streamtuner2/cat/contrib/glrp.csv")
dat = open("contrib/glrp.csv", "r").read()
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] = []
self.streams[genre].append(dict( |
|
|
| 34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49 | listformat = "srv"
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")
#dat = open("contrib/glrp.csv", "r").read()
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] = []
self.streams[genre].append(dict( |