blob: 7f44d535298343f798a15d24b5e7bcd129f63178 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
using System.Collections.Generic;
using System.Linq;
using System.Text.Json.Serialization;
using MediaBrowser.Model.Entities;
namespace Jellyfin.Plugin.JCoverXtremePro;
public class POJO
{
public class MovieData
{
public Movie movie { get; set; }
public List<Set> sets { get; set; }
public List<Set> collectionSets { get; set; }
[JsonIgnore] public IEnumerable<Set> allSets => sets.Concat(collectionSets);
}
public class Set
{
public string id { get; set; }
public string set_name { get; set; }
public User user_created { get; set; }
public List<File> files { get; set; }
}
public class User
{
public string username { get; set; }
}
public class File
{
public string fileType { get; set; }
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;
}
public class Movie
{
public string id { get; set; }
public string title { get; set; }
public string tagline { get; set; }
public string imdb_id { get; set; }
}
}
|