Not defaulting to new mode

This commit is contained in:
Kristy Fournier 2025-03-10 12:40:38 -04:00
parent 3bb92bfc73
commit 058d1a9a3c
2 changed files with 4 additions and 5 deletions

View file

@ -7,8 +7,7 @@ loading = ["-","\\","|","/"]
parser=argparse.ArgumentParser(description="Options for the generation of the song database")
parser.add_argument('-k','--apikey', help='String: LastFM api key', default="")
# parser.add_argument('-m', '--mode', help='new/update: Remake database or update current', default= "update")
parser.add_argument('-m', '--mode', help='new mode required temporarily', default= "new")
parser.add_argument('-m', '--mode', help='new/update: Remake database or update current', default= "update")
parser.add_argument('-a', '--art', help="True/False: Add art to the database using LastFm (takes minimum 0.25s per song)", default="True")
parser.add_argument('-d','--directory',help="Directory of the song files", default="./sound/")
args = parser.parse_args()
@ -93,7 +92,7 @@ for i in songFiles:
if len(songFiles) != 1:
index = (songFiles.index(i))%4
print("\r" + str(loading[index] + str(math.floor((songFiles.index(i)/(len(songFiles)-1))*100))+ "%"), end='', flush=True)
# each "song" is stored as a dictionary containing the below stuff, and each dictionary is put into a list
# each "song" is stored as a dictionary/JSON entry following the format seen in the readME
songDatabaseList["songData"][i] = ({"title":title,"artist":artist,"art":image,"length":length})
with open('songDatabase.json', 'w') as handle: