mirror of
https://github.com/alexankitty/Myrient-Search-Engine.git
synced 2026-01-15 16:33:15 -03:00
don't match metadata if the metadata db is empty
This commit is contained in:
@@ -104,7 +104,7 @@ async function getFilesJob() {
|
||||
await optimizeDatabaseKws();
|
||||
}
|
||||
//this is less important and needs to run last.
|
||||
if (fileCount > oldFileCount) {
|
||||
if (fileCount > oldFileCount && await Metadata.count()) {
|
||||
metadataManager.matchAllMetadata(true);
|
||||
}
|
||||
metadataMatchCount = await File.count({
|
||||
@@ -117,7 +117,9 @@ async function updateMetadata() {
|
||||
if (updatingFiles) return;
|
||||
if ((await Metadata.count()) < (await metadataManager.getIGDBGamesCount())) {
|
||||
await metadataManager.syncAllMetadata();
|
||||
await metadataManager.matchAllMetadata();
|
||||
if(await Metadata.count()){
|
||||
await metadataManager.matchAllMetadata();
|
||||
}
|
||||
metadataMatchCount = await File.count({
|
||||
where: { detailsId: { [Op.ne]: null } },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user