diff options
Diffstat (limited to 'POJO.cs')
-rw-r--r-- | POJO.cs | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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; } |