SharpRSS/WebSharpRSS/Models/FeedItemData.cs
2023-05-26 21:54:12 +02:00

28 lines
755 B
C#

using System;
using SharpRss.Models;
using ToolQit;
namespace WebSharpRSS.Models
{
public class FeedItemData : FeedItemModel
{
public FeedItemData()
{
}
public static FeedItemData? FromModel(FeedItemModel model) => Utilities.ConvertFrom<FeedItemData, FeedItemModel>(model);
private string? _faviconUrl;
public string? FaviconUrl
{
get
{
if (Link == null || _faviconUrl != null) return _faviconUrl;
_faviconUrl = string.Format(Caretaker.Settings["Paths"].GetString("FaviconResolveUrl"), new Uri(Link).Host);
return _faviconUrl;
}
}
public string? Icon { get; set; }
}
}