def playlist(path): try: file = PlayListFile.from_urlpath(path) if file.is_file: return stream_template("audio.player.html", file=file, playlist=True) except OutsideDirectoryBase: pass return NotFound()
def directory(path): try: file = PlayableDirectory.from_urlpath(path) if file.is_directory: return stream_template('audio.player.html', file=file, playlist=True) except OutsideDirectoryBase: pass return NotFound()
def playlist(path): try: file = PlayListFile.from_urlpath(path) if file.is_file: return stream_template( 'audio.player.html', file=file, playlist=True ) except OutsideDirectoryBase: pass return NotFound()
def summarise_directory(path): try: suite = BehaveAbleDir.from_urlpath(path) if suite.is_directory: summary = suite.summarise() suite_summary = SuiteSummary(urlpath=suite.urlpath, feature_summary=summary) return stream_template( 'audio.player.html', file=suite, table=TableFormatSummary(suite_summary=suite_summary)) except OutsideDirectoryBase: pass return NotFound()
def directory(path): sort_property = get_cookie_browse_sorting(path, 'text') sort_fnc, sort_reverse = browse_sortkey_reverse(sort_property) try: file = PlayableDirectory.from_urlpath(path) if file.is_directory: return stream_template('audio.player.html', file=file, sort_property=sort_property, sort_fnc=sort_fnc, sort_reverse=sort_reverse, playlist=True) except OutsideDirectoryBase: pass return NotFound()
def directory(path): sort_property = get_cookie_browse_sorting(path, 'text') sort_fnc, sort_reverse = browse_sortkey_reverse(sort_property) try: file = PlayableDirectory.from_urlpath(path) if file.is_directory: return stream_template( 'audio.player.html', file=file, sort_property=sort_property, sort_fnc=sort_fnc, sort_reverse=sort_reverse, playlist=True ) except OutsideDirectoryBase: pass return NotFound()