def artist(artistid): if request.method == 'POST': return redirect(url_for('search', query=request.form['query'])) from SongDownloader import SongDownloader sd = SongDownloader() artistdata = sd.getArtistData(artistid) return render_template('artist.html', artistdata=artistdata)
def search(query): if request.method == 'POST': return redirect(url_for('search', query=request.form['query'])) from SongDownloader import SongDownloader sd = SongDownloader() searchResult = sd.search(query) return render_template('search.html', query=query, searchResult=searchResult)
def song(songid): if request.method == 'POST': return redirect(url_for('search', query=request.form['query'])) from SongDownloader import SongDownloader sd = SongDownloader() songdata = sd.getSongData(songid) return render_template('song.html', songdata=songdata)