Index: channels/xiph.py ================================================================== --- channels/xiph.py +++ channels/xiph.py @@ -1,9 +1,9 @@ # encoding: UTF-8 # api: streamtuner2 # title: Xiph.org -# description: ICEcast radios. Scans per JSON API, slow XML, or raw directory. +# description: ICEcast radios. Scans either the raw website or the slow XML feed # type: channel # url: http://dir.xiph.org/ # version: 0.8 # category: radio # config: @@ -250,18 +250,14 @@ # strip entries by title+playing from Xiph BETA result list def filter_duplicates(self, entries): if "xiph_filter" not in conf or not int(conf.xiph_filter): return entries seen = [] - filt_r = filter(lambda row: row["title"] not in seen and not seen.append(row["title"]), entries) - return filt_r - for row in entries: - curr = (row["title"], row["playing"]) - if not curr in seen: - filt_r.append(row) - seen.append(curr) - return filt_r + return filter( + lambda r: not(r["title"]+r["playing"] in seen or seen.append(r["title"]+r["playing"])), + entries + ) # Regex dict def rx_all(self, fields, src, flags=re.X): row = {} for k, v in fields.items():