plexSentry (20160511 Update)

The config file included is pretty self explanatory, but for your db string you’ll have something like this

add key=“PlexSentryDB” value=“Data Source=ServerName;Initial Catalog=PlexSentry;Integrated Security=True;”

thanks, i will give another shot

wish me luck :slight_smile:

*edit

Can’t get this working at all, just dont have the necessary skills :frowning:

I will just wait and hopefully some kind soul will write a Idiots guide

Not an expert on these things, just wondered if it was possible that this could run in a docker container & if there were any bright sparks with the ability to create one.
This seems like it could be a very useful addition

-SQL Server Update (only PlexSentry.exe was changed) - Because of changes to the PMS or the new app, iOS users (maybe other clients, but haven’t seen it yet) could get around limitations by changing their bitrate after start. The status api point /status/sessions would then not update with the new transcode key, preventing a kill. Add a new function that queries the /transcode/sessions api point for orphan transcodes by eliminating known keys from the sync and status api points, and then kills any “orphaned” key that is transcoding video. The side effect is if there is a user that has transcoding privileges that makes a switch, they’ll have to restart the video with the desired bitrate to avoid orphaned transcode keys. I have two a##hole users to thank for the requirement of this new code.

@lorrebreaker said:
Not an expert on these things, just wondered if it was possible that this could run in a docker container & if there were any bright sparks with the ability to create one.
This seems like it could be a very useful addition

+1 to this! Would love to be able to use a tool like this with my Plex server (currently in a docker) since the Plex teams seems to have no plans to institute user bandwidth controls.

Anything I try to play through the fireTV is shut down saying that it is an orphaned transaction session, all other players seem to work fine. Any idea?

@mearlin can you post a debug/verbose enabled log from your PMS (change to debug and verbose, do the stuff that kills it, and post log) ? I assumed there was going casualties, just didn’t know how.

@random.server said:
mearlin can you post a debug/verbose enabled log from your PMS (change to debug and verbose, do the stuff that kills it, and post log) ? I assumed there was going casualties, just didn’t know how.

@mearlin , I don’t see any session key changes, but I might have a work around for you. Your fire tv is forcing a transcode because the file’s h264 level is 4.1 and fire tv has a limit of 4.0. You should go to settings->advanced->player and raise your h264 maximum level, that should eliminate transcoding because of that (artificially) low limit. I’m going to go through your logs a little slower and see what I can figure out.

The fire tv plays the videos while PlexSentry is running with that change.

Something I just noticed, the Poster column was working and now it is blank and also getting a message that says “Processing has failed”. Using Chrome if that makes any difference.

I do see the video playing in the list and the Watched/Length is moving along correctly.

@mearlin , quick question, if this is a local server, why do you have your bitrate set to 2Mbs? I noticed that on my second run through. That’s an odd error. It pulls the posters from your PMS, did your password change?

The reason it was set to 2Mb was that I was doing some testing on my network. I saturated the network link and then tried to play a video, checking to see how high it could be and still play. I corrected that when I was going through the settings. I normally leave it at 8Mb.
It can easily run higher, but there are many devices connecting and I have other data being moved across the network that has priority.

Password has not changed.

what about the variables at the top of the SCript-Plex-common.js?
var server_address_external = //external address of server
var server_address_internal = //internal address of server
var server_address_internal_port = //external address of server

Wow, I really need to have it pull those from the db, another item for the list

@random.server said:
what about the variables at the top of the SCript-Plex-common.js?
var server_address_external = //external address of server
var server_address_internal = //internal address of server
var server_address_internal_port = //external address of server

Wow, I really need to have it pull those from the db, another item for the list

I realized that I had changed them, so I changed them back and the Posters are showing again.

Settings for those entries;
http://mydns:32400 - Only this setting seems to make any difference
http://localhost
32400

The other two settings can be left blank and it still functions to the same extent that it is functioning.

I don’t think I needed to do it, but I dropped the database and recreated it. Something I did without thinking was to give the IIS account owner of the PlexSentry database. I also gave it public access of tempdb.

Doing that stopped the Process failures.

Hello, I read through all the posts here and plexSentry sounds great. I’m considering setting it up but had one concern. My OS drive is running a bit low on space these days. How much space does a typical plexSentry SQL database take up? I have 20 remote users and push out around 30-60 streams per day. Thanks for the work being done here!

I’m not sure if I missed it in the pages, but is there a link to a github for this project? I’m actually looking to implement this in the opposite fashion, as I’ve got multiple users who are watching streams using Direct Play and Direct Stream, but I’d much rather force them down a little to balance bandwidth use… I’d also like to take a stab at the PHP front end, but not sure where to start.

There’s no github, a private svn thou. You can’t do anything to Direct Plays but remove the share and wait for the client to update (some are faster than others) until Plex changes things on the backend. As for a php conversion you can look at the middleman aspx file and it’ll have what you need.

This looks like a great utility, thanks for making this available Random.Server!

I’m stuck getting SQLite to build the db. Everytime I copy/paste the command from “SQL Server - Build Commands” into the CLI I get “Error: near “DATABASE” : syntax error” [screenshot]

I followed this guide to install SQLite
I used this guide to set the PATH environment variable.
I’m running Windows Server 2012R2

@SeaNap you don’t need to build the SQLite dB, there’s an empty one already included.