Semi-fix for brand-new initialization. Set default category from existing
categories[] list. Setting the displayed path as well doesn't work yet.
(It's just half-way selected after the next restart.)
check-in: 1cfacd1296 user: mario tags: trunk
Simplify uikit.do() callback for GUI updates from within threads.
Search plugin led to a memory corruption due to not using it for updates.
check-in: aa264c28e2 user: mario tags: trunk
# streams and guiclass internet_radio (ChannelPlugin):# control data
listformat ="pls"
categories =[] base_url ="http://www.internet-radio.com/"# load genresdef update_categories(self): html = http.get(self.homepage) html = http.get(self.base_url) rx = re.compile("""="/stations/[-+&.\w\s%]+/">([^<]+)<""")
cats = rx.findall(html)
cats = list(set(cats))
cats =[s.capitalize()for s in cats]self.categories = sorted(list(set(cats)))
676869707172737475767778798081
686970717273747576777879808182
-+
html =[]
max_pages = max(int(conf.internetradio_max_pages),1)for page in range(1, max_pages):# Append HTML source
html.append(
http.get(self.homepage+"stations/"+self.base_url+"stations/"+ cat.lower().replace(" ","%20")+"/"+("page"+str(page)if page>1else"")))# Is there a next page?if str(page+1)notin rx_pages.findall(html[-1]):