Refactor: rename to Gfriends (#377)

This commit is contained in:
Jason Lyu
2024-08-13 21:27:40 -04:00
committed by GitHub
parent b44881d8f8
commit 8b91fc59f3

View File

@@ -22,7 +22,7 @@ namespace Jellyfin.Plugin.MetaTube.Providers;
public class MovieProvider : BaseProvider, IRemoteMetadataProvider<Movie, MovieInfo>, IHasOrder
{
private const string AvBase = "AVBASE";
private const string GFriends = "GFriends";
private const string Gfriends = "Gfriends";
private const string Rating = "JP-18+";
private static readonly string[] AvBaseSupportedProviderNames = { "DUGA", "FANZA", "Getchu", "MGS" };
@@ -254,17 +254,17 @@ public class MovieProvider : BaseProvider, IRemoteMetadataProvider<Movie, MovieI
return;
}
// Use the first result as the primary actor selection.
var firstResult = results.First();
if (firstResult.Images?.Any() == true)
{
// Use the first result as the primary actor selection.
var firstResult = results.First();
if (firstResult.Images?.Any() == true)
actor.ImageUrl = ApiClient.GetPrimaryImageApiUrl(
firstResult.Provider, firstResult.Id, firstResult.Images.First(), 0.5, true);
actor.ImageUrl = ApiClient.GetPrimaryImageApiUrl(
firstResult.Provider, firstResult.Id, firstResult.Images.First(), 0.5, true);
actor.SetPid(Name, firstResult.Provider, firstResult.Id);
}
// Use the GFriends to update the actor profile image.
foreach (var result in results.Where(result => result.Provider == GFriends && result.Images?.Any() == true))
// Use the Gfriends to update the actor profile image, if any.
foreach (var result in results.Where(result => result.Provider == Gfriends && result.Images?.Any() == true))
{
actor.ImageUrl = ApiClient.GetPrimaryImageApiUrl(
result.Provider, result.Id, result.Images.First(), 0.5, true);