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

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [9a203fe500]:

To Artifact [75f35740e6]:


134
135
136
137
138
139
140

141
142
143
144
145
146
147
                        "title": e["name"],
                        "playing": e["user_name"],
                        "homepage": e["shareurl"],
                        #"url": "http://api.jamendo.com/v3.0/playlists/file?client_id=%s&id=%s" % (self.cid, e["id"]),
                        "url": "http://api.jamendo.com/get2/stream/track/xspf/?playlist_id=%s&n=all&order=random&from=app-%s" % (e["id"], self.cid),
                        "format": "application/xspf+xml",
                    })


        # albums
        elif cat in ["albums", "newest"]:
            for offset in self.retrieval_offsets():
                data = http.get(self.api + "albums/musicinfo", params = {
                    "client_id": self.cid,
                    "format": "json",







>







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
                        "title": e["name"],
                        "playing": e["user_name"],
                        "homepage": e["shareurl"],
                        #"url": "http://api.jamendo.com/v3.0/playlists/file?client_id=%s&id=%s" % (self.cid, e["id"]),
                        "url": "http://api.jamendo.com/get2/stream/track/xspf/?playlist_id=%s&n=all&order=random&from=app-%s" % (e["id"], self.cid),
                        "format": "application/xspf+xml",
                    })
                self.parent.status(float(offset)/float(1000))

        # albums
        elif cat in ["albums", "newest"]:
            for offset in self.retrieval_offsets():
                data = http.get(self.api + "albums/musicinfo", params = {
                    "client_id": self.cid,
                    "format": "json",
158
159
160
161
162
163
164

165
166
167
168
169
170
171
                        "playing": e["artist_name"],
                        "img": e["image"],
                        "homepage": e["shareurl"],
                        #"url": "http://api.jamendo.com/v3.0/playlists/file?client_id=%s&id=%s" % (self.cid, e["id"]),
                        "url": "http://api.jamendo.com/get2/stream/track/xspf/?album_id=%s&streamencoding=ogg2&n=all&from=app-%s" % (e["id"], self.cid),
                        "format": "application/xspf+xml",
                    })

		
        # genre list
        else:
            for offset in self.retrieval_offsets():
                data = http.get(self.api + "tracks", params={
                    "client_id": self.cid,
                    ("fuzzytags" if cat else "search"): (search if search else cat),







>







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
                        "playing": e["artist_name"],
                        "img": e["image"],
                        "homepage": e["shareurl"],
                        #"url": "http://api.jamendo.com/v3.0/playlists/file?client_id=%s&id=%s" % (self.cid, e["id"]),
                        "url": "http://api.jamendo.com/get2/stream/track/xspf/?album_id=%s&streamencoding=ogg2&n=all&from=app-%s" % (e["id"], self.cid),
                        "format": "application/xspf+xml",
                    })
                self.parent.status(float(offset)/float(1000))
		
        # genre list
        else:
            for offset in self.retrieval_offsets():
                data = http.get(self.api + "tracks", params={
                    "client_id": self.cid,
                    ("fuzzytags" if cat else "search"): (search if search else cat),
186
187
188
189
190
191
192

193
194
195
196
197
198
199
                        "playing": e["album_name"] + " / " + e["artist_name"],
                        "img": e["album_image"],
                        "homepage": e["shareurl"],
                        #"url": e["audio"],
                        "url": "http://storage-new.newjamendo.com/?trackid=%s&format=ogg2&u=0&from=app-%s" % (e["id"], self.cid),
                        "format": fmt,
                    })

 
        # done    
        return entries

    
    # offset list [0, 200, 400, 600, ...] according to max retrieval count
    def retrieval_offsets(self):







>







188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
                        "playing": e["album_name"] + " / " + e["artist_name"],
                        "img": e["album_image"],
                        "homepage": e["shareurl"],
                        #"url": e["audio"],
                        "url": "http://storage-new.newjamendo.com/?trackid=%s&format=ogg2&u=0&from=app-%s" % (e["id"], self.cid),
                        "format": fmt,
                    })
                self.parent.status(float(offset)/float(1000))
 
        # done    
        return entries

    
    # offset list [0, 200, 400, 600, ...] according to max retrieval count
    def retrieval_offsets(self):