mirror of
https://github.com/caseychu/spotify-backup.git
synced 2024-05-11 10:51:31 +00:00
Autodetect json file name
Detect if file name ends on '.json'. If this is the case and the name was entered manually the json dump will be saved.
This commit is contained in:
@@ -130,6 +130,7 @@ def main():
|
|||||||
# If they didn't give a filename, then just prompt them. (They probably just double-clicked.)
|
# If they didn't give a filename, then just prompt them. (They probably just double-clicked.)
|
||||||
while not args.file:
|
while not args.file:
|
||||||
args.file = input('Enter a file name (e.g. playlists.txt): ')
|
args.file = input('Enter a file name (e.g. playlists.txt): ')
|
||||||
|
args.format = args.file.split('.')[-1]
|
||||||
|
|
||||||
# Log into the Spotify API.
|
# Log into the Spotify API.
|
||||||
if args.token:
|
if args.token:
|
||||||
|
Reference in New Issue
Block a user