Check-in [77480a7e73]
Overview
Comment: | Xiph simplified duplicate filter |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
77480a7e73507f824d5c25333dda8db6 |
User & Date: | mario on 2020-05-11 19:11:35 |
Other Links: | manifest | tags |
Context
2020-05-12
| ||
15:56 | Update radiolist plugin for new wordpress site; now uses genre categories instead of countries. check-in: c952ce442c user: mario tags: trunk | |
2020-05-11
| ||
19:11 | Xiph simplified duplicate filter check-in: 77480a7e73 user: mario tags: trunk | |
19:11 | updated SomeFM extraction and default stream list check-in: c2360471af user: mario tags: trunk | |
Changes
Modified channels/xiph.py from [5e8e93fcb4] to [0800ed29b7].
1 2 3 | # encoding: UTF-8 # api: streamtuner2 # title: Xiph.org | | | 1 2 3 4 5 6 7 8 9 10 11 | # encoding: UTF-8 # api: streamtuner2 # title: Xiph.org # 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: # { name: xiph_source, value: buffy, type: select, select: "cache=JSON cache srv|xml=Clunky XML blob|buffy=Buffy YP.XML|web=Forbidden fruits", description: "Source for station list extraction." } # { name: xiph_filter, value: 1, type: bool, description: "Filter duplicate stations from list." } |
︙ | ︙ | |||
248 249 250 251 252 253 254 | return self.filter_duplicates(r) # 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 = [] | < | > | < < < < < > | 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | return self.filter_duplicates(r) # 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 = [] 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(): m = re.search(v, src, flags) if m: |
︙ | ︙ |