File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -1680,7 +1680,7 @@ async function callRunner(
1680
1680
await writer . logInfo (
1681
1681
[ prefix , safeCommand , '\n\n' ] . filter ( Boolean ) . join ( ' ' )
1682
1682
)
1683
- await writer . logInfo ( 'Game Output:' )
1683
+ if ( appName ) await writer . logInfo ( 'Game Output:' )
1684
1684
}
1685
1685
1686
1686
const files = options . logWriters
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import { dirname, join } from 'node:path'
29
29
import { existsSync , readFileSync } from 'graceful-fs'
30
30
31
31
import {
32
+ getRunnerLogWriter ,
32
33
logDebug ,
33
34
logError ,
34
35
logInfo ,
@@ -447,6 +448,25 @@ export async function refresh(): Promise<ExecResult> {
447
448
448
449
apiInfoCache . commit ( ) // Sync cache to drive
449
450
libraryStore . set ( 'games' , gamesObjects )
451
+
452
+ void new Promise ( ( ) => {
453
+ const logLines : string [ ] = [ ]
454
+ gamesObjects . forEach ( ( gameData ) => {
455
+ if ( gameData . title == 'Galaxy Common Redistributables' ) return
456
+
457
+ let line = `* ${ gameData . title } (App name: ${ gameData . app_name } )`
458
+ if ( gameData . install . is_dlc ) line += ' - DLC'
459
+ logLines . push ( line )
460
+ } )
461
+ const sortedTitles = logLines . sort ( ( a , b ) =>
462
+ a . toLowerCase ( ) . localeCompare ( b . toLowerCase ( ) )
463
+ )
464
+
465
+ const logContent = `Games List:\n${ sortedTitles . join ( '\n' ) } \n\nTotal: ${ logLines . length } \n`
466
+ const gogLogWriter = getRunnerLogWriter ( 'gog' )
467
+ void gogLogWriter . logInfo ( logContent )
468
+ } )
469
+
450
470
logInfo ( 'Saved games data' , LogPrefix . Gog )
451
471
452
472
return defaultExecResult
You can’t perform that action at this time.
0 commit comments