Index: channels/jamendo.py ================================================================== --- channels/jamendo.py +++ channels/jamendo.py @@ -1,11 +1,11 @@ # encoding: UTF-8 # api: streamtuner2 # title: Jamendo # description: A license-free music collection and artist hub. # type: channel -# version: 2.2 +# version: 2.3 # category: radio # url: http://jamendo.com/ # depends: json # config: # { name: jamendo_stream_format, value: ogg, type: select, select: "ogg=Vorbis, 112kbit/s|mp32=MP3, 192kbit/s|mp31=MP3, 96kbit/s|flac=FLAC, ≳600kbit/s", description: "Audio format for tracks, albums, playlists." } @@ -272,18 +272,21 @@ fmt_mime = self.stream_mime(fmt) # Static list of Radios if cat == "radios": for radio in ["BestOf", "Pop", "Rock", "Lounge", "Electro", "HipHop", "World", "Jazz", "Metal", "Soundtrack", "Relaxation", "Classical"]: + j = self.api(method="radios/stream", name=radio.lower(), imagesize=30) + if not len(j): + continue entries.append({ "genre": radio, - "title": radio, - "url": "http://streaming.radionomy.com/Jam" + radio, # optional +".m3u" + "title": j[0]["dispname"], + "url": j[0]["stream"], #"http://streaming.jamendo.com/Jam" + radio, # optional +".m3u" "playing": "various artists", "format": "audio/mpeg", "homepage": "http://www.jamendo.com/en/radios", - "img": "http://imgjam1.jamendo.com/new_jamendo_radios/%s30.jpg" % radio.lower(), + "img": j[0]["image"] #"http://imgjam1.jamendo.com/new_jamendo_radios/%s30.jpg" % radio.lower(), }) # Playlist elif cat == "playlists": for e in self.api(method="playlists", order="creationdate_desc"):