Esempio n. 1
0
def updateSongTable():
    songs = db.getAllSongs()
    tableArr = [[song.name, song.bangericity] for song in songs]
    tableArr.sort()
    app.replaceAllTableRows('song table', tableArr)
Esempio n. 2
0
    global updateSlider
    while threading.main_thread().is_alive():
        updateSlider()
        updateSongLabel()
        time.sleep(1)


def addTag():
    name = app.stringBox('create a tag', 'tag name:')
    db.addTag(name)
    updateTagTable()


with app.tabbedFrame('tabs'):
    with app.tab('songs'):
        songs = db.getAllSongs()
        tableArr = [[song.name, song.bangericity] for song in songs]
        tableArr.sort()
        app.addTable('song table', [['Name', 'Bangericity']] + tableArr,
                     colspan=3,
                     addRow=addSong,
                     showMenu=True,
                     action=songAction)
    with app.tab('playlists'):
        playlists = db.getAllPlaylists()
        tableArr = [[playlist.name] for playlist in playlists]
        tableArr.sort()
        app.addTable('playlist table', [['Name']] + tableArr,
                     colspan=3,
                     showMenu=True,
                     action=playlistAction,