Editing
PlexWatch
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Using the script === ==== Sending Notifications ==== * Follow the install guide above, and refer to step #5 and #6 ==== Getting a list of watched shows ==== * This will only work for shows this has already notified on. ===== list all watched shows - no limit ===== <source lang=text> /opt/git/plexWatch/plexWatch.pl --watched ======================================== Watched ======================================== Date Range: Anytime through Now User: jimbo Wed Jun 26 15:56:09 2013: jimbo watched: South Park - A Nightmare on FaceTime [duration: 22 minutes, and 15 seconds] Wed Jun 26 20:18:34 2013: jimbo watched: The Following - Whips and Regret [duration: 46 minutes, and 45 seconds] Wed Jun 26 20:55:02 2013: jimbo watched: The Following - The Curse [duration: 46 minutes, and 15 seconds] User: carrie Wed Jun 24 08:55:02 2013: carrie watched: The Following - The Curse [duration: 46 minutes, and 25 seconds] Wed Jun 26 20:19:48 2013: carrie watched: Dumb and Dumber [1994] [PG-13] [duration: 1 hour, 7 minutes, and 10 seconds] </source> ===== list watched shows - limit by TODAY only ===== <source lang=text> /opt/git/plexWatch/plexWatch.pl --watched --start=today --start=tomorrow ======================================== Watched ======================================== Date Range: Fri Jun 28 00:00:00 2013 through Sat Jun 29 00:00:00 2013 User: jimbo Fri Jun 28 09:18:22 2013: jimbo watched: Married ... with Children - Mr. Empty Pants [duration: 1 hour, 23 minutes, and 20 seconds] </source> ===== list watched shows - limit by a start and stop date===== <source lang=text> /opt/git/plexWatch/plexWatch.pl --watched --start="2 days ago" --stop="1 day ago" ======================================== Watched ======================================== Date Range: Fri Jun 26 00:00:00 2013 through Thu Jun 27 00:00:00 2013 User: Jimbo Wed Jun 26 15:56:09 2013: rarflix watched: South Park - A Nightmare on FaceTime [duration: 22 minutes, and 15 seconds] Wed Jun 26 20:18:34 2013: rarflix watched: The Following - Whips and Regret [duration: 46 minutes, and 45 seconds] Wed Jun 26 20:55:02 2013: rarflix watched: The Following - The Curse [duration: 46 minutes, and 15 seconds] User: Carrie Wed Jun 26 20:19:48 2013: Carrie watched: Dumb and Dumber [1994] [PG-13] [duration: 1 hour, 7 minutes, and 10 seconds] </source> ===== list watched shows: option -nogrouping vs default ===== ===== --nogrouping ===== <source lang=text> Sun Jun 30 15:12:01 2013: exampleUser watched: Your Highness [2011] [R] [duration: 27 minutes and 54 seconds] Sun Jun 30 15:41:02 2013: exampleUser watched: Your Highness [2011] [R] [duration: 4 minutes and 59 seconds] Sun Jun 30 15:46:02 2013: exampleUser watched: Star Trek [2009] [PG-13] [duration: 24 minutes and 17 seconds] Sun Jun 30 17:48:01 2013: exampleUser watched: Star Trek [2009] [PG-13] [duration: 1 hour, 44 minutes, and 1 second] Sun Jun 30 19:45:01 2013: exampleUser watched: Your Highness [2011] [R] [duration: 1 hour and 24 minutes] </source> ===== without --nogrouping [default]===== <source lang=text> Sun Jun 30 15:12:01 2013: exampleUser watched: Your Highness [2011] [R] [duration: 1 hour, 56 minutes, and 53 seconds] Sun Jun 30 15:46:02 2013: exampleUser watched: Star Trek [2009] [PG-13] [duration: 2 hours, 8 minutes, and 18 seconds] </source> ==== --stats (users total watched time - and per day) ==== <source lang=text> ./plexWatch.pl --watched --stats --user frank --start="3 days ago" * Limiting results to frank ======================================== Watched ======================================== Date Range: Sat Jun 29 00:00:00 2013 through Now User: frank Sat Jun 29 08:19:02 2013: frank watched: Lockout [2012] [PG-13] [duration: 1 hour, 38 minutes, and 59 seconds] Sat Jun 29 10:02:01 2013: frank watched: Stand Up Guys [2012] [R] [duration: 1 hour and 30 minutes] Sat Jun 29 11:33:01 2013: frank watched: Brave [2012] [PG] [duration: 1 hour and 24 minutes] Sat Jun 29 12:58:01 2013: frank watched: The Last Stand [2013] [R] [duration: 1 hour and 39 minutes] Sat Jun 29 14:38:03 2013: frank watched: Shaquille O'Neal Presents: All Star Comedy Jam: Live from South Beach [2009] [] [duration: 24 minutes and 58 seconds] Sat Jun 29 15:08:01 2013: frank watched: Dredd [2012] [R] [duration: 1 hour, 29 minutes, and 55 seconds] Sat Jun 29 16:43:01 2013: frank watched: Billabong Odyssey [2003] [PG] [duration: 1 hour, 15 minutes, and 1 second] Sat Jun 29 18:00:01 2013: frank watched: The Bridge [2006] [R] [duration: 47 minutes] Sat Jun 29 18:57:01 2013: frank watched: Snitch [2013] [PG-13] [duration: 2 hours and 27 minutes] Sat Jun 29 21:26:01 2013: frank watched: The Host [2013] [PG-13] [duration: 2 hours and 8 minutes] Sat Jun 29 23:35:02 2013: frank watched: Jim Gaffigan: Mr. Universe [2012] [NR] [duration: 57 minutes and 59 seconds] Sun Jun 30 07:15:02 2013: frank watched: A Good Day to Die Hard [2013] [R] [duration: 1 hour, 31 minutes, and 59 seconds] Sun Jun 30 15:12:01 2013: frank watched: Your Highness [2011] [R] [duration: 1 hour, 56 minutes, and 53 seconds] Sun Jun 30 15:46:02 2013: frank watched: Star Trek [2009] [PG-13] [duration: 2 hours, 8 minutes, and 18 seconds] Sun Jun 30 21:10:01 2013: frank watched: Judge Dredd [1995] [R] [duration: 1 hour, 41 minutes, and 1 second] Mon Jul 1 20:53:02 2013: frank watched: Sinister [2012] [R] [duration: 1 hour, 44 minutes, and 59 seconds] Mon Jul 1 22:40:01 2013: frank watched: Surviving the Holidays with Lewis Black [2009] [PG] [duration: 3 minutes] Mon Jul 1 22:46:01 2013: frank watched: MegaMind [2010] [PG] [duration: 1 hour and 36 minutes] ======================================== Stats ======================================== user: frank's total duration 1 day, 2 hours, 24 minutes, and 2 seconds Sat Jun 29 2013: frank 15 hours, 41 minutes, and 52 seconds Sun Jun 30 2013: frank 7 hours, 18 minutes, and 11 seconds Mon Jul 1 2013: frank 3 hours, 23 minutes, and 59 seconds </source> ==== --user ( limit output to one user ) ==== * works with --watched. <source lang=text> ./plexWatch.pl --watched --stats --user frank --start="3 days ago" </source> ==== Help ==== <source lang=text> /opt/plexWatch/plexWatch.pl --help </source> <source lang=text> PLEXWATCH(1) User Contributed Perl Documentation PLEXWATCH(1) NAME plexWatch.pl - Notify and Log ’Now Playing’ content from a Plex Media Server SYNOPSIS plexWatch.pl [options] Options: -notify=... Notify any content watched and or stopped [this is default with NO options given] -watched=... print watched content -start=... limit watched status output to content started AFTER/ON said date/time -stop=... limit watched status output to content started BEFORE/ON said date/time -nogrouping will show same title multiple times if user has watched/resumed title on the same day -watching=... print content being watched -show_xml=... show xml result from api query -debug=... hit and miss - not very useful OPTIONS -notify This will send you a notification through prowl and/or pushover. It will also log the event to a file and to the database. This is the default if no options are given. -watched Print a list of watched content from all users. -start * only works with -watched limit watched status output to content started AFTER said date/time Valid options: dates, times and even fuzzy human times. Make sure you quote an values with spaces. -start=2013-06-29 -start="2013-06-29 8:00pm" -start="today" -start="today at 8:30pm" -start="last week" -start=... give it a try and see what you can use :) -stop * only works with -watched limit watched status output to content started BEFORE said date/time Valid options: dates, times and even fuzzy human times. Make sure you quote an values with spaces. -stop=2013-06-29 -stop="2013-06-29 8:00pm" -stop="today" -stop="today at 8:30pm" -stop="last week" -stop=... give it a try and see what you can use :) -nogrouping * only works with -watched will show same title multiple times if user has watched/resumed title on the same day with --nogrouping Sun Jun 30 15:12:01 2013: exampleUser watched: Your Highness [2011] [R] [duration: 27 minutes and 54 seconds] Sun Jun 30 15:41:02 2013: exampleUser watched: Your Highness [2011] [R] [duration: 4 minutes and 59 seconds] Sun Jun 30 15:46:02 2013: exampleUser watched: Star Trek [2009] [PG-13] [duration: 24 minutes and 17 seconds] Sun Jun 30 17:48:01 2013: exampleUser watched: Star Trek [2009] [PG-13] [duration: 1 hour, 44 minutes, and 1 second] Sun Jun 30 19:45:01 2013: exampleUser watched: Your Highness [2011] [R] [duration: 1 hour and 24 minutes] without --nogrouping [default] Sun Jun 30 15:12:01 2013: exampleUser watched: Your Highness [2011] [R] [duration: 1 hour, 56 minutes, and 53 seconds] Sun Jun 30 15:46:02 2013: exampleUser watched: Star Trek [2009] [PG-13] [duration: 2 hours, 8 minutes, and 18 seconds] -watching Print a list of content currently being watched -show_xml Print the XML result from query to the PMS server in regards to what is being watched. Could be useful for troubleshooting.. -debug This can be used. I have not fully set everything for debugging.. so it’s not very useful DESCRIPTION This program will Notify and Log ’Now Playing’ content from a Plex Media Server HELP nothing to see here. perl v5.10.1 2013-06-28 PLEXWATCH(1) </source>
Summary:
Please note that all contributions to RARForge may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
RARForge:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Home
All Pages
All Files
View Categories
Recent changes
Random page
Edit this menu
Tools
What links here
Related changes
Special pages
Page information