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

⌈⌋ branch:  streamtuner2


Diff

Differences From Artifact [df3676cdef]:

To Artifact [c02f4fea70]:


101
102
103
104
105
106
107
108

109
110
111
112

113
114
115

116
117
118
119
120
121
122
101
102
103
104
105
106
107

108
109
110
111

112
113
114

115
116
117
118
119
120
121
122







-
+



-
+


-
+






      if cat:
          params["cat"] = cat.lower()
      if search:
          params["search"] = search
      
      #-- get data
      data = http.get(self.json_url, params=params)
      #__print__(dbg.DATA, data)
      #log.DATA(data)
      
      #-- extract
      l = []
      __print__( dbg.PROC, "processing api.dir.xiph.org JSON (via api.include-once.org cache)" )
      log.PROC( "processing api.dir.xiph.org JSON (via api.include-once.org cache)" )
      data = json.loads(data)
      for e in data:
          #__print__(dbg.DATA, e)
          #log.DATA(e)
          bitrate = int(e["bitrate"])
          if conf.xiph_min_bitrate and bitrate and bitrate >= int(conf.xiph_min_bitrate):
              if not len(l) or l[-1]["title"] != e["stream_name"]:
                  l.append({
                    "title": e["stream_name"],
                    "url": e["listen_url"],
                    "format": e["type"],