Rename optionalRemove to optionalRemoved and accept hash only by id

This commit is contained in:
shortcutme 2018-03-29 02:54:52 +02:00
parent 17be72e55e
commit f162987a4f
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 13 additions and 15 deletions

View file

@ -14,6 +14,7 @@ if "_" not in locals():
bigfile_sha512_cache = {}
@PluginManager.registerTo("UiWebsocket")
class UiWebsocketPlugin(object):
def __init__(self, *args, **kwargs):
@ -228,7 +229,7 @@ class UiWebsocketPlugin(object):
if not row:
return self.response(to, {"error": "Not found in content.db"})
removed = site.content_manager.optionalRemove(inner_path, row["hash_id"], row["size"])
removed = site.content_manager.optionalRemoved(inner_path, row["hash_id"], row["size"])
# if not removed:
# return self.response(to, {"error": "Not found in hash_id: %s" % row["hash_id"]})
@ -242,7 +243,6 @@ class UiWebsocketPlugin(object):
self.response(to, "ok")
# Limit functions
def actionOptionalLimitStats(self, to):