Diff
Differences From Artifact [cff583b758]:
- File
channels/xiph.py
— part of check-in
[f9c725e90b]
at
2020-05-10 15:17:41
on branch trunk
— Adapt Xiph plugin for BETA/dir-test.xoph.org rollout. It's fairly terrible:
homepages gone, bitrate unavailable, case-sensitive category segregration.
On the upside: direct streaming server urls.
The 'cache' mode is likely broken soon, since the experimental JSON API is gone.
For now using `.title()` on /genre/{} search. Adapted guess_format to recognize AAC. Subtitle is used in lieu of On Air: text for playing= (user: mario, size: 16022) [annotate] [blame] [check-ins using]
To Artifact [5e8e93fcb4]:
- File channels/xiph.py — part of check-in [08803f2b56] at 2020-05-11 16:24:20 on branch trunk — Add duplicate filter for Xiph. (user: mario, size: 16663) [annotate] [blame] [check-ins using]
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - + + | # encoding: UTF-8 # api: streamtuner2 # title: Xiph.org # description: ICEcast radios. Scans per JSON API, slow XML, or raw directory. # type: channel # url: http://dir.xiph.org/ |
185 186 187 188 189 190 191 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | - + - + | # uncover station homepages. #@use_rx def from_raw_html(self, cat, search=None, use_rx=False): # Build request URL by_format = {t.lower(): t for t in self.categories[-1]} if search: |
240 241 242 243 244 245 246 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | + + + + + - + + + + + + + + + + | listformat = "srv", listeners = to_int(ls["listeners"]), bitrate = 0, #bitrate(ls["bits"]), format = mime_fmt(guess_format(ls["fmt"])), tags = unhtml(ls["tags"]) )) #log.DATA(r) 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): |