diff options
author | Linnea Gräf <nea@nea.moe> | 2024-08-11 22:10:30 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-08-11 22:10:30 +0200 |
commit | 84cfa163f938089c72d9c1d089c136e05e052abe (patch) | |
tree | 506fe8ac7ee5db97d8423a0e55aed02f471bd1e9 /POJO.cs | |
parent | f60e3645e18a7f590dc913d0f555fcb82f072d07 (diff) | |
download | JCoverXtremePro-master.tar.gz JCoverXtremePro-master.tar.bz2 JCoverXtremePro-master.zip |
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; } |