continuing refactor
This commit is contained in:
@@ -188,7 +188,7 @@ def update_medios_config(hydrus_path: Path) -> bool:
|
||||
cur = conn.cursor()
|
||||
|
||||
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 = [row[0] for row in cur.fetchall() if row[0]]
|
||||
|
||||
@@ -196,14 +196,14 @@ def update_medios_config(hydrus_path: Path) -> bool:
|
||||
store_name = _sanitize_store_name(hydrus_path.name)
|
||||
cur.execute(
|
||||
"INSERT OR REPLACE INTO config (category, subtype, item_name, key, value) VALUES (?, ?, ?, ?, ?)",
|
||||
('store', 'hydrusnetwork', store_name, 'name', store_name)
|
||||
('plugin', 'hydrusnetwork', store_name, 'name', store_name)
|
||||
)
|
||||
rows = [store_name]
|
||||
|
||||
for name in rows:
|
||||
cur.execute(
|
||||
"INSERT OR REPLACE INTO config (category, subtype, item_name, key, value) VALUES (?, ?, ?, ?, ?)",
|
||||
('store', 'hydrusnetwork', name, 'gitclone', hydrus_abs_path)
|
||||
('plugin', 'hydrusnetwork', name, 'gitclone', hydrus_abs_path)
|
||||
)
|
||||
|
||||
conn.commit()
|
||||
|
||||
Reference in New Issue
Block a user