File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
backend/storeManagers/steam Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -130,11 +130,21 @@ export async function refresh(): Promise<null> {
130
130
continue
131
131
}
132
132
133
+ let artSquare = `${ steamDBBaseURL } /${ steamGame . appid } /library_600x900.jpg`
134
+ let artCover = `${ steamDBBaseURL } /${ steamGame . appid } /header.jpg`
135
+
136
+ try {
137
+ await axios . head ( artSquare )
138
+ } catch ( e ) {
139
+ artSquare = 'fallback'
140
+ artCover = 'fallback'
141
+ }
142
+
133
143
const newGameObject : GameInfo = {
134
144
app_name : steamGame . appid . toString ( ) ,
135
145
runner : 'steam' ,
136
- art_square : ` ${ steamDBBaseURL } / ${ steamGame . appid } /library_600x900.jpg` ,
137
- art_cover : ` ${ steamDBBaseURL } / ${ steamGame . appid } /header.jpg` ,
146
+ art_square : artSquare ,
147
+ art_cover : artCover ,
138
148
canRunOffline : false ,
139
149
title : steamGame . name ,
140
150
is_installed : false ,
Original file line number Diff line number Diff line change @@ -3,15 +3,20 @@ import { CachedImage } from 'frontend/components/UI'
3
3
4
4
import './index.css'
5
5
import fallbackImage from 'frontend/assets/fallback_card.jpg'
6
+ import steamFallBackImage from 'frontend/assets/steam-fallback-card.png'
6
7
7
8
type Props = {
8
9
art_square : string
9
10
store : string
10
11
}
11
12
12
13
export function getImageFormattingForArtSquare ( { art_square, store } : Props ) {
14
+ const isSteam = store === 'steam'
13
15
if ( art_square === 'fallback' || ! art_square )
14
- return { src : fallbackImage , fallback : fallbackImage }
16
+ return {
17
+ src : isSteam ? steamFallBackImage : fallbackImage ,
18
+ fallback : fallbackImage
19
+ }
15
20
if ( store === 'legendary' ) {
16
21
return {
17
22
src : `${ art_square } ?h=800&resize=1&w=600` ,
You can’t perform that action at this time.
0 commit comments