File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ async function getFilesJob() {
104104 await optimizeDatabaseKws ( ) ;
105105 }
106106 //this is less important and needs to run last.
107- if ( fileCount > oldFileCount ) {
107+ if ( fileCount > oldFileCount && await Metadata . count ( ) ) {
108108 metadataManager . matchAllMetadata ( true ) ;
109109 }
110110 metadataMatchCount = await File . count ( {
@@ -117,7 +117,9 @@ async function updateMetadata() {
117117 if ( updatingFiles ) return ;
118118 if ( ( await Metadata . count ( ) ) < ( await metadataManager . getIGDBGamesCount ( ) ) ) {
119119 await metadataManager . syncAllMetadata ( ) ;
120- await metadataManager . matchAllMetadata ( ) ;
120+ if ( await Metadata . count ( ) ) {
121+ await metadataManager . matchAllMetadata ( ) ;
122+ }
121123 metadataMatchCount = await File . count ( {
122124 where : { detailsId : { [ Op . ne ] : null } } ,
123125 } ) ;
You can’t perform that action at this time.
0 commit comments