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

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [5396599cac]:

To Artifact [e1d926fd86]:


1
2
3
4
5
6
7
8
9
10
11
12
# encoding: UTF-8
# api: streamtuner2
# title: RadioSure
# description: Huge radio station collection
# version: 0.4
# type: channel
# category: radio
# url: http://radiosure.com/
# config: -
# priority: extra
# png: 
#   iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEULDgpKTEmQko/19/S0inLcAAAAUklEQVQI12P4DwQMDvuBBIs92zcGHh2G




|







1
2
3
4
5
6
7
8
9
10
11
12
# encoding: UTF-8
# api: streamtuner2
# title: RadioSure
# description: Huge radio station collection
# version: 0.5
# type: channel
# category: radio
# url: http://radiosure.com/
# config: -
# priority: extra
# png: 
#   iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEULDgpKTEmQko/19/S0inLcAAAAUklEQVQI12P4DwQMDvuBBIs92zcGHh2G
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
            with open(self.tmp, "wb") as f:
                f.write(ahttp.get(self.zip, binary=1))
        # get first file
        zip = zipfile.ZipFile(self.tmp)
        csv = zip.read(zip.namelist()[0])
        self.status("Updating streams from RadioSure CSV database")
        # fields = ["title", "playing", "genre", "country", "language", "url"]
        for e in re.findall("^([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+(?:\t[^\t]{3,})*)", csv, re.M):
            if cat == e[2]:
                streams.append(dict(
                    title = e[0],
                    playing = e[1],
                    genre = e[2],
                    country = e[3],
                    language = e[4],
                    url = e[5]#...
                ))
        return streams









|







|




82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
            with open(self.tmp, "wb") as f:
                f.write(ahttp.get(self.zip, binary=1))
        # get first file
        zip = zipfile.ZipFile(self.tmp)
        csv = zip.read(zip.namelist()[0])
        self.status("Updating streams from RadioSure CSV database")
        # fields = ["title", "playing", "genre", "country", "language", "url"]
        for e in re.findall(r"^([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+(?:\t[^\t\n]{3,})*)", csv, re.M):
            if cat == e[2]:
                streams.append(dict(
                    title = e[0],
                    playing = e[1],
                    genre = e[2],
                    country = e[3],
                    language = e[4],
                    url = e[5].replace("\t", " ")#...
                ))
        return streams