1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#
# api: streamtuner2
# title: MyOggRadio
# description: Open source internet radio directory.
# type: channel
# category: radio
# version: 0.5
# url: http://www.myoggradio.org/
# depends: json, StringIO
# config:
# { name: myoggradio_login, type: text, value: "user:password", description: "Account for storing personal favourites." }
# { name: myoggradio_morph, type: boolean, value: 0, description: "Convert pls/m3u into direct shoutcast url." }
# priority: standard
#
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#
# api: streamtuner2
# title: MyOggRadio
# description: Open source internet radio directory.
# type: channel
# category: radio
# version: 0.6
# url: http://www.myoggradio.org/
# depends: json, StringIO
# config:
# { name: myoggradio_login, type: text, value: "user:password", description: "Account for storing personal favourites." }
# { name: myoggradio_morph, type: boolean, value: 0, description: "Convert pls/m3u into direct shoutcast url." }
# priority: standard
#
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
import copy
# open source radio sharing stie
class myoggradio(ChannelPlugin):
# description
title = "MyOggRadio"
module = "myoggradio"
homepage = "http://www.myoggradio.org/"
api = "http://www.myoggradio.org/"
listformat = "url/direct"
# hide unused columns
titles = dict(playing=False, listeners=False, bitrate=False)
# category map
categories = ['common', 'personal']
default = 'common'
current = 'common'
# prepare GUI
def __init__(self, parent):
ChannelPlugin.__init__(self, parent)
if parent:
|
|
|
<
<
>
>
>
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
import copy
# open source radio sharing stie
class myoggradio(ChannelPlugin):
# settings
title ="MOR"
module = "myoggradio"
api = "http://www.myoggradio.org/"
listformat = "url/direct"
# hide unused columns
titles = dict(playing=False, listeners=False, bitrate=False)
# category map
categories = ['common', 'personal']
default = 'common'
current = 'common'
# netrc instance
netrc = None
# prepare GUI
def __init__(self, parent):
ChannelPlugin.__init__(self, parent)
if parent:
|
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
|
data = dict(zip(["benutzer", "passwort"], login))
http.get(self.api + "c_login.jsp", params=data, ajax=1)
# let's hope the JSESSIONID cookie is kept
# returns login (user,pw)
def user_pw(self):
if conf.myoggradio_login != "user:password":
return conf.myoggradio_login.split(":")
else: pass
|
|
|
|
>
>
>
|
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
data = dict(zip(["benutzer", "passwort"], login))
http.get(self.api + "c_login.jsp", params=data, ajax=1)
# let's hope the JSESSIONID cookie is kept
# returns login (user,pw)
def user_pw(self):
if len(conf.myoggradio_login) and conf.myoggradio_login != "user:password":
return conf.myoggradio_login.split(":")
else:
lap = conf.netrc(["myoggradio", "myoggradio.org", "www.myoggradio.org"])
if lap:
return [lap[0] or lap[1], lap[2]]
pass
|