From 602eada4308ad5e91f3e5a74ff9df5b4aad27f5b Mon Sep 17 00:00:00 2001 From: Kay Kurokawa Date: Mon, 5 Jun 2017 14:21:55 -0400 Subject: [PATCH] fix delete_all option in file_delete API command --- lbrynet/lbrynet_daemon/Daemon.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lbrynet/lbrynet_daemon/Daemon.py b/lbrynet/lbrynet_daemon/Daemon.py index 1c097f7fb..7bbc2d5be 100644 --- a/lbrynet/lbrynet_daemon/Daemon.py +++ b/lbrynet/lbrynet_daemon/Daemon.py @@ -1547,7 +1547,8 @@ class Daemon(AuthJSONRPCServer): [--name=] 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 --sd_hash= : delete by file sd hash --file_name : delete by file name in downloads folder @@ -1567,7 +1568,8 @@ class Daemon(AuthJSONRPCServer): if not delete_all: log.warning("There are %i files to delete, use narrower filters to select one", len(lbry_files)) - result = False + response = yield self._render_response(False) + defer.returnValue(response) else: log.warning("Deleting %i files", len(lbry_files)) @@ -1584,6 +1586,7 @@ class Daemon(AuthJSONRPCServer): delete_file=delete_target_file) log.info("Deleted %s (%s)", file_name, utils.short_hash(stream_hash)) result = True + response = yield self._render_response(result) defer.returnValue(response)