2023-05-24 19:27:22 +02:00
|
|
|
|
using System;
|
2023-06-11 02:28:16 +02:00
|
|
|
|
using SharpRss;
|
2023-05-24 19:27:22 +02:00
|
|
|
|
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-06-16 22:53:26 +02:00
|
|
|
|
public class SyndicationItemData : SyndicationItemModel
|
2023-05-19 14:40:57 +02:00
|
|
|
|
{
|
2023-06-16 22:53:26 +02:00
|
|
|
|
public SyndicationItemData()
|
2023-05-24 15:51:03 +02:00
|
|
|
|
{
|
2023-05-26 21:54:12 +02:00
|
|
|
|
|
2023-05-24 15:51:03 +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; }
|
2023-05-19 14:40:57 +02:00
|
|
|
|
}
|
|
|
|
|
}
|