Added OPML support
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
namespace Jellyfin.Plugin.Jellypod.Api.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Details about a failed OPML feed import.
|
||||
/// </summary>
|
||||
public class OpmlImportError
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the feed URL that failed.
|
||||
/// </summary>
|
||||
public string FeedUrl { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the feed title from OPML (if available).
|
||||
/// </summary>
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the error message.
|
||||
/// </summary>
|
||||
public string Error { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Jellyfin.Plugin.Jellypod.Api.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Request to import podcasts from an OPML URL.
|
||||
/// </summary>
|
||||
public class OpmlImportRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the URL to fetch OPML from.
|
||||
/// </summary>
|
||||
public string Url { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace Jellyfin.Plugin.Jellypod.Api.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Result of an OPML import operation.
|
||||
/// </summary>
|
||||
public class OpmlImportResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the total number of feeds found in the OPML.
|
||||
/// </summary>
|
||||
public int TotalFeeds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of feeds successfully imported.
|
||||
/// </summary>
|
||||
public int ImportedCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of feeds skipped (already subscribed).
|
||||
/// </summary>
|
||||
public int SkippedCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of feeds that failed to import.
|
||||
/// </summary>
|
||||
public int FailedCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of imported podcast titles.
|
||||
/// </summary>
|
||||
public Collection<string> ImportedPodcasts { get; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of skipped feed URLs (already subscribed).
|
||||
/// </summary>
|
||||
public Collection<string> SkippedFeeds { get; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of failed imports with error details.
|
||||
/// </summary>
|
||||
public Collection<OpmlImportError> Errors { get; } = new();
|
||||
}
|
||||
Reference in New Issue
Block a user