mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-12-08 20:39:08 +00:00
Add -V/--version flag
This commit is contained in:
@@ -108,6 +108,10 @@ def get_arguments(raw_args=None, to_group=True, to_merge=True):
|
|||||||
group.add_argument(
|
group.add_argument(
|
||||||
'-u', '--username',
|
'-u', '--username',
|
||||||
help="load tracks from user's playlist into <playlist_name>.txt")
|
help="load tracks from user's playlist into <playlist_name>.txt")
|
||||||
|
group.add_argument(
|
||||||
|
'-V', '--version',
|
||||||
|
help="show version and exit",
|
||||||
|
action='store_true')
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-m', '--manual', default=config['manual'],
|
'-m', '--manual', default=config['manual'],
|
||||||
|
|||||||
@@ -171,6 +171,11 @@ def download_single(raw_song, number=None):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
const.args = handle.get_arguments()
|
const.args = handle.get_arguments()
|
||||||
|
|
||||||
|
if const.args.version:
|
||||||
|
print('spotdl {version}'.format(version=__version__))
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
internals.filter_path(const.args.folder)
|
internals.filter_path(const.args.folder)
|
||||||
youtube_tools.set_api_key()
|
youtube_tools.set_api_key()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user