def collect_songs(self): self.songs = get_all_songs() shuffle(self.songs)
def _index(): songs = get_all_songs() current_song = get_playing_song() return render_template('index.html', songs=songs, current_song=current_song)
from player.player import Player from flaskr.models import sess from functions.songs import get_all_songs for song in get_all_songs(): song.playing = 0 sess.commit() player = Player() player.start()
def _songlister(): songs = get_all_songs() current_song = get_playing_song() return render_template('songlister.html', songs=songs, current_song=current_song)