diff --git a/config/locales/ar.json b/config/locales/ar.json index 18ffee4..e6e1c5a 100644 --- a/config/locales/ar.json +++ b/config/locales/ar.json @@ -103,6 +103,7 @@ "queries": "عدد الاستعلامات:", "files": "الملفات المعروفة:", "terms": "عدد المصطلحات:", + "metadata": "الملفات مع البيانات الوصفية:", "last_crawl": "وقت آخر زحف:" }, "emulator": { diff --git a/config/locales/bn.json b/config/locales/bn.json index e7725a6..ba9b3d4 100644 --- a/config/locales/bn.json +++ b/config/locales/bn.json @@ -100,10 +100,11 @@ "save": "সেটিংস সংরক্ষণ করুন" }, "footer": { - "queries": "অনুসন্ধান সংখ্যা:", - "files": "পরিচিত ফাইল:", - "terms": "শব্দ সংখ্যা:", - "last_crawl": "সর্বশেষ আপডেটের সময়:" + "queries": "কোয়েরির সংখ্যা:", + "files": "জানা ফাইল:", + "terms": "শব্দের সংখ্যা:", + "metadata": "মেটাডেটা সহ ফাইল:", + "last_crawl": "সর্বশেষ ক্রল সময়:" }, "emulator": { "loading": { diff --git a/config/locales/de.json b/config/locales/de.json index 69f9d77..ae5ebaf 100644 --- a/config/locales/de.json +++ b/config/locales/de.json @@ -100,10 +100,11 @@ "save": "Einstellungen speichern" }, "footer": { - "queries": "Anzahl der Suchanfragen:", + "queries": "Anzahl der Abfragen:", "files": "Bekannte Dateien:", - "terms": "Indexierte Begriffe:", - "last_crawl": "Letztes Update:" + "terms": "Anzahl der Begriffe:", + "metadata": "Dateien mit Metadaten:", + "last_crawl": "Zeit des letzten Durchlaufs:" }, "emulator": { "loading": { diff --git a/config/locales/en.json b/config/locales/en.json index 22f1fc5..a0f3b8e 100644 --- a/config/locales/en.json +++ b/config/locales/en.json @@ -103,6 +103,7 @@ "queries": "Number of Queries:", "files": "Known Files:", "terms": "Term Count:", + "metadata": "Files with Metadata:", "last_crawl": "Time of Last Crawl:" }, "emulator": { diff --git a/config/locales/es.json b/config/locales/es.json index 9adb77c..7c69eef 100644 --- a/config/locales/es.json +++ b/config/locales/es.json @@ -100,10 +100,11 @@ "save": "Guardar ajustes" }, "footer": { - "queries": "Número de Consultas:", - "files": "Archivos Conocidos:", - "terms": "Cantidad de Términos:", - "last_crawl": "Última Actualización:" + "queries": "Número de consultas:", + "files": "Archivos conocidos:", + "terms": "Recuento de términos:", + "metadata": "Archivos con Metadatos:", + "last_crawl": "Hora del último rastreo:" }, "emulator": { "loading": { diff --git a/config/locales/fr.json b/config/locales/fr.json index 15d5a86..e33de32 100644 --- a/config/locales/fr.json +++ b/config/locales/fr.json @@ -103,7 +103,8 @@ "queries": "Nombre de requêtes :", "files": "Fichiers connus :", "terms": "Nombre de termes :", - "last_crawl": "Dernière mise à jour :" + "metadata": "Fichiers avec Métadonnées :", + "last_crawl": "Heure du dernier scan :" }, "emulator": { "loading": { diff --git a/config/locales/hi.json b/config/locales/hi.json index 3b30360..d6b4b03 100644 --- a/config/locales/hi.json +++ b/config/locales/hi.json @@ -101,9 +101,10 @@ }, "footer": { "queries": "क्वेरी की संख्या:", - "files": "ज्ञात फाइलें:", + "files": "ज्ञात फ़ाइलें:", "terms": "शब्दों की संख्या:", - "last_crawl": "अंतिम अपडेट का समय:" + "metadata": "मेटाडेटा वाली फ़ाइलें:", + "last_crawl": "अंतिम क्रॉल का समय:" }, "emulator": { "loading": { diff --git a/config/locales/it.json b/config/locales/it.json index 6c72755..be1c958 100644 --- a/config/locales/it.json +++ b/config/locales/it.json @@ -100,10 +100,11 @@ "save": "Salva impostazioni" }, "footer": { - "queries": "Numero di Ricerche:", - "files": "File Conosciuti:", - "terms": "Numero di Termini:", - "last_crawl": "Ultimo Aggiornamento:" + "queries": "Numero di query:", + "files": "File conosciuti:", + "terms": "Conteggio termini:", + "metadata": "File con Metadati:", + "last_crawl": "Ora dell'ultima scansione:" }, "emulator": { "loading": { diff --git a/config/locales/ja.json b/config/locales/ja.json index 9634901..efd701d 100644 --- a/config/locales/ja.json +++ b/config/locales/ja.json @@ -100,10 +100,11 @@ "save": "設定を保存" }, "footer": { - "queries": "検索クエリ数:", - "files": "登録ファイル数:", - "terms": "インデックス語数:", - "last_crawl": "最終更新時刻:" + "queries": "クエリ数:", + "files": "既知のファイル:", + "terms": "用語数:", + "metadata": "メタデータ付きファイル:", + "last_crawl": "最終クロール時刻:" }, "emulator": { "loading": { diff --git a/config/locales/ko.json b/config/locales/ko.json index fdae9aa..b3fa53d 100644 --- a/config/locales/ko.json +++ b/config/locales/ko.json @@ -100,10 +100,11 @@ "save": "설정 저장" }, "footer": { - "queries": "검색 횟수:", - "files": "등록된 파일:", - "terms": "색인된 단어 수:", - "last_crawl": "마지막 업데이트:" + "queries": "쿼리 수:", + "files": "알려진 파일:", + "terms": "용어 수:", + "metadata": "메타데이터가 있는 파일:", + "last_crawl": "마지막 크롤링 시간:" }, "emulator": { "loading": { diff --git a/config/locales/pl.json b/config/locales/pl.json index 283686a..9ef8d2e 100644 --- a/config/locales/pl.json +++ b/config/locales/pl.json @@ -103,7 +103,8 @@ "queries": "Liczba zapytań:", "files": "Znane pliki:", "terms": "Liczba terminów:", - "last_crawl": "Ostatnia aktualizacja:" + "metadata": "Pliki z Metadanymi:", + "last_crawl": "Czas ostatniego skanowania:" }, "emulator": { "loading": { diff --git a/config/locales/pt.json b/config/locales/pt.json index 76ce834..c13d25e 100644 --- a/config/locales/pt.json +++ b/config/locales/pt.json @@ -100,10 +100,11 @@ "save": "Salvar Configurações" }, "footer": { - "queries": "Total de buscas:", + "queries": "Número de consultas:", "files": "Arquivos conhecidos:", - "terms": "Total de termos:", - "last_crawl": "Última atualização:" + "terms": "Contagem de termos:", + "metadata": "Arquivos com Metadados:", + "last_crawl": "Hora da última varredura:" }, "emulator": { "loading": { diff --git a/config/locales/romaji.json b/config/locales/romaji.json index f9485d7..1c412a1 100644 --- a/config/locales/romaji.json +++ b/config/locales/romaji.json @@ -100,10 +100,11 @@ "save": "Settei wo Hozon" }, "footer": { - "queries": "Kensaku Kueri Sū:", - "files": "Tōroku Fairu Sū:", - "terms": "Indeksu Tango Sū:", - "last_crawl": "Saishū Kōshin Jikoku:" + "queries": "Kueri-suu:", + "files": "Shiru fairu:", + "terms": "Yougo-suu:", + "metadata": "Metadata-tsuki Fairu:", + "last_crawl": "Saigo no kuroru jikoku:" }, "emulator": { "loading": { diff --git a/config/locales/ru.json b/config/locales/ru.json index fb2a8b1..5b9019c 100644 --- a/config/locales/ru.json +++ b/config/locales/ru.json @@ -103,7 +103,8 @@ "queries": "Количество запросов:", "files": "Известные файлы:", "terms": "Количество терминов:", - "last_crawl": "Время последнего обхода:" + "metadata": "Файлы с Метаданными:", + "last_crawl": "Время последнего сканирования:" }, "emulator": { "loading": { diff --git a/config/locales/tr.json b/config/locales/tr.json index dc548fa..eb65f27 100644 --- a/config/locales/tr.json +++ b/config/locales/tr.json @@ -100,10 +100,11 @@ "save": "Ayarları Kaydet" }, "footer": { - "queries": "Sorgu Sayısı:", - "files": "Bilinen Dosyalar:", - "terms": "Terim Sayısı:", - "last_crawl": "Son Güncellenme Zamanı:" + "queries": "Sorgu sayısı:", + "files": "Bilinen dosyalar:", + "terms": "Terim sayısı:", + "metadata": "Meta Verili Dosyalar:", + "last_crawl": "Son tarama zamanı:" }, "emulator": { "loading": { diff --git a/config/locales/zh.json b/config/locales/zh.json index 8eef551..a7eac2b 100644 --- a/config/locales/zh.json +++ b/config/locales/zh.json @@ -102,8 +102,9 @@ "footer": { "queries": "查询次数:", "files": "已知文件:", - "terms": "索引词数:", - "last_crawl": "最近更新时间:" + "terms": "术语数量:", + "metadata": "带元数据的文件:", + "last_crawl": "最后爬取时间:" }, "emulator": { "loading": { diff --git a/server.js b/server.js index 2c1ba93..b9beb7a 100644 --- a/server.js +++ b/server.js @@ -36,9 +36,11 @@ let localeNames = await FileHandler.parseJsonFile(localeNamePath); let crawlTime = 0; let queryCount = 0; let fileCount = 0; +let metadataMatchCount = 0; let indexPage = "pages/index"; let flags = new Flag(); let consoleIcons = new ConsoleIcons(emulatorsData); +import { Op } from "sequelize"; // Initialize databases await initDB(); @@ -48,6 +50,9 @@ await initElasticsearch(); fileCount = await File.count(); crawlTime = (await File.max("updatedAt"))?.getTime() || 0; queryCount = (await QueryCount.findOne())?.count || 0; +metadataMatchCount = await File.count({ + where: { detailsId: { [Op.ne]: null } }, +}); let searchFields = ["filename", "category", "type", "region"]; @@ -86,6 +91,9 @@ async function getFilesJob() { console.log(`Finished updating file list. ${fileCount} found.`); if ((await Metadata.count()) < (await metadataManager.getIGDBGamesCount())) { await metadataManager.syncAllMetadata(); + metadataMatchCount = await File.count({ + where: { detailsId: { [Op.ne]: null } }, + }); } if (fileCount > oldFileCount) { await metadataManager.matchAllMetadata(); @@ -95,6 +103,9 @@ async function getFilesJob() { if (fileCount > oldFileCount) { metadataManager.matchAllMetadata(true); } + metadataMatchCount = await File.count({ + where: { detailsId: { [Op.ne]: null } }, + }); } function buildOptions(page, options) { @@ -105,6 +116,7 @@ let defaultOptions = { crawlTime: crawlTime, queryCount: queryCount, fileCount: fileCount, + metadataMatchCount: metadataMatchCount, generateAsciiArt: generateAsciiArt, isEmulatorCompatible: isEmulatorCompatible, isNonGameContent: isNonGameContent, @@ -115,6 +127,7 @@ function updateDefaults() { defaultOptions.crawlTime = crawlTime; defaultOptions.queryCount = queryCount; defaultOptions.fileCount = fileCount; + defaultOptions.metadataMatchCount = metadataMatchCount; } let app = express(); @@ -563,6 +576,7 @@ server.on("listening", function () { ); }); console.log(`Loaded ${fileCount} known files.`); +console.log(`${metadataMatchCount} files contain matched metadata.`); // Run file update job if needed if ( diff --git a/views/partials/footer.ejs b/views/partials/footer.ejs index 4d7a7ce..91f2f95 100644 --- a/views/partials/footer.ejs +++ b/views/partials/footer.ejs @@ -4,6 +4,8 @@
|
<%= __('footer.files') %>
|
+
<%= __('footer.metadata') %>
+
|
<%= __('footer.last_crawl') %>
@@ -11,5 +13,6 @@