Пример #1
0
def parseTopGenresFromSavedLibrary(sp):
    tracks = session['saved-library-tracks']
    if session.get('saved-library-genres-all') is None:
        session['saved-library-track-genre-dict'], session['saved-library-genres-all'] = spotify.getTrackGenreDict(tracks, sp)
    counts = spotify.getCount(session['saved-library-genres-all'])
    sorted_counts = spotify.sortCount(counts)
    session['top-genres-from-saved-library'] = sorted_counts
Пример #2
0
def parseTopGenresFromShortArtist(sp):
    artists = session['short-top-artists']
    session['short-artist-genres-all'] = spotify.getArtistGenresList(artists)
    counts = spotify.getCount(session['short-artist-genres-all'])
    sorted_count = spotify.sortCount(counts)
    session['top-genres-from-short-artist'] = sorted_count
Пример #3
0
def parseTopGenresFromShortTop(sp):
    tracks = session['short-top-tracks']
    session['short-top-track-genre-dict'], session['short-top-genres-all'] = spotify.getTrackGenreDict(tracks, sp)
    counts = spotify.getCount(session['short-top-genres-all'])
    sorted_count = spotify.sortCount(counts)
    session['top-genres-from-short-top'] = sorted_count
Пример #4
0
def parseTopGenresFromAllPlaylists(sp):
    tracks = session['all-playlist-tracks']
    session['all-playlist-track-genre-dict'], session['all-playlist-genres-all'] = spotify.getTrackGenreDict(tracks, sp)
    counts = spotify.getCount(session['all-playlist-genres-all'])
    sorted_counts = spotify.sortCount(counts)
    session['top-genres-from-all-playlist'] = sorted_counts
Пример #5
0
def parseTopArtistsFromCombined():
    counts = spotify.getCount(session['combined-artists-all'])
    session['top-artists-from-combined'] = spotify.sortCount(counts)
Пример #6
0
def parseTopGenresFromCombined():
    counts = spotify.getCount(session['combined-genres-all'])
    session['top-genres-from-combined'] = spotify.sortCount(counts)
Пример #7
0
def parseTopArtistFromPlaylist(sp):
    tracks = session['all-playlist-tracks']
    # tracks = spotify.limitSavedTracks(tracks, 100)
    session['playlist-artists-track-artist-dict'], session['playlist-artists-all'] = spotify.getTrackArtistDict(tracks)
    counts = spotify.getCount(session['playlist-artists-all']) 
    session['top-artists-from-playlist'] = spotify.sortCount(counts)
Пример #8
0
def parseTopArtistsFromSavedLibrary(sp):
    tracks = session['saved-library-tracks']
    # tracks = spotify.limitSavedTracks(tracks, 100)
    session['library-artists-track-artist-dict'], session['library-artists-all'] = spotify.getTrackArtistDict(tracks)
    counts = spotify.getCount(session['library-artists-all']) 
    session['top-artists-from-library'] = spotify.sortCount(counts)