Check-in [00df54ba31]
Overview
| Comment: | Python3 fixes (use `log.XYZ` instead of `print` statement). | 
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive | 
| Timelines: | family | ancestors | descendants | both | trunk | 
| Files: | files | file ages | folders | 
| SHA1: | 
00df54ba31ac7ea0a256b4c4c58a8b01 | 
| User & Date: | mario on 2015-11-08 14:01:10 | 
| Other Links: | manifest | tags | 
Context
| 
   2015-11-09 
 | ||
| 00:10 | Preliminary fix for recent action.play/record hook changes. check-in: cdb98c5876 user: mario tags: trunk | |
| 
   2015-11-08 
 | ||
| 14:01 | Python3 fixes (use `log.XYZ` instead of `print` statement). check-in: 00df54ba31 user: mario tags: trunk | |
| 14:00 | Reenable logging for `timer` module (seems non-functional ATM). check-in: 7ac004fc6d user: mario tags: trunk | |
Changes
Modified action.py from [385cdf85d8] to [31399c2ae9].
| ︙ | ︙ | |||
512 513 514 515 516 517 518  | 
                rows[num][field] = value.strip()
        return [rows[str(i)] for i in sorted(map(int, rows.keys()))]
    # Jamendo JAMJAMJSON playlists
    def jamj(self):
        rows = []
 | |  | 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526  | 
                rows[num][field] = value.strip()
        return [rows[str(i)] for i in sorted(map(int, rows.keys()))]
    # Jamendo JAMJAMJSON playlists
    def jamj(self):
        rows = []
        log.DATA(self.src)
        for result in json.loads(self.src)["results"]:
            for track in result.get("tracks") or [result]:
                rows.append(dict(
                    title = track["name"],
                    url = track["audio"],
                    playing = track.get("artist_name"),
                    img = track.get("image"),
 | 
| ︙ | ︙ | 
Modified channels/radionomy.py from [ccaf9dfc02] to [7bc8ca4b0f].
| ︙ | ︙ | |||
132 133 134 135 136 137 138  | 
        if conf.radionomy_update:
            try:
                d = json.loads(
                    ahttp.get("https://www.radionomy.com/en/OnAir/Update", post=1, referer=req, ajax=1)
                )
                if not d:
                    return
 | |  | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146  | 
        if conf.radionomy_update:
            try:
                d = json.loads(
                    ahttp.get("https://www.radionomy.com/en/OnAir/Update", post=1, referer=req, ajax=1)
                )
                if not d:
                    return
                log.DEBUG_DATA(d)
                self.playing.update(
                    {row["RadioUID"]: "{Title} - {Artist}".format(**row) for row in d}
                )
            except Exception as e:
                log.ERR("Radionomy title update:", e)
                
 |