aboutsummaryrefslogtreecommitdiff
path: root/cmd/_old/sanguisuga/plex/plex.go
blob: 21b5afbaadc40c75db425ee27f59cb172ccf39bb (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
package plex

type Webhook struct {
	Event    string    `json:"event"`
	User     bool      `json:"user"`
	Owner    bool      `json:"owner"`
	Account  Account   `json:"Account"`
	Server   *Server   `json:"Server"`
	Player   *Player   `json:"Player"`
	Metadata *Metadata `json:"Metadata"`
}

type Account struct {
	ID    int    `json:"id"`
	Thumb string `json:"thumb"`
	Title string `json:"title"`
}

type Server struct {
	Title string `json:"title"`
	UUID  string `json:"uuid"`
}

type Player struct {
	Local         bool   `json:"local"`
	PublicAddress string `json:"publicAddress"`
	Title         string `json:"title"`
	UUID          string `json:"uuid"`
}

type GUID0 struct {
	ID string `json:"id"`
}

type Rating struct {
	Image string  `json:"image"`
	Value float64 `json:"value"`
	Type  string  `json:"type"`
}

type Director struct {
	ID     int    `json:"id"`
	Filter string `json:"filter"`
	Tag    string `json:"tag"`
	TagKey string `json:"tagKey"`
}

type Writer struct {
	ID     int    `json:"id"`
	Filter string `json:"filter"`
	Tag    string `json:"tag"`
	TagKey string `json:"tagKey"`
}

type Role struct {
	ID     int    `json:"id"`
	Filter string `json:"filter"`
	Tag    string `json:"tag"`
	TagKey string `json:"tagKey"`
	Role   string `json:"role"`
	Thumb  string `json:"thumb"`
}

type Metadata struct {
	LibrarySectionType    string     `json:"librarySectionType"`
	RatingKey             string     `json:"ratingKey"`
	Key                   string     `json:"key"`
	ParentRatingKey       string     `json:"parentRatingKey"`
	GrandparentRatingKey  string     `json:"grandparentRatingKey"`
	GUID                  string     `json:"guid"`
	ParentGUID            string     `json:"parentGuid"`
	GrandparentGUID       string     `json:"grandparentGuid"`
	Type                  string     `json:"type"`
	Title                 string     `json:"title"`
	GrandparentKey        string     `json:"grandparentKey"`
	ParentKey             string     `json:"parentKey"`
	LibrarySectionTitle   string     `json:"librarySectionTitle"`
	LibrarySectionID      int        `json:"librarySectionID"`
	LibrarySectionKey     string     `json:"librarySectionKey"`
	GrandparentTitle      string     `json:"grandparentTitle"`
	ParentTitle           string     `json:"parentTitle"`
	OriginalTitle         string     `json:"originalTitle"`
	ContentRating         string     `json:"contentRating"`
	Summary               string     `json:"summary"`
	Index                 int        `json:"index"`
	ParentIndex           int        `json:"parentIndex"`
	AudienceRating        float64    `json:"audienceRating"`
	ViewOffset            int        `json:"viewOffset"`
	LastViewedAt          int        `json:"lastViewedAt"`
	Year                  int        `json:"year"`
	Thumb                 string     `json:"thumb"`
	Art                   string     `json:"art"`
	ParentThumb           string     `json:"parentThumb"`
	GrandparentThumb      string     `json:"grandparentThumb"`
	GrandparentArt        string     `json:"grandparentArt"`
	Duration              int        `json:"duration"`
	OriginallyAvailableAt string     `json:"originallyAvailableAt"`
	AddedAt               int        `json:"addedAt"`
	UpdatedAt             int        `json:"updatedAt"`
	AudienceRatingImage   string     `json:"audienceRatingImage"`
	GUID0                 []GUID0    `json:"Guid"`
	Rating                []Rating   `json:"Rating"`
	Director              []Director `json:"Director"`
	Writer                []Writer   `json:"Writer"`
	Role                  []Role     `json:"Role"`
}