summaryrefslogtreecommitdiff
path: root/POJO.cs
diff options
context:
space:
mode:
Diffstat (limited to 'POJO.cs')
-rw-r--r--POJO.cs15
1 files changed, 15 insertions, 0 deletions
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;
}