fix: improved Spotify auth check flow, refs NOISSUE
This commit is contained in:
parent
e0b0d6b98c
commit
918ed2e667
@ -87,8 +87,9 @@ likePlaylistCheckTimer.OnOccurence += async (s, ea) =>
|
|||||||
if (!await spotifyApiClient.IsUserAuthenticatedAsync(user))
|
if (!await spotifyApiClient.IsUserAuthenticatedAsync(user))
|
||||||
{
|
{
|
||||||
logger.LogWarning($"User {user.LdapUserName} is not authorized with Spotify - skipping playlist sync");
|
logger.LogWarning($"User {user.LdapUserName} is not authorized with Spotify - skipping playlist sync");
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
var foundPlaylist = dci.SmartPlaylistDefinitions?.Where(p => p.CreatedBy == user).ToList().Where(p => p.IsThisUsersLikedSongsPlaylist).SingleOrDefault();
|
var foundPlaylist = dci.SmartPlaylistDefinitions?.Where(p => p.CreatedBy == user).ToList().Where(p => p.IsThisUsersLikedSongsPlaylist).SingleOrDefault();
|
||||||
if (foundPlaylist == null)
|
if (foundPlaylist == null)
|
||||||
{
|
{
|
||||||
@ -103,6 +104,7 @@ likePlaylistCheckTimer.OnOccurence += async (s, ea) =>
|
|||||||
logger.LogWarning($"Syncing playlists for user {user.LdapUserName}");
|
logger.LogWarning($"Syncing playlists for user {user.LdapUserName}");
|
||||||
await playlistSynchronizer.SynchronizeUserPlaylistsAsync(user);
|
await playlistSynchronizer.SynchronizeUserPlaylistsAsync(user);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (needsSaving)
|
if (needsSaving)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user