huge refactor of the entire codebase, with the goal of improving maintainability, readability, and extensibility. This commit includes changes to almost every file in the project, including:
This commit is contained in:
@@ -526,9 +526,6 @@ class HydrusNetwork(Store):
|
||||
|
||||
# Upload file if not already present
|
||||
if not file_exists:
|
||||
debug(
|
||||
f"{self._log_prefix()} Uploading: {file_path.name}"
|
||||
)
|
||||
response = client.add_file(file_path)
|
||||
|
||||
# Extract hash from response
|
||||
@@ -553,8 +550,15 @@ class HydrusNetwork(Store):
|
||||
hydrus_hash = None
|
||||
|
||||
if not hydrus_hash or len(str(hydrus_hash)) != 64:
|
||||
debug(
|
||||
f"{self._log_prefix()} Hydrus response hash missing/invalid; using precomputed hash"
|
||||
debug_panel(
|
||||
"Hydrus upload fallback",
|
||||
[
|
||||
("store", self.NAME),
|
||||
("file", file_path.name),
|
||||
("reason", "response hash missing/invalid"),
|
||||
("fallback_hash", file_hash),
|
||||
],
|
||||
border_style="yellow",
|
||||
)
|
||||
hydrus_hash = file_hash
|
||||
|
||||
|
||||
Reference in New Issue
Block a user