continuing refactor

This commit is contained in:
2026-05-03 21:20:05 -07:00
parent 77cab1bd27
commit 5534812426
50 changed files with 1004 additions and 428 deletions
+5 -5
View File
@@ -793,9 +793,9 @@ def main() -> int:
conn.row_factory = sqlite3.Row
cur = conn.cursor()
# Find all existing hydrusnetwork store names
# Find all existing hydrusnetwork instance names
cur.execute(
"SELECT DISTINCT item_name FROM config WHERE category='store' AND subtype='hydrusnetwork'"
"SELECT DISTINCT item_name FROM config WHERE category='plugin' AND subtype='hydrusnetwork'"
)
rows = cur.fetchall()
item_names = [r[0] for r in rows if r[0]]
@@ -804,12 +804,12 @@ def main() -> int:
# Only create if none exist. Use a sensible name from the path if possible.
# We don't have the hydrus_path here easily, but we can try to find it.
# For now, if we are in bootstrap, we might just be setting a global.
# But this function is specifically for store settings.
# But this function is specifically for instance settings.
# Let's use 'home' instead of 'hydrus' as it's the standard default.
item_name = "home"
cur.execute(
"INSERT OR REPLACE INTO config (category, subtype, item_name, key, value) VALUES (?, ?, ?, ?, ?)",
('store', 'hydrusnetwork', item_name, 'NAME', item_name)
('plugin', 'hydrusnetwork', item_name, 'NAME', item_name)
)
item_names = [item_name]
@@ -817,7 +817,7 @@ def main() -> int:
for name in item_names:
cur.execute(
"INSERT OR REPLACE INTO config (category, subtype, item_name, key, value) VALUES (?, ?, ?, ?, ?)",
('store', 'hydrusnetwork', name, key, value)
('plugin', 'hydrusnetwork', name, key, value)
)
conn.commit()