Example #1
0
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)
Example #2
0
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)
Example #3
0
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)