Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ branch:  streamtuner2


Check-in [96d86cc203]

Overview
Comment:Add ahttp.fix_url() for dirble `website` addresses.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 96d86cc2036d7bb50a2579b91312bb313a964a16
User & Date: mario on 2015-05-15 17:58:21
Other Links: manifest | tags
Context
2015-05-15
21:52
Weighted selection of available stream urls from Dirble API. check-in: fe19fd3202 user: mario tags: trunk
17:58
Add ahttp.fix_url() for dirble `website` addresses. check-in: 96d86cc203 user: mario tags: trunk
17:55
`timedout` and `description` are seemingly gone from the API responses. check-in: cbd84b656f user: mario tags: trunk
Changes

Modified channels/dirble.py from [d2166f415b] to [76274f66da].

90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
        print r

        # rename fields
        return dict(
            genre = " ".join(c["slug"] for c in r["categories"]),
            title = r["name"],
            playing = "{} {}".format(r.get("country"), r.get("description")),
            homepage = r["website"],
            url = s["stream"],
            format = s["content_type"],
            bitrate = s["bitrate"],
           # img = r["image"]["image"]["thumb"]["url"], # CDN HTTPS trip up requests.get
            state = self.state_map[int(s["status"])] if s["status"] in [0,1,2] else "",
            deleted = s.get("timedout", False),
        )







|







90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
        print r

        # rename fields
        return dict(
            genre = " ".join(c["slug"] for c in r["categories"]),
            title = r["name"],
            playing = "{} {}".format(r.get("country"), r.get("description")),
            homepage = ahttp.fix_url(r["website"]),
            url = s["stream"],
            format = s["content_type"],
            bitrate = s["bitrate"],
           # img = r["image"]["image"]["thumb"]["url"], # CDN HTTPS trip up requests.get
            state = self.state_map[int(s["status"])] if s["status"] in [0,1,2] else "",
            deleted = s.get("timedout", False),
        )