1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 | # api: streamtuner2
# title: Shoutcast.com
# description: Primary list of shoutcast servers (now managed by radionomy).
# type: channel
# category: radio
# author: Mario
# original: Jean-Yves Lefort
# version: 1.6
# url: http://www.shoutcast.com/
# config:
# { name: shoutcast_format, type: select, select: pls|m3u|xspf, value: pls, description: "Shoutcast playlist format to retrieve" }
# priority: default
# png:
# iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAelJREFUOI2NU0toE2EYnM12t2wLkhSXSIgEJMHFQ2naQ+kpoPYQoaXH3gRFsegloUhRQTyU2oOgggQUzzlEQomIBzU+EHooBIol0cOGLqFFFiJ5SB5skvFU6ebRduA7/DAz
# /PM9BJLoh3Q6zVQqBZfLhXq9jlAohHA4LHTzhvqJ2+02c7kcgsEgfD4fRFFEPp+HZVmUJEk41kAURcHv99Pj8cAwDGiaBkVR0C0GAJDsW7VajYVCgYlEguVymZZlsVKpcG1tlYd5fX8AAIqiCF6vF6VSibIsI5lMYvvDE1xymwDu/ec5BhkcIJPJIHJzFqf372P1cgMf
# f46cLIKu61yJXufr5VO0voyzEZ/k8sI4s9ns0RFarRZjL56inIshekWGenYS6IzhR9PCntRBIBCw8XsiFItFNLMxPJgfwVjDi4Y8g2b9DILaMKZGd2Ca5tEGiqJg2xjF200H6J+AvKtjeG8T3998xW5nAk6n08bviSBJEqhewLlpN4bMHfwxfuH5J8J98SGerS/B4XDY |
|
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 | # api: streamtuner2
# title: Shoutcast.com
# description: Primary list of shoutcast servers (now managed by radionomy).
# type: channel
# category: radio
# author: Mario
# original: Jean-Yves Lefort
# version: 1.6
# url: http://directory.shoutcast.com/
# config:
# { name: shoutcast_format, type: select, select: pls|m3u|xspf, value: pls, description: "Shoutcast playlist format to retrieve" }
# priority: default
# png:
# iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAelJREFUOI2NU0toE2EYnM12t2wLkhSXSIgEJMHFQ2naQ+kpoPYQoaXH3gRFsegloUhRQTyU2oOgggQUzzlEQomIBzU+EHooBIol0cOGLqFFFiJ5SB5skvFU6ebRduA7/DAz
# /PM9BJLoh3Q6zVQqBZfLhXq9jlAohHA4LHTzhvqJ2+02c7kcgsEgfD4fRFFEPp+HZVmUJEk41kAURcHv99Pj8cAwDGiaBkVR0C0GAJDsW7VajYVCgYlEguVymZZlsVKpcG1tlYd5fX8AAIqiCF6vF6VSibIsI5lMYvvDE1xymwDu/ec5BhkcIJPJIHJzFqf372P1cgMf
# f46cLIKu61yJXufr5VO0voyzEZ/k8sI4s9ns0RFarRZjL56inIshekWGenYS6IzhR9PCntRBIBCw8XsiFItFNLMxPJgfwVjDi4Y8g2b9DILaMKZGd2Ca5tEGiqJg2xjF200H6J+AvKtjeG8T3998xW5nAk6n08bviSBJEqhewLlpN4bMHfwxfuH5J8J98SGerS/B4XDY |
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116 | pass
# downloads stream list from shoutcast for given category
def update_streams(self, cat):
# page
url = "http://directory.shoutcast.com/Home/BrowseByGenre"
params = { "genrename": cat }
referer = None
try:
json = ahttp.get(url, params=params, referer=referer, post=1, ajax=1)
json = json_decode(json)
except:
log.ERR("HTTP request or JSON decoding failed. Outdated python/requests perhaps.")
return []
self.parent.status(0.75) |
|
|
| 100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116 | pass
# downloads stream list from shoutcast for given category
def update_streams(self, cat):
# page
url = self.base_url + "Home/BrowseByGenre"
params = { "genrename": cat }
referer = self.base_url
try:
json = ahttp.get(url, params=params, referer=referer, post=1, ajax=1)
json = json_decode(json)
except:
log.ERR("HTTP request or JSON decoding failed. Outdated python/requests perhaps.")
return []
self.parent.status(0.75) |