Пример #1
0
def prevsong():
    result = {}
    current_pos = int(mpd_kit.currentsong().get("pos"))
    playlist = [x for x in enumerate(mpd_kit.playlistinfo())]
    result = playlist[(current_pos - 1) % len(playlist)][1]
    return jsonify(result)
Пример #2
0
def currentsong():
    result = mpd_kit.currentsong()
    return jsonify(result)