From 84cfa163f938089c72d9c1d089c136e05e052abe Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sun, 11 Aug 2024 22:10:30 +0200 Subject: Add metadata cache --- POJO.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'POJO.cs') diff --git a/POJO.cs b/POJO.cs index a19a98e..7f44d53 100644 --- a/POJO.cs +++ b/POJO.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; using System.Text.Json.Serialization; +using MediaBrowser.Model.Entities; namespace Jellyfin.Plugin.JCoverXtremePro; @@ -35,6 +36,20 @@ public class POJO public string title { get; set; } public string id { get; set; } + public ImageType? JellyFinFileType() + { + switch (fileType) + { + case "backdrop": + return ImageType.Backdrop; + case "poster": + return ImageType.Primary; + } + + return null; + } + + [JsonIgnore] public string downloadUrl => "https://api.mediux.pro/assets/" + id; } -- cgit