Update config.json files to add 'ordeable' option and refactor cacheStrings function for consistency

This commit is contained in:
Jokob @NetAlertX
2026-03-17 09:22:25 +00:00
parent c7399215ec
commit 0a7ecb5b7c
20 changed files with 49 additions and 45 deletions

View File

@@ -23,10 +23,10 @@ class NameResolver:
nameNotFound = ResolvedName()
# Check by MAC
sql.execute(f"""
sql.execute("""
SELECT watchedValue2 FROM Plugins_Objects
WHERE plugin = '{plugin}' AND objectPrimaryId = '{pMAC}'
""")
WHERE plugin = ? AND objectPrimaryId = ?
""", (plugin, pMAC))
result = sql.fetchall()
# self.db.commitDB() # Issue #1251: Optimize name resolution lookup
if result:
@@ -36,10 +36,10 @@ class NameResolver:
# Check name by IP if enabled
if get_setting_value('NEWDEV_IP_MATCH_NAME'):
sql.execute(f"""
sql.execute("""
SELECT watchedValue2 FROM Plugins_Objects
WHERE plugin = '{plugin}' AND objectSecondaryId = '{pIP}'
""")
WHERE plugin = ? AND objectSecondaryId = ?
""", (plugin, pIP))
result = sql.fetchall()
# self.db.commitDB() # Issue #1251: Optimize name resolution lookup
if result: