SharpRSS/WebSharpRSS/Models/FeedItemData.cs

28 lines
755 B
C#
Raw Normal View History

2023-05-24 19:27:22 +02:00
using System;
using SharpRss.Models;
2023-05-20 00:04:45 +02:00
using ToolQit;
namespace WebSharpRSS.Models
{
2023-05-20 00:04:45 +02:00
public class FeedItemData : FeedItemModel
{
public FeedItemData()
{
2023-05-26 21:54:12 +02:00
}
2023-05-20 00:04:45 +02:00
public static FeedItemData? FromModel(FeedItemModel model) => Utilities.ConvertFrom<FeedItemData, FeedItemModel>(model);
2023-05-26 21:54:12 +02:00
private string? _faviconUrl;
2023-05-26 14:43:10 +02:00
public string? FaviconUrl
{
get
{
2023-05-26 21:54:12 +02:00
if (Link == null || _faviconUrl != null) return _faviconUrl;
_faviconUrl = string.Format(Caretaker.Settings["Paths"].GetString("FaviconResolveUrl"), new Uri(Link).Host);
return _faviconUrl;
2023-05-26 14:43:10 +02:00
}
}
public string? Icon { get; set; }
}
}