From ef8c8fb8679ad6b422000cc8cc7732f610bee32f Mon Sep 17 00:00:00 2001 From: Simon Diesenreiter Date: Sun, 20 Jul 2025 17:14:49 +0200 Subject: [PATCH] fix: add additional logging, refs NOISSUE --- song_of_the_day/Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/song_of_the_day/Program.cs b/song_of_the_day/Program.cs index 76681fa..6e30bc4 100644 --- a/song_of_the_day/Program.cs +++ b/song_of_the_day/Program.cs @@ -86,18 +86,21 @@ likePlaylistCheckTimer.OnOccurence += async (s, ea) => { if (!await spotifyApiClient.IsUserAuthenticatedAsync(user)) { + logger.LogWarning($"User {user.LdapUserName} is not authorized with Spotify - skipping playlist sync"); continue; } var foundPlaylist = dci.SmartPlaylistDefinitions?.Where(p => p.CreatedBy == user).ToList().Where(p => p.IsThisUsersLikedSongsPlaylist).SingleOrDefault(); if (foundPlaylist == null) { - var title = $"{user.PreferredName}'s liked Songs"; + logger.LogWarning($"Creating liked songs playlist for user {user.LdapUserName}"); + var title = $"{user.PreferredName}'s liked songs"; var description = $"A collection of the songs liked by {user.PreferredName} on their 'Song of the day' server instance."; // playlist does not exist yet, creating it var newPlaylist = await (await spotifyApiClient.WithUserAuthorizationAsync(user)).CreateSpotifyPlaylist(title, description, false, true, user); await playlistSynchronizer.SynchronizePlaylistAsync(newPlaylist); needsSaving = true; } + logger.LogWarning($"Syncing playlists for user {user.LdapUserName}"); await playlistSynchronizer.SynchronizeUserPlaylistsAsync(user); }