mirror of
https://github.com/hmaxnl/SharpRSS.git
synced 2024-11-09 23:44:20 +01:00
Added small atom item date fix
This commit is contained in:
parent
2e619eb48a
commit
1785833132
|
@ -107,12 +107,12 @@ namespace SharpRss.Services
|
|||
if (newsCategory != null)
|
||||
{
|
||||
await AddSubscriptionAsync("https://www.nu.nl/rss/Algemeen", newsCategory);
|
||||
await AddSubscriptionAsync("https://www.ad.nl/home/rss.xml", newsCategory);
|
||||
await AddSubscriptionAsync("https://www.nasa.gov/rss/dyn/breaking_news.rss", newsCategory);
|
||||
await AddSubscriptionAsync("http://news.google.com/?output=atom", newsCategory);
|
||||
await AddSubscriptionAsync("https://www.ad.nl/home/rss.xml", newsCategory);
|
||||
}
|
||||
}*/
|
||||
|
||||
CategoryModel? techCategory = await CreateCategoryAsync(new CategoryModel() { Name = "Tech" });
|
||||
/*CategoryModel? techCategory = await CreateCategoryAsync(new CategoryModel() { Name = "Tech" });
|
||||
if (techCategory != null)
|
||||
{
|
||||
await AddSubscriptionAsync("https://itsfoss.com/feed", techCategory);
|
||||
|
|
|
@ -114,8 +114,8 @@ namespace SharpRss
|
|||
Title = entry.Title?.Content ?? string.Empty,
|
||||
Description = entry.Summary?.Content ?? string.Empty,
|
||||
Link = entry.Id?.Uri.ToString() ?? string.Empty,
|
||||
LastUpdated = entry.UpdatedOn is not { Ticks: <= 0 } ? new DateTimeOffset(entry.UpdatedOn) : DateTimeOffset.MinValue,
|
||||
PublishingDate = entry.PublishedOn is not { Ticks: <= 0 } ? new DateTimeOffset(entry.PublishedOn) : DateTimeOffset.MinValue,
|
||||
LastUpdated = entry.UpdatedOn is { Ticks: > 0 } ? new DateTimeOffset(entry.UpdatedOn) : DateTimeOffset.Now,
|
||||
PublishingDate = entry.PublishedOn is { Ticks: > 0 } ? new DateTimeOffset(entry.PublishedOn) : entry.UpdatedOn,
|
||||
Authors = entry.Authors?.Select(auth => auth.Name).ToArray() ?? Array.Empty<string>(),
|
||||
Categories = entry.Categories?.Select(cat => cat.Label).ToArray() ?? Array.Empty<string>(),
|
||||
Content = entry.Content?.Content ?? string.Empty
|
||||
|
|
|
@ -39,8 +39,9 @@ namespace WebSharpRSS
|
|||
if (_configuration != null) return;
|
||||
_configuration = new LoggerConfiguration()
|
||||
.WriteTo.Console()
|
||||
.WriteTo.File(new JsonFormatter(), Caretaker.Settings["Paths"].GetString("LogPath"), rollingInterval: RollingInterval.Day)
|
||||
.MinimumLevel.Verbose(); // ONLY FOR DEBUGGING!!!
|
||||
.WriteTo.File(new JsonFormatter(), Caretaker.Settings["Paths"].GetString("LogPath"),
|
||||
rollingInterval: RollingInterval.Day);
|
||||
/*.MinimumLevel.Verbose(); // ONLY FOR DEBUGGING!!!*/
|
||||
|
||||
Log.Logger = _configuration.CreateLogger();
|
||||
}
|
||||
|
|
|
@ -44,6 +44,9 @@
|
|||
<_ContentIncludedByDefault Remove="logs\log_20230602.json" />
|
||||
<_ContentIncludedByDefault Remove="logs\log_20230603.json" />
|
||||
<_ContentIncludedByDefault Remove="logs\log_20230604.json" />
|
||||
<_ContentIncludedByDefault Remove="logs\log_20230605.json" />
|
||||
<_ContentIncludedByDefault Remove="logs\log_20230610.json" />
|
||||
<_ContentIncludedByDefault Remove="logs\log_20230611.json" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user