()
| 116 | } |
| 117 | |
| 118 | async function updateMetadata() { |
| 119 | if (updatingFiles) return; |
| 120 | let updateMatches = process.env.FORCE_METADATA_RESYNC == "1" ? true : false; |
| 121 | if ((await Metadata.count()) < (await metadataManager.getIGDBGamesCount())) { |
| 122 | await metadataManager.syncAllMetadata(); |
| 123 | updateMatches = true; |
| 124 | } |
| 125 | if (updateMatches) { |
| 126 | if (await Metadata.count()) { |
| 127 | await metadataManager.matchAllMetadata(); |
| 128 | } |
| 129 | metadataMatchCount = await File.count({ |
| 130 | where: { detailsId: { [Op.ne]: null } }, |
| 131 | }); |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | async function updateKws() { |
| 136 | if (updatingFiles) return; |
no test coverage detected