From 7602dc3e0fe51192688461f08853ba77397e4f93 Mon Sep 17 00:00:00 2001 From: s3inlc Date: Fri, 4 Sep 2026 08:53:43 +0200 Subject: [PATCH 1/2] move helper result data to meta instead of data --- hashtopolis/hashtopolis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hashtopolis/hashtopolis.py b/hashtopolis/hashtopolis.py index ff1a14f..cf93a9d 100644 --- a/hashtopolis/hashtopolis.py +++ b/hashtopolis/hashtopolis.py @@ -1101,14 +1101,14 @@ def get_cracks_per_day(self): uri = self._api_endpoint + self._model_uri + 'getCracksPerDay' r = requests.get(uri, headers=self._headers) self.validate_status_code(r, [200], "getCracksPerDay failed") - return r.json()['data'] + return r.json()['meta'] def get_completed_count(self): self.authenticate() uri = self._api_endpoint + self._model_uri + 'getCompletedCount' r = requests.get(uri, headers=self._headers) self.validate_status_code(r, [200], "getCompletedCount failed") - return r.json()['data'] + return r.json()['meta'] def get_global_config(self): self.authenticate() From 2c562ea21ef1c5f9b7ec008b7e2b5266512d6508 Mon Sep 17 00:00:00 2001 From: Four Random Common Words <304938239+four-random-common-words@users.noreply.github.com> Date: Mon, 7 Sep 2026 13:52:03 +0200 Subject: [PATCH 2/2] Read the recounted file from data The server's recountFileLines helper now returns the recounted File as a proper JSON:API resource object under data instead of a flat map of its fields under meta, like the other helpers that return a model. --- hashtopolis/hashtopolis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hashtopolis/hashtopolis.py b/hashtopolis/hashtopolis.py index cf93a9d..96c8076 100644 --- a/hashtopolis/hashtopolis.py +++ b/hashtopolis/hashtopolis.py @@ -1127,7 +1127,7 @@ def recount_file_lines(self, file): 'fileId': file.id, } response = self._helper_request("recountFileLines", payload) - return File(**response['meta']) + return File(**response['data']) def rescan_global_files(self): response = self._helper_request("rescanGlobalFiles", {})