mirror of
https://codeberg.org/lucida/lucida.git
synced 2026-11-16 08:37:23 -05:00
fix deezer token expiry checks
This commit is contained in:
@@ -417,11 +417,11 @@ export default class Deezer implements StreamerWithLogin {
|
|||||||
trackTokenExpiry: number,
|
trackTokenExpiry: number,
|
||||||
format: DeezerFormat
|
format: DeezerFormat
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
if (Date.now() - (this.renewTimestamp ?? 0) >= 3600)
|
if (Date.now() - (this.renewTimestamp ?? 0) >= 3600 * 1000)
|
||||||
// renew license token
|
// renew license token
|
||||||
await this.#apiCall('deezer.getUserData')
|
await this.#apiCall('deezer.getUserData')
|
||||||
|
|
||||||
if (Date.now() - trackTokenExpiry >= 0)
|
if (Date.now() / 1000 - trackTokenExpiry >= 0)
|
||||||
// renew track token
|
// renew track token
|
||||||
trackToken = (
|
trackToken = (
|
||||||
await this.#apiCall('song.getData', {
|
await this.#apiCall('song.getData', {
|
||||||
|
|||||||
Reference in New Issue
Block a user