tmp
This commit is contained in:
parent
22e19557d8
commit
59a3be1108
10 changed files with 227 additions and 204 deletions
10
main.py
10
main.py
|
|
@ -1,5 +1,5 @@
|
|||
from common import *
|
||||
from spotifyFetch import fetch_data
|
||||
from DataBase import *
|
||||
from SpotifyWebAPI import fetch_data
|
||||
import cmd
|
||||
|
||||
playlists = get_data('playlistTracks')
|
||||
|
|
@ -8,8 +8,8 @@ top_tracks = get_data('top_tracks')
|
|||
user_tracks = get_data('tracks')
|
||||
|
||||
|
||||
def get_playlist_names():
|
||||
return [name for name, items in playlists.items()]
|
||||
def get_playlist_names(pl):
|
||||
return [name for name, items in pl.items()]
|
||||
|
||||
|
||||
def print_playlist_tracks(name):
|
||||
|
|
@ -57,7 +57,7 @@ class Interpreter(cmd.Cmd):
|
|||
|
||||
def do_playlists(self, arg):
|
||||
"""prints user playlists"""
|
||||
print("\n".join(get_playlist_names()))
|
||||
print("\n".join(get_playlist_names(playlists)))
|
||||
|
||||
def do_playlist_tracks(self, arg):
|
||||
"""prints playlist [name]"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue