Skip to content

Commit

Permalink
fix: add back and fix is available check
Browse files Browse the repository at this point in the history
  • Loading branch information
revam committed Aug 13, 2024
1 parent f7c361f commit 87ef8f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Shokofin/API/Models/Image.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class Image
/// </summary>
[JsonIgnore]
public virtual bool IsAvailable
=> !string.IsNullOrEmpty(LocalPath);
=> !string.IsNullOrEmpty(LocalPath) || (Plugin.Instance.Configuration.ServerVersion?.Version is {} version && version is not "4.2.2.0");

/// <summary>
/// Get an URL to both download the image on the backend and preview it for
Expand Down
2 changes: 1 addition & 1 deletion Shokofin/Providers/ImageProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ private static void AddImagesForSeries(ref List<RemoteImageInfo> list, API.Model

private static void AddImage(ref List<RemoteImageInfo> list, ImageType imageType, API.Models.Image? image)
{
if (image == null)
if (image == null || !image.IsAvailable)
return;
list.Add(new RemoteImageInfo {
ProviderName = Plugin.MetadataProviderName,
Expand Down

0 comments on commit 87ef8f5

Please sign in to comment.