2023-05-24 19:27:22 +02:00
|
|
|
|
using System;
|
|
|
|
|
using SharpRss.Models;
|
2023-05-20 00:04:45 +02:00
|
|
|
|
using ToolQit;
|
2023-05-19 14:40:57 +02:00
|
|
|
|
|
|
|
|
|
namespace WebSharpRSS.Models
|
|
|
|
|
{
|
2023-05-20 00:04:45 +02:00
|
|
|
|
public class FeedItemData : FeedItemModel
|
2023-05-19 14:40:57 +02:00
|
|
|
|
{
|
2023-05-24 15:51:03 +02:00
|
|
|
|
public FeedItemData()
|
|
|
|
|
{
|
2023-05-26 21:54:12 +02:00
|
|
|
|
|
2023-05-24 15:51:03 +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; }
|
2023-05-19 14:40:57 +02:00
|
|
|
|
}
|
|
|
|
|
}
|