npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

plex-status

v1.0.3

Published

Export current status of a plex server

Downloads

5

Readme

plex-status

This module will output the current status of a given plex server. Useful for injestion to splunk or other log analysis tools.

Credit

Original code is credit of Derek Rada from this original gist: https://gist.github.com/Dirrk/608642bd820849736ad2

CLI

Example

$ plex-status -t 0000000000000000 --host 192.168.0.0 --port 32400
{"success":true,"timestamp":"2017-01-09T07:06:22.621Z","title":"Ex MachTina","plexId":"6741","plexType":"episode","year":"2017","show":"Bob's Burgers","season":"7","episode":"8","user":"mrlannigan","userId":"1","platform":"Chrome","device":"OSX","player":"Plex Web (Chrome)","status":"paused","player_address":"10.35.0.0","video_transcoding":"copy","audio_transcoding":"transcode","throttled":"1","progress":57,"container":"mkv","resolution":"720","videoCodec":"h264","audioCodec":"ac3","video_height":"718","video_width":"1280","framerate":"24p","bitrate":"1473","file":"/some/file/location/Bob's Burgers/Season 07/Bob's Burgers - S07E08 - Ex MachTina.mkv","file_size":"237242504","sessionId":"000000000000000000","bandwidth":"3094","sessionlocation":"lan"}

The command will output a JSON string for each open session on the targeted plex server.

Usage with Cron and NVM Example

* * * * * NODE_VERSION=6 /Users/julian/.nvm/nvm-exec plex-status -t 00000000000000000 >> /var/log/plex/plexstatus.log 2>> /var/log/plex/plexerror.log

NOTE: This assumes you have installed this module globally within the given NODE_VERSION.

API

.get(options[, callback])

Options

  • authToken - Plex authenication token
  • [hostname] - (localhost) Hostname of plex server
  • [port] - (32400) Port of plex server
  • [https] - (false) Use HTTPS or not

[callback(err, result[])]

If not provided a Promise will be returned.