Diff
Differences From Artifact [b3964ae39a]:
- File channels/punkcast.py — part of check-in [9d6c4e81f8] at 2015-04-04 01:48:31 on branch trunk — Catch HTTP errors for reload_categories(). Provide a descriptive .placeholder[] and .empty_stub[] stream list for channels reloading. (user: mario, size: 3605) [annotate] [blame] [check-ins using]
To Artifact [5c675df85e]:
- File channels/punkcast.py — part of check-in [ea628d6426] at 2015-04-08 17:59:53 on branch trunk — Remove extraneous class wrapper action.action. Start to regroup listformat mapping (pls-url → m3u-fn rewrites). Will need some heuristics, as depending just on the channel.listformat assumption won't work in practice (some .pls servers actually host direct server links, or occasionally .m3u references even). Currently does nothing, just returns the pls/etc URL. (user: mario, size: 3591) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
86 87 88 89 90 91 92 | rx_sound = re.compile("""(http://[^"<>]+[.](mp3|ogg|m3u|pls|ram))""") html = http.get(row["homepage"]) # look up ANY audio url for uu in rx_sound.findall(html): __print__( dbg.DATA, uu ) (url, fmt) = uu | | | | 86 87 88 89 90 91 92 93 94 95 96 97 98 | rx_sound = re.compile("""(http://[^"<>]+[.](mp3|ogg|m3u|pls|ram))""") html = http.get(row["homepage"]) # look up ANY audio url for uu in rx_sound.findall(html): __print__( dbg.DATA, uu ) (url, fmt) = uu action.play(url, self.mime_fmt(fmt), "url/direct") return # or just open webpage action.browser(row["homepage"]) |