Index: channels/__init__.py ================================================================== --- channels/__init__.py +++ channels/__init__.py @@ -220,11 +220,11 @@ if len(set(["", None]) & set([row.get("title"), row.get("url")])): continue try: modified.append( self.postprocess(row) ) except Exception as e: - __print__(e, dbg.ERR, row) + __print__(e, dbg.DATA, "Missing title or url. Postprocessing failed:", row) new_streams = modified # don't lose forgotten streams if conf.retain_deleted: self.streams[category] = new_streams + self.deleted_streams(new_streams, self.streams.get(category,[])) @@ -240,11 +240,11 @@ else: # parse error self.parent.status("category parsed empty.") self.streams[category] = [{"title":"no contents found on directory server","bitrate":0,"max":0,"listeners":0,"playing":"error","favourite":0,"deleted":0}] - __print__(dbg.ERR, "Oooops, parser returned nothing for category " + category) + __print__(dbg.INFO, "Oooops, parser returned nothing for category " + category) # assign to treeview model #self.streams[self.default] = [] #if (self.liststore.has_key(category)): # was already loded before # self.gtk_list.set_model(self.liststore[category]) @@ -371,11 +371,11 @@ __print__(dbg.PROC, self.module+"first_show: reload_categories"); #self.parent.thread(self.reload_categories) try: self.reload_categories() except: - __print__(dbg.ERR, "HTTP Error or something") + __print__(dbg.ERR, "HTTP error or extraction failure.") self.categories = ["empty"] self.display_categories() self.current = self.categories.keys()[0] __print__(dbg.STAT, "Use first category as current =", self.current) self.load(self.current) Index: channels/bookmarks.py ================================================================== --- channels/bookmarks.py +++ channels/bookmarks.py @@ -146,11 +146,11 @@ # update bookmarks from freshly loaded streams data def heuristic_update(self, updated_channel, updated_category): if not conf.heuristic_bookmark_update: return - __print__(dbg.ERR, "heuristic bookmark update") + __print__(dbg.PROC, "heuristic bookmark update") save = 0 fav = self.streams["favourite"] # First we'll generate a list of current bookmark stream urls, and then # remove all but those from the currently UPDATED_channel + category. Index: channels/internet_radio.py ================================================================== --- channels/internet_radio.py +++ channels/internet_radio.py @@ -140,11 +140,11 @@ "bitrate": int(bitrate or 0), "listeners": int(listeners or 0), "format": "audio/mpeg", # there is no stream info on that, but internet-radio.org.uk doesn't seem very ogg-friendly anyway, so we assume the default here }) else: - __print__(dbg.ERR, "rx missed", div) + __print__(dbg.DATA, "Regex couldn't decipher entry:", div) return r # DOM traversing def with_dom(self, html_list): Index: channels/shoutcast.py ================================================================== --- channels/shoutcast.py +++ channels/shoutcast.py @@ -96,11 +96,11 @@ # downloads stream list from shoutcast for given category def update_streams(self, cat): if (cat not in self.catmap): - __print__( dbg.ERR, "nocat" ) + __print__( dbg.ERR, "Category not in known map.", cat ) return [] id = self.catmap[cat] # page url = "http://www.shoutcast.com/Home/BrowseByGenre" @@ -108,11 +108,11 @@ referer = None try: json = http.get(url, params=params, referer=referer, post=1, ajax=1) json = json_decode(json) except: - __print__(db.ERR, "HTTP request or JSON decoding failed. Outdated python/requests perhaps.") + __print__(dbg.ERR, "HTTP request or JSON decoding failed. Outdated python/requests perhaps.") return [] self.parent.status(0.75) # remap JSON entries = [] Index: config.py ================================================================== --- config.py +++ config.py @@ -384,11 +384,11 @@ # wrapper for all print statements def __print__(*args): - if "debug" in conf and conf.debug: + if "debug" in conf and conf.debug or args[0] == dbg.ERR: print(" ".join([str(a) for a in args])) # error colorization dbg = type('obj', (object,), { Index: help/index.page ================================================================== --- help/index.page +++ help/index.page @@ -1,8 +1,8 @@