less verbose if filename passed
This commit is contained in:
@@ -412,6 +412,7 @@ def print_rest_api_upload(config, share, token):
|
||||
|
||||
|
||||
def print_rest_api_download(config, share, token, show_filename):
|
||||
if not show_filename:
|
||||
print("Links to download files:")
|
||||
share_path = os.path.join(
|
||||
config['__root_path__'],
|
||||
@@ -431,6 +432,7 @@ def print_rest_api_download(config, share, token, show_filename):
|
||||
token,
|
||||
path2url(filename)
|
||||
))
|
||||
if not show_filename:
|
||||
print("or \n\n# curl -s %s/script/download/%s/%s | bash /dev/stdin [-f]"%(
|
||||
config['public_url'],
|
||||
share['name'],
|
||||
@@ -443,6 +445,7 @@ def print_rest_api_direct(config, share, token, show_filename):
|
||||
if 'direct_links' not in share or not share['direct_links']:
|
||||
print("Direct downloading not allowed in this share")
|
||||
sys.exit(0)
|
||||
if not show_filename:
|
||||
print("Links to direct download files:")
|
||||
share_path = os.path.join(
|
||||
config['__root_path__'],
|
||||
@@ -462,6 +465,7 @@ def print_rest_api_direct(config, share, token, show_filename):
|
||||
get_direct_token(share,filename),
|
||||
path2url(filename)
|
||||
))
|
||||
if not show_filename:
|
||||
print("or \n\n# curl -s %s/script/direct/%s/%s | bash /dev/stdin [-f]"%(
|
||||
config['public_url'],
|
||||
share['name'],
|
||||
|
||||
Reference in New Issue
Block a user