Remove unnecessary /me API call - not needed for sp_dc auth

This commit is contained in:
2026-02-03 16:27:19 -05:00
parent c33c85455f
commit 79a9e4063d

View File

@@ -233,18 +233,8 @@ public class SpotifyPlaylistFetcher : BackgroundService
return; return;
} }
// Try to get user info (may fail even with valid token due to scope limitations)
var (gotUser, userId, displayName) = await _spotifyClient.GetCurrentUserAsync(stoppingToken);
_logger.LogInformation("Spotify API ENABLED"); _logger.LogInformation("Spotify API ENABLED");
if (gotUser) _logger.LogInformation("Authenticated via sp_dc session cookie");
{
_logger.LogInformation("Authenticated as: {DisplayName} ({UserId})", displayName, userId);
}
else
{
_logger.LogInformation("Authenticated (user profile not accessible, but token is valid)");
}
_logger.LogInformation("Cache duration: {Minutes} minutes", _spotifyApiSettings.CacheDurationMinutes); _logger.LogInformation("Cache duration: {Minutes} minutes", _spotifyApiSettings.CacheDurationMinutes);
_logger.LogInformation("ISRC matching: {Enabled}", _spotifyApiSettings.PreferIsrcMatching ? "enabled" : "disabled"); _logger.LogInformation("ISRC matching: {Enabled}", _spotifyApiSettings.PreferIsrcMatching ? "enabled" : "disabled");
_logger.LogInformation("Configured Playlists: {Count}", _spotifyImportSettings.Playlists.Count); _logger.LogInformation("Configured Playlists: {Count}", _spotifyImportSettings.Playlists.Count);