Squashed commit of the following:
commit c3957d6e463500a0a83e8ddbb679bfa6a8d68795
Author: afterlifepro <vielle.dev@proton.me>
Date: Thu Jul 31 22:31:38 2025 +0100
Remove unneeded ./.accessToken file
commit 9879afa45312cd0bfc1ef21d32cd5ab489ad84e6
Author: afterlifepro <vielle.dev@proton.me>
Date: Thu Jul 31 22:30:05 2025 +0100
formatting tweaks in NowPlaying.astro
commit 98f28fc2ad1f5e306681ac9b791258116baf8850
Author: afterlifepro <vielle.dev@proton.me>
Date: Thu Jul 31 22:27:17 2025 +0100
Re add the javascript update logic
commit bf6f3ac55be5050092ee018855c526a8acd02234
Author: afterlifepro <vielle.dev@proton.me>
Date: Thu Jul 31 22:14:14 2025 +0100
Make sure client types are conformed to in sse
commit b6e76820328cdbc60ea9cb91ed18c0ba394f7659
Author: afterlifepro <vielle.dev@proton.me>
Date: Thu Jul 31 22:13:59 2025 +0100
Create types for use on the client to type data from sse
commit a98cf36818ebbca527c1d6d8a7f401abdf0a46b8
Author: afterlifepro <vielle.dev@proton.me>
Date: Thu Jul 31 22:12:49 2025 +0100
Update format for `/now-playing-sse`
This new format only includes data needed for the client to update and should be nicer to work with since its not randomly nested!
Properties dont line up to those in the spotify API but idc
commit 24a10bee4b28225c64a954a393bcdffad95af7b9
Author: afterlifepro <vielle.dev@proton.me>
Date: Thu Jul 31 21:05:02 2025 +0100
Re-add all the old SSR NowPlaying content (with slight tweaks as required)
TODO:
- reimplement new /now-playing-sse
- reimplement update functionality
commit 862b22fab85e1c21bbd29bd1367961835f42a468
Author: afterlifepro <vielle.dev@proton.me>
Date: Thu Jul 31 14:53:48 2025 +0100
Create instance of the sdk object.
In order to ensure that this works even if the server crashes and the token expires before the server reboots, after each request the refresh token is written to `./.refreshToken`.
When the sdk is required, first the refresh token is loaded from the file, before being used to make a raw API request to get a new access token. This response is validated to make sure all required fields are present before being passed to the sdk.
If any of this fails, an unhandled exception is thrown since this is unrecoverable but should only run at server start
commit c3ab9fd8e59ac093e4de1928b496a7d00d8cc129
Author: afterlifepro <vielle.dev@proton.me>
Date: Thu Jul 31 12:44:19 2025 +0100
/callback now gets the refresh token from the result and writes that to ./.refreshToken because the ./.accessToken method wasnt working and its easier to just refresh access on start
commit 52d4e26d5e0a9db48801238cb8555374753ca5c8
Author: afterlifepro <vielle.dev@proton.me>
Date: Thu Jul 31 12:14:47 2025 +0100
Patch the spotify API so that its typed properly
(like seriously spotify is typing ur apis really so hard. i changed like 1 line and fixed a couple issues which cascaded from it. Cmon)
commit 1243067fd309e81f4ea611171951658c89ff6ab7
Author: afterlifepro <vielle.dev@proton.me>
Date: Thu Jul 31 00:46:35 2025 +0100
/callback now writes the result straight to ./.accessToken to be used later
commit 4abcb8a456288aebb0bb25871216dd61c76380f2
Author: afterlifepro <vielle.dev@proton.me>
Date: Thu Jul 31 00:41:31 2025 +0100
Gut all files as theyre going to be mainly replace with the spotify API
commit 79e93e3088ead5b71a5524b6b15b9875bca6076f
Author: afterlifepro <vielle.dev@proton.me>
Date: Thu Jul 31 00:40:58 2025 +0100
Completely gut NowPlaying for now. Content will be re-added when im happy with the API working properly. This is because I'm going to completely change the API signature
commit 4ea096b330c99e4498c94bd6cccddf1df0167c82
Author: afterlifepro <vielle.dev@proton.me>
Date: Thu Jul 31 00:39:28 2025 +0100
Add spotify sdk and add .accessToken to gitignore for later