Repository navigation
Expand file tree
/
Copy pathplex.json
More file actions
207 lines (207 loc) · 6.04 KB
/
Copy pathplex.json
File metadata and controls
207 lines (207 loc) · 6.04 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
{
"version": 6,
"script": {
"version": "2.1.0",
"changeLog": "Added the now-playing widget and moved to the v6 install script format"
},
"installation_questions": [
{
"question": "Do you have Plex Pass?",
"description": "Plex Pass is required to unlock certain features.",
"type": "select",
"key": "image_selector",
"required": true,
"options": [
{
"text": "No, I don't have Plex Pass",
"value": "image"
},
{
"text": "Yes, I have Plex Pass",
"value": "plex_pass_image"
}
],
"default": "image"
}
],
"requirements": {
"locations": ["ApplicationsPerformance", "ApplicationsCapacity", "Media", "Photos", "Music", "Movies", "Shows", "Videos"],
"specifications": ["2CORE", "200MB"],
"permissions": ["READ_WRITE_LOCATIONS"],
"ports": [32400]
},
"ensure_directories_exists": [
{
"path": "$LOCATION(ApplicationsPerformance)"
},
{
"path": "$LOCATION(ApplicationsCapacity)"
},
{
"path": "$LOCATION(Media)",
"network_share": true
},
{
"path": "$LOCATION(Photos)",
"network_share": true
},
{
"path": "$LOCATION(Music)",
"network_share": true
},
{
"path": "$LOCATION(Movies)",
"network_share": true
},
{
"path": "$LOCATION(Shows)",
"network_share": true
},
{
"path": "$LOCATION(Videos)",
"network_share": true
},
{ "path": "$LOCATION(ApplicationsPerformance)/plex/data", "owner": { "user": "apps" }, "snapshot": { "id": "data" } },
{ "path": "$LOCATION(ApplicationsPerformance)/plex/config", "owner": { "user": "apps" }, "snapshot": { "id": "config" } },
{ "path": "$LOCATION(ApplicationsCapacity)/plex/logs" },
{ "path": "$LOCATION(ApplicationsPerformance)/plex/transcode" }
],
"app_values": {
"plex": {
"image_selector": "$QUESTION(image_selector)",
"additional_envs": [
{
"name": "ADVERTISE_IP",
"value": "http://$SERVER_LAN_IP:32400"
}
]
},
"run_as": {
"user": 568,
"group": 568
},
"storage": {
"data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/plex/data)",
"config": "$HOST_PATH($LOCATION(ApplicationsPerformance)/plex/config)",
"logs": "$HOST_PATH($LOCATION(ApplicationsCapacity)/plex/logs)",
"transcode": "$HOST_PATH($LOCATION(ApplicationsPerformance)/plex/transcode)",
"additional_storage": [
"$MOUNTED_HOST_PATH($LOCATION(Media), /media)",
"$MOUNTED_HOST_PATH($LOCATION(Photos), /photos)",
"$MOUNTED_HOST_PATH($LOCATION(Music), /music)",
"$MOUNTED_HOST_PATH($LOCATION(Movies), /movies)",
"$MOUNTED_HOST_PATH($LOCATION(Shows), /shows)",
"$MOUNTED_HOST_PATH($LOCATION(Videos), /videos)"
]
},
"resources": {
"limits": {
"cpus": 2,
"memory": "$MEMORY(10%, 2048)"
},
"gpus": "$GPU_CONFIG()"
}
},
"hooks": [
{
"id": "configure-plex",
"title": "Pre-configure Plex",
"description": "Setting up Plex server",
"events": [
"onAfterInstall"
],
"optional": true,
"userOptional": {
"description": "Sign in to your Plex account to automatically claim your server, set preferences, and create media libraries. By enabling this, you agree that HexOS will accept the Plex Terms of Service on your behalf.",
"default": true,
"link": {
"url": "https://www.plex.tv/about/privacy-legal/plex-terms-of-service/",
"label": "Plex Terms of Service"
}
},
"inputs": [
{
"type": "oauth",
"id": "plex_login",
"name": "Sign in to Plex",
"description": "Link this server to your Plex account for remote access and automatic library setup.",
"provider": "plex",
"flow": {
"type": "pin",
"pinUrl": "https://plex.tv/api/v2/pins",
"authUrl": "https://app.plex.tv/auth#?clientID={clientId}&code={code}",
"pollUrl": "https://plex.tv/api/v2/pins/{pinId}",
"clientId": "hexos-platform",
"tokenField": "authToken",
"headers": {
"X-Plex-Client-Identifier": "{clientId}",
"X-Plex-Product": "HexOS"
}
}
},
{
"type": "question",
"id": "server_name",
"question": {
"question": "Server name",
"type": "text",
"key": "server_name",
"required": false,
"default": "HexOS Plex",
"description": "The name your Plex server will appear as to you and your friends.",
"placeholder": "HexOS Plex"
}
}
],
"script": "plex/plex_hook.ts",
"entrypoint": "afterInstall",
"timeout": 300,
"retries": 0
},
{
"id": "connect-tautulli",
"title": "Connect to Tautulli",
"description": "Lets Tautulli track what's watched on this Plex server.",
"kind": "connect",
"conditions": [
{ "role": "visibility", "type": "appInstalled", "app": "tautulli" },
{ "role": "availability", "type": "appRunning", "app": "tautulli" },
{ "role": "availability", "type": "appRunning", "app": "plex" }
],
"rerun": "converge",
"script": "plex/connect_tautulli.ts",
"entrypoint": "run",
"timeout": 180,
"retries": 0
}
],
"widgetsSchema": 3,
"widgets": [
{
"id": "now-playing",
"title": "Now playing",
"description": "Active Plex streams right now.",
"refresh": 5,
"conditions": [
{
"role": "availability",
"type": "appRunning",
"app": "plex"
}
],
"background": {
"field": "sessions"
},
"slots": [
{
"type": "list",
"field": "sessions",
"rows": 1
}
],
"script": "plex/widget_now_playing.ts",
"entrypoint": "run",
"timeout": 10
}
]
}