diff --git a/song_of_the_day/Program.cs b/song_of_the_day/Program.cs index 81ffd7f..4230016 100644 --- a/song_of_the_day/Program.cs +++ b/song_of_the_day/Program.cs @@ -92,7 +92,7 @@ pickOfTheDayTimer.OnOccurence += async (s, ea) => { var dci = DataContext.Instance; - var lastSong = dci.SongSuggestions?.LastOrDefault(); + var lastSong = dci.SongSuggestions?.OrderBy(s => s.Id).LastOrDefault(); if (lastSong != null && lastSong.Date >= DateTime.Today.Subtract(TimeSpan.FromDays(AppConfiguration.Instance.DaysBetweenRequests))) {