Exemplo n.º 1
0
def playlist(id_int=None):
    params = {}
    if id_int:
        requested_user = UserController.get_user_by_id_int(id_int)
        params['user'] = requested_user
    all_playlist = UserController.get_all_playlist(**params)

    opt = {
        'all_playlist': all_playlist,
        'requested_user': params.get('user', g.user),
    }

    return render_template("user/playlist.html", **opt)
Exemplo n.º 2
0
def archived(id_int=None):
    params = {}
    if id_int:
        params['user'] = UserController.get_user_by_id_int(id_int)
    user_playlist = UserController.get_archived_playlist(**params)
    all_media = user_playlist.media_list

    opt = {
        'playlist': user_playlist,
        'media_list': all_media,
    }

    return render_template('playlist/medialist.html', **opt)