🔃 Sync Hub v0.6.2

This commit is contained in:
jokob-sk
2024-06-06 18:50:15 +10:00
parent be4ca42803
commit ac8bbca37f
7 changed files with 4 additions and 1 deletions

0
front/php/templates/language/de_de.json Normal file → Executable file
View File

0
front/php/templates/language/es_es.json Normal file → Executable file
View File

0
front/php/templates/language/it_it.json Normal file → Executable file
View File

View File

@@ -32,6 +32,7 @@ def merge_translations(main_file, other_files):
if __name__ == "__main__":
current_path = os.path.dirname(os.path.abspath(__file__))
# language codes can be found here: http://www.lingoes.net/en/translator/langcode.htm
json_files = ["en_us.json", "de_de.json", "es_es.json", "fr_fr.json", "nb_no.json", "ru_ru.json", "it_it.json", "pt_br.json", "pl_pl.json", "zh_cn.json", "tr_tr.json"]
file_paths = [os.path.join(current_path, file) for file in json_files]
merge_translations(file_paths[0], file_paths[1:])

0
front/php/templates/language/ru_ru.json Normal file → Executable file
View File

View File

@@ -43,6 +43,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
file_put_contents($file_path, $data);
http_response_code(200);
echo 'Data received and stored successfully';
write_notification("[Plugin: Sync hub API] Data received", "info");
} else {
http_response_code(405);
echo 'Method Not Allowed';

View File

@@ -268,7 +268,8 @@ def update_devices_data_from_scan (db):
mylog('debug','[Update Devices] - 4 Unknown Name')
sql.execute ("""UPDATE Devices
SET dev_NAME = (SELECT cur_Name FROM CurrentScan
WHERE cur_MAC = dev_MAC)
WHERE cur_MAC = dev_MAC
and dev_Name not in ("(unknown)", "(name not found)", ""))
WHERE (dev_Name in ("(unknown)", "(name not found)", "" )
OR dev_Name IS NULL)
AND EXISTS (SELECT 1 FROM CurrentScan