forked from LBRYCommunity/lbry-sdk
fix delete_all option in file_delete API command
This commit is contained in:
parent
01d906b06a
commit
602eada430
1 changed files with 5 additions and 2 deletions
|
@ -1547,7 +1547,8 @@ class Daemon(AuthJSONRPCServer):
|
||||||
[--name=<name>]
|
[--name=<name>]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-a : delete file from downloads and delete stored blobs
|
-a : if there are multiple matching files, allow the deletion
|
||||||
|
of multiple files. Otherwise do not delete anything.
|
||||||
-f : delete only from downloads, do not delete blobs
|
-f : delete only from downloads, do not delete blobs
|
||||||
--sd_hash=<sd_hash> : delete by file sd hash
|
--sd_hash=<sd_hash> : delete by file sd hash
|
||||||
--file_name<file_name> : delete by file name in downloads folder
|
--file_name<file_name> : delete by file name in downloads folder
|
||||||
|
@ -1567,7 +1568,8 @@ class Daemon(AuthJSONRPCServer):
|
||||||
if not delete_all:
|
if not delete_all:
|
||||||
log.warning("There are %i files to delete, use narrower filters to select one",
|
log.warning("There are %i files to delete, use narrower filters to select one",
|
||||||
len(lbry_files))
|
len(lbry_files))
|
||||||
result = False
|
response = yield self._render_response(False)
|
||||||
|
defer.returnValue(response)
|
||||||
else:
|
else:
|
||||||
log.warning("Deleting %i files",
|
log.warning("Deleting %i files",
|
||||||
len(lbry_files))
|
len(lbry_files))
|
||||||
|
@ -1584,6 +1586,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
delete_file=delete_target_file)
|
delete_file=delete_target_file)
|
||||||
log.info("Deleted %s (%s)", file_name, utils.short_hash(stream_hash))
|
log.info("Deleted %s (%s)", file_name, utils.short_hash(stream_hash))
|
||||||
result = True
|
result = True
|
||||||
|
|
||||||
response = yield self._render_response(result)
|
response = yield self._render_response(result)
|
||||||
defer.returnValue(response)
|
defer.returnValue(response)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue