diff --git a/allstarr/Services/Spotify/SpotifyMissingTracksFetcher.cs b/allstarr/Services/Spotify/SpotifyMissingTracksFetcher.cs index d3775ff..036dc31 100644 --- a/allstarr/Services/Spotify/SpotifyMissingTracksFetcher.cs +++ b/allstarr/Services/Spotify/SpotifyMissingTracksFetcher.cs @@ -337,12 +337,12 @@ public class SpotifyMissingTracksFetcher : BackgroundService // If we haven't reached today's sync time yet, start from yesterday's sync time var syncTime = now >= todaySync ? todaySync : todaySync.AddDays(-1); - _logger.LogInformation(" Searching ±12 hours around {SyncTime}", syncTime); + _logger.LogInformation(" Searching +12h forward, -24h backward from {SyncTime}", syncTime); var found = false; // Search forward 12 hours from sync time - _logger.LogInformation(" Phase 1: Searching forward from sync time..."); + _logger.LogInformation(" Phase 1: Searching forward 12 hours from sync time..."); for (var minutesAhead = 0; minutesAhead <= 720; minutesAhead++) // 720 minutes = 12 hours { if (cancellationToken.IsCancellationRequested) break; @@ -361,11 +361,11 @@ public class SpotifyMissingTracksFetcher : BackgroundService } } - // Then search backwards 12 hours from sync time + // Then search backwards 24 hours from sync time to catch yesterday's file if (!found) { - _logger.LogInformation(" Phase 2: Searching backward from sync time..."); - for (var minutesBehind = 1; minutesBehind <= 720; minutesBehind++) + _logger.LogInformation(" Phase 2: Searching backward 24 hours from sync time..."); + for (var minutesBehind = 1; minutesBehind <= 1440; minutesBehind++) // 1440 minutes = 24 hours { if (cancellationToken.IsCancellationRequested) break; @@ -386,7 +386,7 @@ public class SpotifyMissingTracksFetcher : BackgroundService if (!found) { - _logger.LogWarning(" ✗ Could not find missing tracks file in ±12 hour window"); + _logger.LogWarning(" ✗ Could not find missing tracks file (searched +12h/-24h window)"); } }