def uri_type(uri): if uri.startswith(r'http://'): return STREAM extension = get_extension(uri) if extension and is_audio(extension): return FILE return UNKNOWN
def import_playlist(playlist_uri): ext = get_extension(playlist_uri) decoder = get_decoder(ext) return decoder.decode(playlist_uri)