Commit Graph

194 Commits

Author SHA1 Message Date
dirtycajunrice
aa6017374e moved to bullet points for uniformity with conditions 2018-12-19 18:02:31 -06:00
dirtycajunrice
72fbf36377 fixed disappearing whitespace 2018-12-19 17:59:21 -06:00
dirtycajunrice
64f2312248 Updated readme to include Transcode Decision Change and explain
transcoding decision vs. video decision
2018-12-19 17:53:29 -06:00
Blacktwin
f7a7125783 24 is not valid. 0 instead. 2018-12-06 10:16:03 -05:00
Blacktwin
591c299af6 fix for title and transcode sessions 2018-11-19 23:41:58 -05:00
Blacktwin
17baec0e5d edit example to include --today 2018-10-24 00:44:11 -04:00
Blacktwin
dbb03e595f docstring --today 2018-10-24 00:43:39 -04:00
Blacktwin
f9f8cf401a added --today to only search for history of today 2018-10-16 15:03:48 -04:00
Blacktwin
19e85e6dbb Merge remote-tracking branch 'origin/master' 2018-10-07 09:20:44 -04:00
Landon Abney
c96596f422
Cleanup Rich Notifications instructions
Essentially just some stylistic changes, `slack` -> `Slack`, fixing bullet lists, and making the required arguments section clearer.
2018-10-03 11:27:09 -07:00
Blacktwin
78d196c4df remove unshare function 2018-09-26 16:08:29 -04:00
Blacktwin
85ada26e3d example for limit of specific library 2018-09-26 15:44:10 -04:00
Blacktwin
c34736f124 print reason for limit kill 2018-09-26 15:22:11 -04:00
Blacktwin
0c2d97cad4 docstring correction 2018-09-26 09:09:46 -04:00
Blacktwin
6fff1c61df update rich notification section 2018-09-26 09:09:16 -04:00
samwiseg00
8fffc30c77 Update README to reflect new kill_stream features 2018-09-08 23:58:08 -04:00
samwiseg00
713f6fbe56 Rewrite Kill_stream.py to add rich message functionality 2018-09-08 20:31:06 -04:00
blacktwin
038c17c41d
Merge pull request #88 from JonnyWong16/kill-pause-username
Add username argument for kill paused
2018-08-14 13:53:16 -04:00
JonnyWong16
ec07cebef9 Add username argument for kill paused 2018-08-13 21:15:31 -07:00
Blacktwin
8c3781728a sessionId check bypass if jbop == allstreams.
sessionId arg not needed for killing all user streams.
2018-08-13 07:03:37 -04:00
Blacktwin
ffa97daeff sessionId no longer required.
check for sessionId is performed later.
2018-08-13 07:01:05 -04:00
Blacktwin
40ac277101 remove unixtime and datestamp args. Use unixtime and datestamp from script 2018-07-10 11:15:44 -04:00
Blacktwin
f71e864a75 remove unixtime arg. Use unixtime from script 2018-07-10 11:14:12 -04:00
Blacktwin
caa41f3119 remove datestamp arg. Use datestamp from script 2018-07-10 11:08:20 -04:00
Blacktwin
42d381f9e2 encoding for killmessage, enviro instead of config, import os missing. 2018-07-10 10:55:58 -04:00
Blacktwin
03b36c1035 obsolete, use limiterr 2018-07-10 08:22:31 -04:00
Blacktwin
8cd280ea8a limiterr and readme with examples. 2018-07-10 08:17:54 -04:00
Blacktwin
20f79eafa8 doc fix 2018-07-10 08:17:29 -04:00
JonnyWong16
c413526ec3 Return empty list if get_activity fails 2018-06-29 23:58:24 -07:00
JonnyWong16
2bd92acca7 Encode back to UTF-8 2018-06-29 23:50:42 -07:00
JonnyWong16
1e8e96398b Decode script arguments 2018-06-29 13:14:13 -07:00
Landon Abney
473a073dd6
Wrap message in quotes
Now that Tautulli is sending the arguments correctly as of v2.1.14, wrap the kill messages in quotes so it's obvious where they start and stop.
2018-06-27 14:41:43 -07:00
Landon Abney
bef7be7627
Exit if a sessionID wasn't provided
If the user mistakenly calls the script without a `sessionID`, exit 
early with a warning message and the likely reason.
2018-06-20 10:45:00 -07:00
Landon Abney
98186dec8b
Ensure newlines in output
Although there will only be a single line of output in most cases, 
ensure that newlines are printed in case there are multiple lines, or 
the script is running in a full shell.
2018-06-18 20:49:16 -07:00
Landon Abney
75b4fa3229
Add examples for paused streams
Add a few examples for usage of the new paused stream functionality.
2018-06-18 13:30:41 -07:00
Landon Abney
c976a3dfb1
Cleanup format of examples
Cleans up the examples to all have a standard format that covers all
required settings and gives example messages where appropriate.
2018-06-18 13:22:40 -07:00
Landon Abney
7b07bb314f
Update authors 2018-06-18 12:39:21 -07:00
Landon Abney
0e5c374449
Return instead of forcibly exiting
This makes no difference currently as the script doesn't do anything
after this function finishes, but it allows any cleanup work to happen
at the end.
2018-06-18 12:38:10 -07:00
Landon Abney
ad682f3d1b
Fix time limit on paused stream monitoring
The only way that this could ever be hit is if the stream is still
active on the server, but the state is NOT one of paused, playing, or
buffering. In case Plex decides to change the states in the future
having this working properly is a good idea ;)
2018-06-18 12:37:12 -07:00
Landon Abney
4f3e35ef97
Remove an incorrect condition
The stream location can be `CELL` for example, which would count as
"local" for the first method of checking.
2018-06-18 12:09:54 -07:00
Landon Abney
1fdae8a105
Minor style cleanup and typos 2018-06-18 12:09:05 -07:00
Landon Abney
99b36aab88
camelCase -> snake_case 2018-06-18 11:54:17 -07:00
Landon Abney
31ddd97a34
Actually use BODY_TEXT_USER 2018-06-18 11:50:41 -07:00
Landon Abney
98b72f0a62
Cleanup documentation and add examples
Cleanup the documentation on how to set it up to match the current 
Tautulli state. Add a few examples to give people ideas for how to use 
this script.
2018-06-17 00:27:13 -07:00
Landon Abney
c03860ec70
Incorporate waiting to kill paused streams into kill_stream.py
Incorporate the functionality of `wait_kill_paused_notify.py` into 
`kill_stream.py`. A new selector is added of `paused` enabling this 
mode, and adds two additional arguments to control how long to wait for 
paused streams, and how often to check a stream's status. The default 
values are to kill a stream after 20 minutes, checking every 30 seconds.

The Tautulli API is used for all functionality, meaning the `plexapi` 
module is no longer required.
2018-06-17 00:01:00 -07:00
Landon Abney
0ba8e2bda0
Add a docstring for terminate_session 2018-06-16 23:53:17 -07:00
Landon Abney
4ebfaf17bd
Always send a notification if an agent is specified
Whenever a stream is killed, send a notification for that stream if a 
notification agent has been specified. If no username is specified, 
simply list the session ID.
2018-06-16 23:53:15 -07:00
Landon Abney
2116082fd7
List --killMessage at the end
Although argparse should be smart enough to handle this in any order, 
it's generally easier for us poor humans to read the arguments if the 
unstructured one is the last argument. Re-order the listing to make this 
clearer.
2018-06-16 23:53:12 -07:00
Landon Abney
342284173b
Use the same session for all requests
Use the Session created at the start of the script for all requests, 
instead of creating a new one for some of them (which doesn't inherit 
the settings set on it at the start).
2018-06-16 23:51:53 -07:00
Landon Abney
7b0cc2d2a9
Disable InsecureRequestWarning if SSL verify is False
If checking of HTTPS validity is disable, turn off the warning that it 
has been disabled since we have done so explicitly.
2018-06-16 23:51:51 -07:00