SharpRSS/WebSharpRSS/Models/SyndicationItemData.cs

29 lines
877 B
C#
Raw Normal View History

2023-05-24 19:27:22 +02:00
using System;
using SharpRss;
2023-05-24 19:27:22 +02:00
using SharpRss.Models;
2023-05-20 00:04:45 +02:00
using ToolQit;
namespace WebSharpRSS.Models
{
2023-06-16 22:53:26 +02:00
public class SyndicationItemData : SyndicationItemModel
{
2023-06-16 22:53:26 +02:00
public SyndicationItemData()
{
2023-05-26 21:54:12 +02:00
}
2023-06-16 22:53:26 +02:00
public static SyndicationItemData? FromModel(SyndicationItemModel model) => Utilities.ConvertFrom<SyndicationItemData, SyndicationItemModel>(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;
2023-06-16 22:53:26 +02:00
_faviconUrl = string.Format(Caretaker.Settings["Paths"].GetString("FaviconResolveUrl"), new Uri(SyndicationManager.DecodeUrlFromBase64(EncodedSyndicationUrl)).Host);
2023-05-26 21:54:12 +02:00
return _faviconUrl;
2023-05-26 14:43:10 +02:00
}
}
public string? Icon { get; set; }
}
}