diff --git a/app/Tasks/CurrentSongTask.ts b/app/Tasks/CurrentSongTask.ts index 6a8fa5f..1f95bb6 100644 --- a/app/Tasks/CurrentSongTask.ts +++ b/app/Tasks/CurrentSongTask.ts @@ -1,11 +1,12 @@ import Logger from '@ioc:Adonis/Core/Logger' -import { getCurrentPlayingFromSpotify, getSpotifyAccount } from 'App/Utils/SongUtils' +import { getCurrentPlayingFromSpotify, getSpotifyAccount, resetCurrentSongCache } from 'App/Utils/SongUtils' const MS = 1000 let taskId async function SpotifyCurrentListeningWatcher(): Promise { - if ((await getSpotifyAccount()).access_token === '') return + if ((await getSpotifyAccount()).access_token === '') + await resetCurrentSongCache() await getCurrentPlayingFromSpotify() }