Skip to content

Commit

Permalink
Fix nullref in feeds (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuylar committed Jan 29, 2024
1 parent aa6e5bb commit 493a94c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions LightTube/YoutubeRSS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static async Task<ChannelFeed> GetChannelFeed(string channelId)
try
{
InnerTubeChannelResponse response = await _innerTube.GetChannelAsync(channelId, ChannelTabs.Videos);
DateTimeOffset reference = new(DateTime.Today);
DateTimeOffset reference = DateTimeOffset.Now;
List<FeedVideo> videos = new();

foreach (IRenderer renderer in response.Contents.Select(x =>
Expand Down Expand Up @@ -65,7 +65,8 @@ public static async Task<ChannelFeed> GetChannelFeed(string channelId)
return new ChannelFeed
{
Name = "Failed to get videos for channel " + channelId,
Id = channelId
Id = channelId,
Videos = Array.Empty<FeedVideo>()
};
}
}
Expand Down

0 comments on commit 493a94c

Please sign in to comment.