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

⌈⌋ branch:  streamtuner2


Diff

Differences From Artifact [ed1a42d71d]:

To Artifact [8c2aceee6b]:


80
81
82
83
84
85
86
87

88
89

90

91
92









93
94
95
80
81
82
83
84
85
86

87
88

89
90
91
92

93
94
95
96
97
98
99
100
101
102
103
104







-
+

-
+

+

-
+
+
+
+
+
+
+
+
+


               "playing": row.get("subtext", ""),
               "favicon": row.get("image", None),
            })
        return r


    # Fetch OPML, convert outline elements to dicts
    def api(self, method):
    def api(self, method, url=None):
        r = []
        opml = ahttp.get(self.base + method)
        opml = ahttp.get(url or self.base + method)
        x = ElementTree.fromstring(opml)
        # append entries
        for outline in x.findall(".//outline"):
            r.append(dict(outline.items()))
            outline = dict(outline.items())
            # additional pages
            if "key" in outline and outline["key"] == "nextStations":
                if len(x) < conf.max_streams:
                    r = r + self.api(method=None, url=outline["URL"])
                else:
                    pass
            else:
                r.append(outline)
        return r