mirror of
https://github.com/metatube-community/jellyfin-plugin-metatube.git
synced 2026-05-12 19:06:50 +08:00
rename to ProviderInfoModel
This commit is contained in:
@@ -7,20 +7,20 @@ internal static class ProviderIdsExtension
|
||||
{
|
||||
private const char Separator = '#';
|
||||
|
||||
public static ProviderModel GetProviderModel(this IHasProviderIds instance, string name)
|
||||
public static ProviderInfoModel GetProviderModel(this IHasProviderIds instance, string name)
|
||||
{
|
||||
if (!instance.ProviderIds.Any())
|
||||
return new ProviderModel();
|
||||
return new ProviderInfoModel();
|
||||
|
||||
var providerIds = instance.GetProviderId(name)?.Split(Separator);
|
||||
return new ProviderModel
|
||||
return new ProviderInfoModel
|
||||
{
|
||||
Provider = providerIds?.Length > 1 ? providerIds[0] : string.Empty,
|
||||
Id = providerIds?.Length > 1 ? providerIds[1] : string.Empty
|
||||
};
|
||||
}
|
||||
|
||||
public static void SetProviderModel(this IHasProviderIds instance, string name, ProviderModel pm)
|
||||
public static void SetProviderModel(this IHasProviderIds instance, string name, ProviderInfoModel pm)
|
||||
{
|
||||
instance.SetProviderId(name, string.Join(Separator, pm.Provider, pm.Id));
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace Jellyfin.Plugin.JavTube.Models;
|
||||
|
||||
public class ActorSearchResultModel : ProviderModel
|
||||
public class ActorSearchResultModel : ProviderInfoModel
|
||||
{
|
||||
[JsonPropertyName("images")] public string[] Images { get; set; }
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace Jellyfin.Plugin.JavTube.Models;
|
||||
|
||||
public class MovieSearchResultModel : ProviderModel
|
||||
public class MovieSearchResultModel : ProviderInfoModel
|
||||
{
|
||||
[JsonPropertyName("cover_url")] public string CoverUrl { get; set; }
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace Jellyfin.Plugin.JavTube.Models;
|
||||
|
||||
public class ProviderModel
|
||||
public class ProviderInfoModel
|
||||
{
|
||||
[JsonPropertyName("homepage")] public string Homepage { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user