Check-in [405eaaa660]
Overview
| Comment: | Use shorter entity_decode() call. Strip example content. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
405eaaa660b19616b9400145c22418c3 |
| User & Date: | mario on 2015-05-02 19:53:57 |
| Other Links: | manifest | tags |
Context
|
2015-05-02
| ||
| 19:54 | Added default icons to dialog windows, and st2 logo to main window. Introduce more keyboard shortcuts (F6 favicons, Alt-F5 category reload, etc..) check-in: f18582ae4d user: mario tags: trunk | |
| 19:53 | Use shorter entity_decode() call. Strip example content. check-in: 405eaaa660 user: mario tags: trunk | |
| 19:53 | Allow to add custom statusmsg for lengthier HTTP requests. check-in: 4f285c3b31 user: mario tags: trunk | |
Changes
Modified channels/radionomy.py from [3d7226d120] to [b2195e3fad].
| ︙ | ︙ | |||
109 110 111 112 113 114 115 |
return r
# Extracts the data- attribute JSON blob
@use_rx
def data_play_stream(self, html, use_rx):
if use_rx:
| | | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
return r
# Extracts the data- attribute JSON blob
@use_rx
def data_play_stream(self, html, use_rx):
if use_rx:
return [entity_decode(j) for j in re.findall('data-play-stream="({.*?})"', html)]
else:
# fix up for PyQuery, else ignores appended content
html = re.sub("</html>|</body>", "", html) + "</body></html>"
return [div.attrib["data-play-stream"] for div in pq(html)(".browseRadioWrap .radioPlayBtn")]
# Retrieve en/OnAir/Update for per-UID song titles
|
| ︙ | ︙ | |||
131 132 133 134 135 136 137 |
self.playing.update(
{row["RadioUID"]: "{Title} - {Artist}".format(**row) for row in d}
)
except Exception as e:
log.ERR("Radionomy title update:", e)
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 131 132 133 134 135 136 137 |
self.playing.update(
{row["RadioUID"]: "{Title} - {Artist}".format(**row) for row in d}
)
except Exception as e:
log.ERR("Radionomy title update:", e)
|