Closed miraclx closed 9 months ago
https://music.apple.com/assets/index-d98aab9a.js
Why is the docker image still running with a 401 error even though I replaced the tonken in the default conf.json with the latest token?
First, can you file another issue? since this is a tracking issue for automation not token-related issues.
And in that, can you elaborate on how you are updating the token and building the image?
@miraclx This may be of use https://github.com/lujjjh/LitoMusic/blob/main/scripts/update-developer-token.sh.
@zykrah, yeah it's practically equivalent to the script I have in the OP. Just that they're writing it to the file at the end, but you still have to manually call the script.
For freyr, I would like to integrate it directly so that when freyr itself detects that the token has expired, it updates it itself.
I've translated the process into a python script, I don't know much JavaScript but I'm sure it wouldn't be too difficult using requests and regex/whatever other string manipulation? As for detection of whether the token has expired, couldn't you just test for 401 responses whenever you call to the endpoint and then run the token update function (and cache it locally?).
Yes, exactly. We already have detection, just not update and eventual persistence.
Haven't had the time for a while. 😓
how can i do this on my own, i cant run the commands (linux)
nvm i got used the script and it worked
@Khadeeejah just submitted #623, which is a promising resolution for this issue.
The most filed, recurring issue is the Apple Music token expiring - https://github.com/miraclx/freyr-js/issues/14, https://github.com/miraclx/freyr-js/issues/70, https://github.com/miraclx/freyr-js/issues/91, https://github.com/miraclx/freyr-js/pull/399, https://github.com/miraclx/freyr-js/issues/439, https://github.com/miraclx/freyr-js/issues/481, https://github.com/miraclx/freyr-js/issues/497, https://github.com/miraclx/freyr-js/issues/498, https://github.com/miraclx/freyr-js/issues/501, https://github.com/miraclx/freyr-js/issues/530, https://github.com/miraclx/freyr-js/issues/534, https://github.com/miraclx/freyr-js/issues/548, https://github.com/miraclx/freyr-js/issues/584 and https://github.com/miraclx/freyr-js/issues/585.
It would be great to have the updates automated, and not require new releases of freyr.
Right now? I do the process manually which is;
We should be able to do this extraction inside freyr itself like we do with Spotify to auto-refresh the token.