summaryrefslogtreecommitdiff
path: root/POJO.cs
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-08-11 22:10:30 +0200
committerLinnea Gräf <nea@nea.moe>2024-08-11 22:10:30 +0200
commit84cfa163f938089c72d9c1d089c136e05e052abe (patch)
tree506fe8ac7ee5db97d8423a0e55aed02f471bd1e9 /POJO.cs
parentf60e3645e18a7f590dc913d0f555fcb82f072d07 (diff)
downloadJCoverXtremePro-master.tar.gz
JCoverXtremePro-master.tar.bz2
JCoverXtremePro-master.zip
Add metadata cacheHEADmaster
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;
}