data endpoint for entity 90008 (aka. a website)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: playing -> played etc.

dusk 1dc349a2 b7d61fa0

+14 -4
+6 -2
src/lib/bluesky.ts
··· 37 37 const lastPosts = writable<Post[]>([]) 38 38 39 39 export const updateLastPosts = async () => { 40 - const { posts } = await getUserPosts("did:plc:dfl62fgb7wtjj3fcbb72naae", 13) 41 - lastPosts.set(posts) 40 + try { 41 + const { posts } = await getUserPosts("did:plc:dfl62fgb7wtjj3fcbb72naae", 13) 42 + lastPosts.set(posts) 43 + } catch (err) { 44 + console.log(`can't update last posts ${err}`) 45 + } 42 46 } 43 47 44 48 export const getLastPosts = () => { return get(lastPosts) }
+3
src/lib/lastfm.ts
··· 8 8 image: string | null, 9 9 link: string, 10 10 when: number, 11 + playing: boolean, 11 12 } 12 13 const lastTrack = writable<LastTrack | null>(null) 13 14 ··· 24 25 image: track.image[2]['#text'] ?? null, 25 26 link: track.url, 26 27 when: Date.now(), 28 + playing: true, 27 29 } 28 30 lastTrack.set(data) 29 31 } catch(why) { 30 32 console.log("could not fetch last fm: ", why) 33 + lastTrack.update((t) => { if (t !== null) { t.playing = false; } return t }) 31 34 } 32 35 } 33 36
+3
src/lib/steam.ts
··· 11 11 icon: string, 12 12 pfp: string, 13 13 when: number, 14 + playing: boolean, 14 15 } 15 16 16 17 const steamgriddbClient = writable<SGDB | null>(null) ··· 35 36 icon: icons[0].thumb.toString(), 36 37 pfp: profile.avatarmedium, 37 38 when: Date.now(), 39 + playing: true, 38 40 } 39 41 lastGame.set(game) 40 42 } catch(why) { 41 43 console.log("could not fetch steam: ", why) 44 + lastGame.update((t) => { if (t !== null) { t.playing = false; } return t }) 42 45 } 43 46 } 44 47
+2 -2
src/routes/+page.svelte
··· 177 177 <p 178 178 class="text-shadow-green text-ralsei-green-light text-sm text-ellipsis text-nowrap overflow-hidden max-w-[30ch]" 179 179 > 180 - <span class="text-sm text-shadow-white text-ralsei-white">listening to</span> 180 + <span class="text-sm text-shadow-white text-ralsei-white">{data.lastTrack.playing ? "listening to" : "listened to"}</span> 181 181 <a 182 182 title={data.lastTrack.name} 183 183 href="https://www.last.fm/user/yusdacra" ··· 212 212 <p 213 213 class="text-shadow-green text-ralsei-green-light text-sm text-ellipsis text-nowrap overflow-hidden max-w-[30ch]" 214 214 > 215 - <span class="text-sm text-shadow-white text-ralsei-white">playing</span> 215 + <span class="text-sm text-shadow-white text-ralsei-white">{data.lastGame.playing ? "playing" : "played"}</span> 216 216 <a title={data.lastGame.name} class="hover:underline" href={data.lastGame.link} 217 217 >{data.lastGame.name}</a 218 218 >