* added options for logging IP Address of client (default is disabled)
* enable this in config.pl with the $server_log, $log_client_ip (enable $debug_logging to see what matched )
-- format_options: {ip_address}
-- Requires parsing of PMS log file. $server_log in config.pl
-- log file searched in reverse order for most recent line (File::ReadBackwards)
-- match on itemID+machineIdentifier -or- machineIdentifier
-- fallback to only itemID (ratingKey). Could match wrong IP if multiple clients watch the same itemID (fallback: mainly for clients in 'List of networks that are allowed without auth')
-- REQUIRES perl module File::ReadBackwards - to conserve memory)
* Added SSL support (port 32443)
* friendly name now allows for user+platform(title) ( example in config.pl-dist )
* $debug_logging added to config.pl ( still need to add more debug logging though )
* Variables allowed in 'application' for prowl,pushover & 'from' for boxcar
* Fix: AM/PM for OSX (non GNU)
* Fix: --watching now calls --notify before it shows now playing content. Fixes issue when content hasn't been logged as started/stopped
* Fix: allows season/episode fields to be empty for 'show'
* Fix: Do not update XML in DB if the XML is not valid
* Fix: --watched: {percent_complete} -- use the last viewOffset instead of the first.
* Fix: --watched: always display a 100% watched show/movie. I.E. show two lines: if user completes show1 (100%), then restarts said show and tops at < 90% on the same day (advanced config)
* Fix: --watched: do NOT group shows together IF hours between start of the same show is > 3 hours. (advanced config)
* 'application' => $appname removed from boxcar ( not used ) 'from' is the equivalent
* advanced config options available. View README. (Mainly to not convolute the config more than it already is)
* README: updated instructions to NOT call sudo before running the script. This way the DB is not owned by root and can be run by the 'normal' user.
* any time you upgrade, please copy your plexWatch.db to a safe location for a backup.
* If you enable ip logging - File::ReadBackwards is required
Great! Your hard work on this is very much appreciated!
I have been using PlexWatch and it gives me great information on the usage of my Plex Server.
Question:
besides backing up the plexWatch.db file, what steps do you suggest to upgrade to this new version? Just replace my old plexWatch.pl and config.pl with the new ones?
Great! Your hard work on this is very much appreciated!
I have been using PlexWatch and it gives me great information on the usage of my Plex Server.
Question:
besides backing up the plexWatch.db file, what steps do you suggest to upgrade to this new version? Just replace my old plexWatch.pl and config.pl with the new ones?
Thx!
Thank you. It's always nice to hear the appreciation!
I do say to backup the plexWatch.db file even though there should be a few backups already in your directory. I'm just paranoid :)
The plexWatch.pl script is *always* safe to just replace. You might want to copy it too though if you ever want to revert easily. Github will always have the revision though.
I still haven't taken the time to figure out the best way to implement new configs. For now, I'd suggest opening them up side by side and adding anything new you want into your existing config. I try and make it so the old config will work with newer versions. It's just that new config.pl-dist might have new options for you to utilize.
Thank you. It's always nice to here the appreciation!
I do say to backup the plexWatch.db file even though there should be a few backups already in your directory. I'm just paranoid :)
The plexWatch.pl script is *always* safe to just replace. You might want to copy it too though if you ever want to revert easily. Github will always have the revision though.
I still haven't taken the time to figure out the best way to implement new configs. For now, I'd suggest opening them up side by side and adding anything new you want into your existing config. I try and make it so the old config will work with newer versions. It's just that new config.pl-dist might have new options for you to utilize.
Thank you - your FAST responses are awesome!
I am a newbie to linux and got tripped up on ReadBackwards.....
I apologize if this is buried somewhere in the 13 pages of comments, but has anyone tried this for Win7? I've been trying to implement something like this for some time!
I really appreciate everyone's work on this, it's frankly impressive!
I apologize if this is buried somewhere in the 13 pages of comments, but has anyone tried this for Win7? I've been trying to implement something like this for some time!
I really appreciate everyone's work on this, it's frankly impressive!
I tried getting this to work on windows and succeeded, however I had to strip two perl modules and make a few code changes. I will look into seeing if I can get a windows release out. Maybe within the week if all goes well.
I think I had to strip twitter and the date parser which is only used on the command line to limit output by dates.
I apologize if this is buried somewhere in the 13 pages of comments, but has anyone tried this for Win7? I've been trying to implement something like this for some time!
I really appreciate everyone's work on this, it's frankly impressive!
I tried getting this to work on windows and succeeded, however I had to strip two perl modules and make a few code changes. I will look into seeing if I can get a windows release out. Maybe within the week if all goes well.
I think I had to strip twitter and the date parser which is only used on the command line to limit output by dates.
Edit: forgot to say thanks :)
OK... I guess my timeline was off :) Here is a release candidate for windows. I have NOT fully tested this will all the options, but most everything seems to work for me.
Things known not to work
* --start , --stop options on the cli: not a huge deal and can possible be fixed later
* Twitter : **unknown state
* GNTP : **unknown state
* Growl : unknown state ( I believe this was only an OSX thing anyways and GNTP above is the correct module to use )
** I remember twitter or gntp not working -- but I can't recall if both didn't work.
Hi there ljunkie, been watching everynow and then for that windows module. Does it requires anything to be installed or, how is it suposed to work doesn't seem to fetch any data for me atleast.
"*Nothing Watched" when i go plexwatch.exe --watched
The installation instruction for windows was a bit freerunning style so I might have done something wrong.
If you're giving interest in either seeing how my machine respond and/or to fix this i could always get that twitch.tv on so you can see, just inbox me ;)
If not, i'll just wait and see how things will go on here with them Win7 install ;P
Hi there ljunkie, been watching everynow and then for that windows module. Does it requires anything to be installed or, how is it suposed to work doesn't seem to fetch any data for me atleast.
"*Nothing Watched" when i go plexwatch.exe --watched
The installation instruction for windows was a bit freerunning style so I might have done something wrong.
If you're giving interest in either seeing how my machine respond and/or to fix this i could always get that twitch.tv on so you can see, just inbox me ;)
If not, i'll just wait and see how things will go on here with them Win7 install ;P
Thanks and GL with that mod ;)
Nothing will be watched as there is no history from the PMS. This script is the one that will keep history along with notifications going forward. You will have to run this script every minute with a scheduled task.
Step one. Start a video, then run the script with no arguments. Then stop the video and run the script again. Now --watched should show a video.
I can post more info later, but I'm mobile right now. Let me know how this goes
Seems like i was missing a few module, got that fixed.
I've run plexwatch.exe and plexwatch.pl without arguments and i'm getting this.
You are not missing any modules. You actually do not need any modules with the plexWatch.exe - it's all bundled into the file. However you must have installed modules to be able to get the perl file to run (so nice work) :)
You are not missing any modules. You actually do not need any modules with the plexWatch.exe - it's all bundled into the file. However you must have installed modules to be able to get the perl file to run (so nice work) :)
I've added a "current activity" portion to my website and am parsing the PMS web API "status/sessions" for my source. I noticed the contains the email address of the current user, not their username. This made me curious how you were finding the username and storing it in the plexWatch database so I started digging through plexWatch.pl but have not been able to figure our where the translation occurs. I see no references of usernames in my PMS logs so it can't be there. Can you shed any light on how you're getting the usernames? I wanted to try and use the web API but I need the real usernames to use for a link to user activity and history that correspond to the plexWatch db users.
Thanks
Update: I only notice the email address when I'm personally logged into my account and watching. Other users appear as their myPlex username.
I've added a "current activity" portion to my website and am parsing the PMS web API "status/sessions" for my source. I noticed the contains the email address of the current user, not their username. This made me curious how you were finding the username and storing it in the plexWatch database so I started digging through plexWatch.pl but have not been able to figure our where the translation occurs. I see no references of usernames in my PMS logs so it can't be there. Can you shed any light on how you're getting the usernames? I wanted to try and use the web API but I need the real usernames to use for a link to user activity and history that correspond to the plexWatch db users.
Thanks
Update: I only notice the email address when I'm personally logged into my account and watching. Other users appear as their myPlex username.
I am pulling it from the now watching api '/status/sessions' with the key - in the DB it's stored in the XML column.
my $orig_user = (split('\@',$vid->{User}->{title}))[0] if $vid->{User}->{title};
The code above will strip the first part of the email address, if it's an email address. I checked the recent xml status of all my users including myself as a plex pass user and it only shows my username as the title. The odd thing is that I have changed my username in my.plexapp.com a couple times and I think it has confused my.plexapp.com -- my username is ljunkie yet it logs everything as rarflix :) Maybe that is a bug somewhere upstream.
I have yet to see an email address as the title, however I must have as the code I have here strips only the first part