Skip to content
Snippets Groups Projects
Commit 09f6a02d authored by Robert Goldmann's avatar Robert Goldmann
Browse files

added command line option to determine version

parent 8672bd2a
Branches
Tags
No related merge requests found
...@@ -160,9 +160,17 @@ class SaveMyPlaylist: ...@@ -160,9 +160,17 @@ class SaveMyPlaylist:
return fileName return fileName
if __name__ == '__main__': def run():
with open("config/settings.json", "r") as f: with open("config/settings.json", "r") as f:
SETTINGS = json.load(f) SETTINGS = json.load(f)
saveMyPlaylist = SaveMyPlaylist(SETTINGS['apiKey'], SETTINGS['playlistId']) saveMyPlaylist = SaveMyPlaylist(SETTINGS['apiKey'], SETTINGS['playlistId'])
saveMyPlaylist.download_items(SETTINGS['destinationFolder'], SETTINGS['skipDownload']) saveMyPlaylist.download_items(SETTINGS['destinationFolder'], SETTINGS['skipDownload'])
if __name__ == '__main__':
if len(sys.argv) > 1:
if sys.argv[1] == '--version':
print('.'.join(str(part) for part in VERSION))
else:
run()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment