Index: channels/jamendo.py ================================================================== --- channels/jamendo.py +++ channels/jamendo.py @@ -1,22 +1,20 @@ # api: streamtuner2 # title: Jamendo # description: A license-free music collection and artist hub. # type: channel +# version: 2.2 # category: radio # depends: json # priority: default # # Now utilizes the Jamendo /v3.0/ API. # # Radio station lists are fixed for now. Querying the API twice per station # doesn't seem overly sensible. # -# Albums and Playlists are limited to 200 entries. Adding a cursor is -# feasible however. -# # Tracks are queried by genre, where currently there's just a small built-in # tag list in ST2. # # # The v3.0 streaming URLs don't seem to work. Therefore some /get2 URLs will Index: channels/shoutcast.py ================================================================== --- channels/shoutcast.py +++ channels/shoutcast.py @@ -126,23 +126,24 @@ # With the new shallow lists it doesn't make much sense to use # the pyquery DOM traversal. There aren't any sensible selectors to # extract values; it's just counting the tags. # And there's a bug in PyQuery 1.2.4 and CssSelector. So make two # attempts, alternate between regex and DOM; user preference first. + entries = [] use_regex = not conf.get("pyquery") or not pq retry = 2 - while retry: + while retry and not entries: retry -= 1 try: if use_regex: - return self.with_regex(html) + entries = self.with_regex(html) else: - return self.with_dom(html) + entries = self.with_dom(html) except Exception as e: - use_regex ^= 1 __print__(dbg.ERR, e) - return [] + use_regex ^= 1 + return entries # Extract using regex def with_regex(self, html): __print__(dbg.PROC, "channels.shoutcast.update_streams: regex scraping mode")