-
Notifications
You must be signed in to change notification settings - Fork 59
/
config.pl-dist-win32
252 lines (219 loc) · 11.7 KB
/
config.pl-dist-win32
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
$data_dir = 'c:\\plexWatch\\'; ## to store the DB, logfile - can be the same as this script
$server_log = 'c:\\plexWatch\\yourserverlogpath'; ## used to log IP address of user (alpha)
$log_client_ip = 0; ## requires $server_log to be available too. (requires File::ReadBackwards)
## also required DEBUG log to be turned on in the PMS
$debug_logging = 1; ## logs to $data_dir/debug.log ( not verbose enough yet.. still todo )
## myplex user/pass ONLY required if you have set the PMS to 'Require authentication on local networks' and $server is not set to localhost
$myPlex_user = '';
$myPlex_pass = '';
$server = 'localhost'; ## IP of PMS - or localhost
$port = 32400; ## port of PMS
$notify_started = 1; # !deprecated -- does nothing anymore (use push_watched, push_watching in $notify)
$notify_stopped = 1; # !deprecated -- does nothing anymore (use push_watched, push_watching in $notify)
$appname = 'plexWatch';
## Give a user a more friendly name. I.E. REAL_USER will now be Frank
## you may also specify the platform with user+platform
$user_display = {'REAL_USER1' => 'Frank',
'REAL_USER2' => 'Rob & Carrie',
'REAL_USER2+Roku 3' => 'Family Room',
'REAL_USER2+Roku' => 'Family Room',
'REAL_USER2+iOS' => 'Rob',
};
## format of alert - default. You can also override this per provider ($notify below)
## run ./plexWatch.pl --format_options -- to see all
# start = notification for start of video
# stop = notification for stop of video
# watched = cli output for watched content
# watching = cli output content being watched
$alert_format = {'start' => '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] {ip_address}',
'paused' => '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%] {ip_address}',
'resumed' => '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%] {ip_address}',
'stop' => '{title} [{streamtype}] [{year}] [{rating}] on {platform} for {duration} [{percent_complete}%] {ip_address}',
'watched' => '{user} watched {title} [{streamtype}] [{year}] [{length}] [{rating}] on {platform} for {duration} [{percent_complete}%] {ip_address}',
'watching' => '{user} {state} {title} [{streamtype}] [{year}] [{rating}] [{length}] on {platform} for {duration} [{percent_complete}%] [{time_left} left] {ip_address}'
};
## Notification Options
$notify = {
'file' => {
'enabled' => 1, ## 0 or 1 - set to 1 to enable File Logging
'filename' => "$data_dir/plexWatch.log", ## default is plexWatch.log
},
'prowl' => {
'enabled' => 0, ## 0 or 1 - set to 1 to enable PROWL
'push_recentlyadded' => 0,
'push_watched' => 0,
'push_watching' => 0,
'push_paused' => 0,
'push_resumed' => 0,
'apikey' => 'YOUR API KEY', ## your API key
'application' => '{user}',
'priority' => 0,
'url' => '',
},
'pushover' => {
'enabled' => 0, ## set to 1 to enable Pushover
'push_recentlyadded' => 0,
'push_watched' => 0,
'push_watching' => 0,
'push_paused' => 0,
'push_resumed' => 0,
'token' => 'YOUR APP TOKEN', ## your app token
'user' => 'YOUR USER TOKEN', ## your user token
'title' => '{user}',
'sound' => 'intermission',
},
'growl' => {
'enabled' => 0, ## set to 1 to enable local growl (You should probably used GNTP - growl supported for multiple platforms - below)
'push_recentlyadded' => 0,
'push_watched' => 0,
'push_watching' => 0,
'push_paused' => 0,
'push_resumed' => 0,
'application' => '{user}',
'script' => '/usr/local/bin/growlnotify',
'icon' => '/Applications/Plex Media Server.app/Contents/Resources/MyPlex.icns',
},
'twitter' => {
'enabled' => 0, ## set to 1 to enable local twitter
'push_recentlyadded' => 0,
'push_watched' => 0,
'push_watching' => 0,
'push_paused' => 0,
'push_resumed' => 0,
'title' => '{user}',
'consumer_key' => '',
'consumer_secret' => '',
'access_token' => '',
'access_token_secret' => '',
'alert_format' => {
'start' => '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in]',
'paused' => '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%]',
'resumed' => '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%]',
'stop' => '{title} [{streamtype}] [{year}] [{rating}] on {platform} for {duration} [{percent_complete}%]',
},
},
'boxcar' => {
'enabled' => 0, ## set to 1 to enable local boxcar
'push_recentlyadded' => 0,
'push_watched' => 0,
'push_watching' => 0,
'push_paused' => 0,
'push_resumed' => 0,
'email' => '', ## YOUR email address registered at boxcar
'from' => '{user}', ## From Name displayed on boxcar
'provider_key' => 'o2eI7rcwya5XFETaXdlh', ## plexWatch app is 'o2eI7rcwya5XFETaXdlh'. You may supply your own.
'provider_secret' => 'h4pJjyBoEMk1rwK2EH3NLemO4fQ0ql9HnRgVfwg4', ## plexWatch app is 'h4pJjyBoEMk1rwK2EH3NLemO4fQ0ql9HnRgVfwg4'. You may supply your own.
'icon_url' => '', # Leave empty ('') for plexWatch icon. You may supply your own (57x57)
},
'boxcar_v2' => {
'enabled' => 0, ## set to 1 to enable local boxcar_v2 ( device specific )
'push_recentlyadded' => 0,
'push_watched' => 0,
'push_watching' => 0,
'push_paused' => 0,
'push_resumed' => 0,
'access_token' => '', ## Access token from your Device
'from' => '{user}', ## From Name displayed on boxcar
'sound' => 'bird-1',
'icon_url' => 'https://rarforge.com/images/plexWatch.57x57.png',
},
'pushbullet' => {
'enabled' => 0,
'push_recentlyadded' => 0,
'push_watched' => 0,
'push_watching' => 0,
'push_paused' => 0,
'push_resumed' => 0,
'title' => '{user}',
'apikey' => 'API KEY', # Pushbullet API key https://www.pushbullet.com/account
'device' => 'DEVICE IDEN', # https://api.pushbullet.com/v2/devices put yor API key as username and password empty - Leave blank to use all or channel
'channel' => 'CHANNEL_TAG', # Channel tag from https://www.pushbullet.com/my-channels - Leave blank if unused
},
'pushalot' => {
'enabled' => 0,
'push_recentlyadded' => 0,
'push_watched' => 0,
'push_watching' => 0,
'push_paused' => 0,
'push_resumed' => 0,
'title' => '{user}',
'token' => 'AUTHORIZATION TOKEN', # Pushalot API authorization token from https://pushalot.com/manager/authorizations
'isimportant' => 'False', # True or False, Indicator whether the message should be visually marked as important within client app. Does not have any other implication on message delivery.
'issilent' => 'False', # True or False, If set to True will prevent sending toast notifications to connected devices, resulting in silent delivery, as only badge icon will indicate new message.
'timetolive' => '0', # Time in minutes after which message automatically gets purged.
},
## GNTP (GROWL) -- multiple destinations are supported
'GNTP' => {
'1' => {
'enabled' => 0, ## set to 1 to enable local growl
'push_recentlyadded' => 0,
'push_watched' => 0,
'push_watching' => 0,
'push_paused' => 0,
'push_resumed' => 0,
'application' => $appname,
'title' => '{user}',
'server' => '10.0.0.1', # destination ip/host
'port' => '23053', # default 23053
'password' => '', # '' for no pass
'icon_url' => 'https://rarforge.com/images/plexWatch.57x57.png',
'sticky' => 1,
},
'2' => {
'enabled' => 0, ## set to 1 to enable local growl
'push_recentlyadded' => 0,
'push_watched' => 0,
'push_watching' => 0,
'push_paused' => 0,
'push_resumed' => 0,
'application' => '{user}',
'server' => '192.168.10.100', # destination ip/host
'port' => '23053', # default 23053
'password' => '', # '' for no pass
'icon_url' => 'https://rarforge.com/images/plexWatch.57x57.png',
'sticky' => 0,
},
},
## EMAIL -- multiple destinations are supported
'EMAIL' => {
'1' => {
'enabled' => 0, ## set to 1 to enable local EMAIL
'push_recentlyadded' => 0,
'push_watched' => 1,
'push_watching' => 1,
'push_paused' => 1,
'push_resumed' => 1,
'server' => '', # your mail server
'port' => '25', # your mail server port defalt 25 (587 is also a good choice)
'from' => '', # your From email address: '[email protected]'
'to' => '', # Email address to receive notification: '[email protected]'
'username' => '', # AUTH if needed [optional]
'password' => '', # AUTH if needed [optional]
'subject' => '{user} {push_title} {title}', ## push_title is special for EMAIL (for now)
'enable_tls' => 0, # ENABLE for TLS support ( your smtp server must allow STARTTLS )
'alert_format' => {
'start' => '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] {ip_address} {all_details}',
'paused' => '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%] {ip_address} {all_details}',
'resumed' => '{title} [{streamtype}] [{year}] [{rating}] on {platform} [{progress} in] [{percent_complete}%] {ip_address} {all_details}',
'stop' => '{title} [{streamtype}] [{year}] [{rating}] on {platform} for {duration} [{percent_complete}%] {ip_address} {all_details}',
},
},
'2' => {
'enabled' => 0, ## set to 1 to enable EMAIL
## fill in the rest if you need more then 1 email notification
},
},
};
$push_titles = {
'push_watched' => 'Watched',
'push_watching' => 'Watching',
'push_resumed' => 'Resumed',
'push_paused' => 'Paused',
'push_recentlyadded' => 'New',
};
# Advanced
$watched_show_completed = 1; ## advanced config -- always show completed show/movie as it's own line
$watched_grouping_maxhr = 2; ## advanced config -- do not group shows together if start/restart is > X hours
$count_paused = 0; ## included paused time in time watched ( probably do not want this )
$inc_non_library_content = 0; ## non library content (channels) are excluded. Set to 1 to include them
#@exclude_library_ids = (999, 998); ## exclude this library section (by id) -- full exclusion