예제 #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)