Index: channels/__init__.py ================================================================== --- channels/__init__.py +++ channels/__init__.py @@ -404,10 +404,12 @@ # and "bookmarks" in self.parent.channels: row["favourite"] = self.parent.bookmarks.is_in(row.get("url", "file:///tmp/none")) # this should really go into bookmarks plugin itself, # disadvantage: would decelerate processing loop further if not row.get("state"): + if row.get("url", "").find(" ") > 0: + row["state"] = gtk.STOCK_UNINDENT if row.get("favourite"): row["state"] = gtk.STOCK_ABOUT if row.get("deleted"): row["state"] = gtk.STOCK_DELETE Index: contrib/radiosure.py ================================================================== --- contrib/radiosure.py +++ contrib/radiosure.py @@ -1,10 +1,10 @@ # encoding: UTF-8 # api: streamtuner2 # title: RadioSure # description: Huge radio station collection -# version: 0.4 +# version: 0.5 # type: channel # category: radio # url: http://radiosure.com/ # config: - # priority: extra @@ -84,18 +84,18 @@ # 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): + 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]#... + url = e[5].replace("\t", " ")#... )) return streams