@@ -142,11 +142,18 @@ export class FileParser {
142142 missingUserAccounts : filteredAccounts . missing ,
143143 steamDirectory : configs [ i ] . steamDirectory ,
144144 files : [ ] ,
145- failed : [ ]
145+ failed : _ . cloneDeep ( data [ i ] . failed )
146146 } ) ;
147147
148148 for ( let j = 0 ; j < data [ i ] . success . length ; j ++ ) {
149149 let fuzzyTitle = data [ i ] . success [ j ] . fuzzyTitle || data [ i ] . success [ j ] . extractedTitle ;
150+
151+ // Fail empty titles
152+ if ( fuzzyTitle . length === 0 ) {
153+ parsedConfigs [ i ] . failed . push ( data [ i ] . success [ j ] . filePath ) ;
154+ continue ;
155+ }
156+
150157 let executableLocation = configs [ i ] . executableLocation ? configs [ i ] . executableLocation : data [ i ] . success [ j ] . filePath ;
151158
152159 parsedConfigs [ i ] . files . push ( {
@@ -189,8 +196,6 @@ export class FileParser {
189196 } ) ) : [ ] ;
190197 }
191198
192- parsedConfigs [ i ] . failed = _ . cloneDeep ( data [ i ] . failed ) ;
193-
194199 localImagePromises . push ( this . resolveFieldGlobs ( 'localImages' , configs [ i ] , parsedConfigs [ i ] , vParser ) . then ( ( data ) => {
195200 for ( let j = 0 ; j < data . parsedConfig . files . length ; j ++ ) {
196201 data . parsedConfig . files [ j ] . resolvedLocalImages = data . resolvedGlobs [ j ] ;
@@ -246,6 +251,13 @@ export class FileParser {
246251 if ( found )
247252 break ;
248253 }
254+ if ( config . titleFromVariable . skipFileIfVariableWasNotFound && ! found )
255+ data . success [ i ] . extractedTitle = '' ;
256+ }
257+ }
258+ else if ( config . titleFromVariable . skipFileIfVariableWasNotFound ) {
259+ for ( let i = 0 ; i < data . success . length ; i ++ ) {
260+ data . success [ i ] . extractedTitle = '' ;
249261 }
250262 }
251263 }
0 commit comments