mirror of
https://github.com/hmaxnl/SharpRSS.git
synced 2025-01-18 21:04:21 +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)
|
if (newsCategory != null)
|
||||||
{
|
{
|
||||||
await AddSubscriptionAsync("https://www.nu.nl/rss/Algemeen", newsCategory);
|
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("https://www.nasa.gov/rss/dyn/breaking_news.rss", newsCategory);
|
||||||
await AddSubscriptionAsync("http://news.google.com/?output=atom", 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)
|
if (techCategory != null)
|
||||||
{
|
{
|
||||||
await AddSubscriptionAsync("https://itsfoss.com/feed", techCategory);
|
await AddSubscriptionAsync("https://itsfoss.com/feed", techCategory);
|
||||||
|
|
|
@ -114,8 +114,8 @@ namespace SharpRss
|
||||||
Title = entry.Title?.Content ?? string.Empty,
|
Title = entry.Title?.Content ?? string.Empty,
|
||||||
Description = entry.Summary?.Content ?? string.Empty,
|
Description = entry.Summary?.Content ?? string.Empty,
|
||||||
Link = entry.Id?.Uri.ToString() ?? string.Empty,
|
Link = entry.Id?.Uri.ToString() ?? string.Empty,
|
||||||
LastUpdated = entry.UpdatedOn is not { Ticks: <= 0 } ? new DateTimeOffset(entry.UpdatedOn) : DateTimeOffset.MinValue,
|
LastUpdated = entry.UpdatedOn is { Ticks: > 0 } ? new DateTimeOffset(entry.UpdatedOn) : DateTimeOffset.Now,
|
||||||
PublishingDate = entry.PublishedOn is not { Ticks: <= 0 } ? new DateTimeOffset(entry.PublishedOn) : DateTimeOffset.MinValue,
|
PublishingDate = entry.PublishedOn is { Ticks: > 0 } ? new DateTimeOffset(entry.PublishedOn) : entry.UpdatedOn,
|
||||||
Authors = entry.Authors?.Select(auth => auth.Name).ToArray() ?? Array.Empty<string>(),
|
Authors = entry.Authors?.Select(auth => auth.Name).ToArray() ?? Array.Empty<string>(),
|
||||||
Categories = entry.Categories?.Select(cat => cat.Label).ToArray() ?? Array.Empty<string>(),
|
Categories = entry.Categories?.Select(cat => cat.Label).ToArray() ?? Array.Empty<string>(),
|
||||||
Content = entry.Content?.Content ?? string.Empty
|
Content = entry.Content?.Content ?? string.Empty
|
||||||
|
|
|
@ -39,8 +39,9 @@ namespace WebSharpRSS
|
||||||
if (_configuration != null) return;
|
if (_configuration != null) return;
|
||||||
_configuration = new LoggerConfiguration()
|
_configuration = new LoggerConfiguration()
|
||||||
.WriteTo.Console()
|
.WriteTo.Console()
|
||||||
.WriteTo.File(new JsonFormatter(), Caretaker.Settings["Paths"].GetString("LogPath"), rollingInterval: RollingInterval.Day)
|
.WriteTo.File(new JsonFormatter(), Caretaker.Settings["Paths"].GetString("LogPath"),
|
||||||
.MinimumLevel.Verbose(); // ONLY FOR DEBUGGING!!!
|
rollingInterval: RollingInterval.Day);
|
||||||
|
/*.MinimumLevel.Verbose(); // ONLY FOR DEBUGGING!!!*/
|
||||||
|
|
||||||
Log.Logger = _configuration.CreateLogger();
|
Log.Logger = _configuration.CreateLogger();
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,9 @@
|
||||||
<_ContentIncludedByDefault Remove="logs\log_20230602.json" />
|
<_ContentIncludedByDefault Remove="logs\log_20230602.json" />
|
||||||
<_ContentIncludedByDefault Remove="logs\log_20230603.json" />
|
<_ContentIncludedByDefault Remove="logs\log_20230603.json" />
|
||||||
<_ContentIncludedByDefault Remove="logs\log_20230604.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>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user