示例#1
0
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()
示例#2
0
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()
示例#3
0
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()
示例#4
0
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()
示例#5
0
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()
示例#6
0
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()