Do not ask for YT creds if no command is set
This commit is contained in:
parent
5590a794b3
commit
7d280e3c04
@ -312,6 +312,9 @@ def main():
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
if args.command is None:
|
||||
parser.print_help()
|
||||
return 1
|
||||
|
||||
# Disable OAuthlib's HTTPS verification when running locally.
|
||||
# *DO NOT* leave this option enabled in production.
|
||||
@ -321,11 +324,7 @@ def main():
|
||||
creds = get_yt_creds()
|
||||
youtube = build(api_service_name, api_version, credentials=creds)
|
||||
|
||||
if args.command is None:
|
||||
parser.print_help()
|
||||
return 1
|
||||
|
||||
elif args.command in ('copy', 'move'):
|
||||
if args.command in ('copy', 'move'):
|
||||
delete_from_src = args.command == 'move'
|
||||
copy_playlist_items(
|
||||
youtube,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user