24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# page (50 stations) is fetched.
import re
from config import *
from channels import *
import ahttp
# Delayed streaming URL discovery
class delicast (ChannelPlugin):
# control flags
has_search = False
listformat = "srv"
audioformat = "audio/mpeg"
titles = dict(listeners=False, bitrate=False, playing="Location")
categories = ["60s", "70s", "80s", "90s", "Alternative", "Blues",
"Chillout", "Christian", "Classical", "Community", "Country", "Culture",
"Dance", "Disco", "Easy listening", "Electronic", "Folk", "Funk",
"Gospel", "Hiphop", "House Indie", "Information", "Jazz", "Latin",
"Lounge", "Love", "Metal", "Oldies", "Pop", "R n b", "Reggae", "Rock",
"Romantic", "Soul", "Sports", "Student", "Talk", "Techno", "Trance",
"Urban", "World music"]
# static
def update_categories(self):
pass
# Fetch entries
|
>
|
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# page (50 stations) is fetched.
import re
from config import *
from channels import *
import ahttp
import action
# Delayed streaming URL discovery
class delicast (ChannelPlugin):
# control flags
has_search = False
listformat = "srv"
audioformat = "audio/mpeg"
titles = dict(listeners=False, bitrate=False, playing="Location")
categories = ["60s", "70s", "80s", "90s", "Alternative", "Blues",
"Chillout", "Christian", "Classical", "Community", "Country", "Culture",
"Dance", "Disco", "Easy listening", "Electronic", "Folk", "Funk",
"Gospel", "Hiphop", "House Indie", "Information", "Jazz", "Latin",
"Lounge", "Love", "Metal", "Oldies", "Pop", "R n b", "Reggae", "Rock",
"Romantic", "Soul", "Sports", "Student", "Talk", "Techno", "Trance",
"Urban", "World music"]
# static
def update_categories(self):
pass
# Fetch entries
|
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
genre = cat,
# genre = unhtml(tags),
))
return r
# Update `url` on station data access (incurs a delay for playing or recording)
def row(self):
r = ChannelPlugin.row(self)
if r.get("url") == "urn:delicast":
html = ahttp.get(r["homepage"])
ls = re.findall("^var url = \"(.+)\";", html, re.M)
r["url"] = ls[0]
return r
|
|
<
|
|
|
|
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
genre = cat,
# genre = unhtml(tags),
))
return r
# Update `url` on station data access (incurs a delay for playing or recording)
def resolve_urn(self, row):
if row.get("url").startswith("urn:delicast"):
html = ahttp.get(r["homepage"])
ls = re.findall("^var url = \"(.+)\";", html, re.M)
row["url"] = ls[0]
return row
|