Skip to content

Commit

Permalink
fix: stop fetching remote images
Browse files Browse the repository at this point in the history
  • Loading branch information
revam committed Sep 4, 2024
1 parent e140e19 commit e1f3757
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Shokofin/API/Info/SeasonInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public bool IsEmpty(int offset = 0)
}

private static string? GetImagePath(Image image)
=> image != null && !string.IsNullOrEmpty(image.LocalPath) ? image.ToURLString(internalUrl: true) : null;
=> image != null && image.IsAvailable ? image.ToURLString(internalUrl: true) : null;

private static PersonInfo? RoleToPersonInfo(Role role)
=> role.Type switch
Expand Down
2 changes: 1 addition & 1 deletion Shokofin/API/Models/Image.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class Image
/// </summary>
[JsonIgnore]
public virtual bool IsAvailable
=> !string.IsNullOrEmpty(LocalPath) || (Plugin.Instance.Configuration.ServerVersion?.Version is {} version && version > new Version("4.2.2.0"));
=> !string.IsNullOrEmpty(LocalPath);

/// <summary>
/// Get an URL to both download the image on the backend and preview it for
Expand Down

0 comments on commit e1f3757

Please sign in to comment.