These are chat archives for scytherswings/Plex-Board

29th
Mar 2017
Andrew Newell
@scytherswings
Mar 29 2017 00:30
o/
@seanvree what's up
Sean Vreeland
@seanvree
Mar 29 2017 00:31
what up buddy
how you?
Andrew Newell
@scytherswings
Mar 29 2017 00:31
pretty good, busy day. hbu?
Sean Vreeland
@seanvree
Mar 29 2017 00:31
not busy
ha
i need to find a job
ha
Andrew Newell
@scytherswings
Mar 29 2017 00:32
hahaha
Sean Vreeland
@seanvree
Mar 29 2017 00:32
soooo, have some ideas
first - a couple bugs I'm seeing
Andrew Newell
@scytherswings
Mar 29 2017 00:32
opensource projects are my second job it seems
;)
Sean Vreeland
@seanvree
Mar 29 2017 00:32
right? me too
Andrew Newell
@scytherswings
Mar 29 2017 00:32
but that's by choice
heheh
Sean Vreeland
@seanvree
Mar 29 2017 00:32
aaannnd roger
so
is the page designed to auto-refresh?
seems that it's auto-refreshing the plex data but not hte services
Andrew Newell
@scytherswings
Mar 29 2017 00:33
the page is fed by SSE
so and the SSE auto-reconnects
Sean Vreeland
@seanvree
Mar 29 2017 00:33
humm
is it working for you?
Andrew Newell
@scytherswings
Mar 29 2017 00:33
so it's supposed to be resilient to network outages
Sean Vreeland
@seanvree
Mar 29 2017 00:34
like I if I kill a service
it doesn't show it's down until I hit refresh on the broswer
have you tested?
Andrew Newell
@scytherswings
Mar 29 2017 00:34
That's weird
yeah i tested it last night
it takes about 3 seconds to change
from online to offline
Sean Vreeland
@seanvree
Mar 29 2017 00:34
yeah, I left it for hours
might be a windows thing
Andrew Newell
@scytherswings
Mar 29 2017 00:34
that's not right
Sean Vreeland
@seanvree
Mar 29 2017 00:35
nothign in the logs
Andrew Newell
@scytherswings
Mar 29 2017 00:35
how did you configure the service?
Sean Vreeland
@seanvree
Mar 29 2017 00:35
okay, so there's that
Andrew Newell
@scytherswings
Mar 29 2017 00:35
what port
Sean Vreeland
@seanvree
Mar 29 2017 00:35
I mean, I have tonx of them
hang tight, let me open a port so you can see my live site
Andrew Newell
@scytherswings
Mar 29 2017 00:35
is the other service running on your localhost?
aiight
yes
so both the plexboard and the service is running on localhost
Andrew Newell
@scytherswings
Mar 29 2017 00:36
whoah
Sean Vreeland
@seanvree
Mar 29 2017 00:36
so i'll kill headphones
Andrew Newell
@scytherswings
Mar 29 2017 00:36
it's slow hold on
weird
Sean Vreeland
@seanvree
Mar 29 2017 00:36
okay, so I just killed headphones
Andrew Newell
@scytherswings
Mar 29 2017 00:36
it seems the glyphicons aren't loading
yeah i see it's offline, but i just refreshed
Sean Vreeland
@seanvree
Mar 29 2017 00:37
yup
Andrew Newell
@scytherswings
Mar 29 2017 00:37
i'm watching the chrome debug tools
network tab
Sean Vreeland
@seanvree
Mar 29 2017 00:37
yeah, me too
Andrew Newell
@scytherswings
Mar 29 2017 00:37
it should hit /notifications
for SSE
Sean Vreeland
@seanvree
Mar 29 2017 00:37
oh shit
wait
Andrew Newell
@scytherswings
Mar 29 2017 00:37
well this is weird
Sean Vreeland
@seanvree
Mar 29 2017 00:37
I need to reconfigure the network thing
hang tight
Andrew Newell
@scytherswings
Mar 29 2017 00:37
yeah
Sean Vreeland
@seanvree
Mar 29 2017 00:37
it was set up for reverse proxy
hang tight
Andrew Newell
@scytherswings
Mar 29 2017 00:37
i was about to say the assets aren't loading correctly
I wish there was a better way to configure it
i'm not sure how that's handled elsewhere
but i guess, in normal deployments you probably don't change your proxy setup much
Sean Vreeland
@seanvree
Mar 29 2017 00:38
yeah, I woujldn't worry about that
okay, refresh
Andrew Newell
@scytherswings
Mar 29 2017 00:39
ok refreshing
assets are still pissed off
well, at least the glyphicons are
Sean Vreeland
@seanvree
Mar 29 2017 00:39
yeah, that's weird
Andrew Newell
@scytherswings
Mar 29 2017 00:39
let me take a screenshot
Sean Vreeland
@seanvree
Mar 29 2017 00:40
all I ahve to do is set the server_config.yml to asset_host: http://seanvree.com:3000 ? right?
Andrew Newell
@scytherswings
Mar 29 2017 00:40
Yeah. Did you restart the server by chance?
Sean Vreeland
@seanvree
Mar 29 2017 00:40
yup
Andrew Newell
@scytherswings
Mar 29 2017 00:40
..... that's puzzling
Sean Vreeland
@seanvree
Mar 29 2017 00:40
I have it set up as a service, so all I have to do is just restart the plex-board service
is that related to it not refreshing do you think?
becuase that MAY just be a windows thing
which I can research
it's working. so not a big deal
Andrew Newell
@scytherswings
Mar 29 2017 00:41
I wouldn't think so
but i can't be certain
Sean Vreeland
@seanvree
Mar 29 2017 00:42
okay, a couple other things
did you by chance see that .ppt I made?
Andrew Newell
@scytherswings
Mar 29 2017 00:42
I haven't looked at it yet
i can take a look now
Sean Vreeland
@seanvree
Mar 29 2017 00:42
Yeah, look at it and let me knwo what you think
I figured out how we can do the logs
let me know what you think about the center protion
Andrew Newell
@scytherswings
Mar 29 2017 00:44
that's a pretty busy page i'd have to say
haha
Sean Vreeland
@seanvree
Mar 29 2017 00:44
Yeah, agreed
Andrew Newell
@scytherswings
Mar 29 2017 00:44
I'm thinking the logs should be in a panel
that you can pop out
Sean Vreeland
@seanvree
Mar 29 2017 00:44
Yup
Andrew Newell
@scytherswings
Mar 29 2017 00:44
from the side
Sean Vreeland
@seanvree
Mar 29 2017 00:44
agreed
Andrew Newell
@scytherswings
Mar 29 2017 00:44
and then collapse
that would be pretty cool
Sean Vreeland
@seanvree
Mar 29 2017 00:44
yeah, what do you think about the center?
see - the theory is that MOST people only care about how many transocdes
now.....
there's a simple code to display simply the number of transcodes and streams
really easy
I just took that screenshot from plexpy
Andrew Newell
@scytherswings
Mar 29 2017 00:45
I'm sure I can get it from the api
Sean Vreeland
@seanvree
Mar 29 2017 00:45
Yup, it's easy
hang tight, let me send it to you
Andrew Newell
@scytherswings
Mar 29 2017 00:45
it's probably under sessions/status
because that's what I use already
to get the now playing
side-note, can you put headphones back online?
i'd like to see if it changes
Sean Vreeland
@seanvree
Mar 29 2017 00:46

[Variables]
@Include1=#@#variables.ini
@Include2=#@#plexpyvariables.ini
@Include3=#@#styles.ini
@Include4=#@#background.ini
CoreFilePath=""#CURRENTPATH#ComboCount-Large.ini""
BackgroundHeight=78
LeftPadding=25
TopPadding=5
AutoBorder=1

; ------------------------------------------------------------------------
; MEASURES
; ------------------------------------------------------------------------

[MeasurePlexPyAPI]
; Polls the PlexPy API for current activity and parses the JSON output.
; Returns the current stream count as StringIndex 1 and the rest of the
; JSON output as StringIndex 2.
Measure=Plugin
Plugin=WebParser
Url=http://#PlexPyAddress#/api/v2?apikey=#APIKey#&cmd=get_activity
RegExp=(?siU)stream_count": "(\d)(.*?)
UpdateRate=#RefreshRate#

[MeasurePlexPyStreamCount]
; Grabs just the stream count from [MeasurePlexPyAPI]. If there is
; exactly one stream, it displays the word "Stream". More or less than
; 1, and it displays the word "Streams".
Measure=Plugin
Plugin=WebParser
URL=[MeasurePlexPyAPI]
StringIndex=1
IfBelowValue=1
IfBelowAction=[!HideMeter OneStream][!ShowMeter Streams]
IfEqualValue=1
IfEqualAction=[!HideMeter Streams][!ShowMeter OneStream]
IfAboveValue=1
IfAboveAction=[!HideMeter OneStream][!ShowMeter Streams]

[MeasurePlexPyStreams]
; Grabs the rest of the JSON output from [MeasurePlexPyAPI] and passes
; it to [MeasurePlexPyTrancodeCount].
Measure=Plugin
Plugin=WebParser
URL=[MeasurePlexPyAPI]
RegExp=(?siU)^(.*)$
StringIndex=2
FinishAction=[!EnableMeasure MeasurePlexPyTranscodeCount][!UpdateMeasure MeasurePlexPyTranscodeCount]

[MeasurePlexPyTranscodeCount]
; Runs a .lua script on the rest of the JSON output from the PlexPy API
; that counts how many times "transcode_decision": "transcode" appears.
; If there is exactly one transcode, it displays the word "Transcode".
; More or less than 1, and it displays the word "Transcodes". This
; measure is disabled by default and only runs when called by
; [MeasurePlexPyStreams].
Measure=Script
ScriptFile=CountTranscodes.lua
IfBelowValue=1
IfBelowAction=[!HideMeter OneTranscode][!ShowMeter Transcodes]
IfEqualValue=1
IfEqualAction=[!HideMeter Transcodes][!ShowMeter OneTranscode]
IfAboveValue=1
IfAboveAction=[!HideMeter OneTranscode][!ShowMeter Transcodes]
UpdateDivider=-1
Disabled=1

; ------------------------------------------------------------------------
; METERS
; ------------------------------------------------------------------------

[PlexLogo]
; Displays the Plex logo. Double-clicking on the logo takes you to the
; Now Playing status screen in Plex.
Meter=Image
ImageName=plexlogo.png
X=#LeftPadding#
Y=(#TopPadding#+20)
LeftMouseDoubleClickAction=["http://#PlexAddress#/web/index.html#!/status/playing"]

[MeterStreamCount]
; Displays the stream count. Double-clicking on the number takes you to
; the PlexPy home page.
Meter=String
MeterStyle=StyleBigText
MeasureName=MeasurePlexPyStreamCount
StringAlign=Center
X=(#LeftPadding#+113)
Y=#TopPadding#
Text=%1
LeftMouseDoubleClickAction=["http://#PlexPyAddress#/home"]

[OneStream]
; Displays the word "Stream". Double-clicking takes you to the PlexPy
; home page.
Meter=String
MeterStyle=StyleSmallText
X=(#LeftPadding#+132)
Y=(#TopPadding#+22)
Text="Stream"
LeftMouseDoubleClickAction=["http://#PlexPyAddress#/home"]

[Streams]
; Displays the word "Streams". Double-clicking takes you to the PlexPy
; home page.
Meter=String
MeterStyle=StyleSmallText
X=(#LeftPadding#+132)
Y=(#TopPadding#+22)
Text="Streams"
LeftMouseDoubleClickAction=["http://#PlexPyAddress#/home"]

[MeterTranscodeCount]
; Displays the transcode count. Double-clicking on the number takes you to
; the PlexPy home page.
Meter=String
MeterStyle=StyleBigText
MeasureName=MeasurePlexPyTranscodeCount
StringAlign=Center
X=(#LeftPadding#+221)
Y=#TopPadding#
Text=%1
LeftMouseDoubleClickAction=["http://#PlexPyAddress#/home"]

[OneTranscode]
; Displays the word "Transcode". Double-clicking takes you to the PlexPy
; home page.
Meter=String
MeterStyle=StyleSmallText
X=(#LeftPadding#+240)
Y=(#TopPadding#+22)
Text="Transcode"
LeftMouseDoubleClickAction=["http://#Plex

yup
online
oh shit
Andrew Newell
@scytherswings
Mar 29 2017 00:47
it just went online for me when i switched
Sean Vreeland
@seanvree
Mar 29 2017 00:47
it worked
Andrew Newell
@scytherswings
Mar 29 2017 00:47
back to that tab
Sean Vreeland
@seanvree
Mar 29 2017 00:47
yup
hummm
may have something to do with my reverse proxy
Andrew Newell
@scytherswings
Mar 29 2017 00:47
i can see the events in the event stream
Sean Vreeland
@seanvree
Mar 29 2017 00:47
OHHH shit
I figured it out
okay, that's a do out
it won't autorefresh when going via reverse proxy because it thinks it's online because it's going thru the same port
443
let me dig into that
that's a windows thing I think
Andrew Newell
@scytherswings
Mar 29 2017 00:48
Uhh
if the socket accepts a TCP connection Plex-Board has no way of knowing what service actually is holding the socket open, it only knows that it accepts the connection
Sean Vreeland
@seanvree
Mar 29 2017 00:49
yup
Andrew Newell
@scytherswings
Mar 29 2017 00:49
kk
Sean Vreeland
@seanvree
Mar 29 2017 00:49
okay, I'll look into that
easy
yeah, so we could maybe just dispay the number of transcode/streams with that code above
that would be easy?
Andrew Newell
@scytherswings
Mar 29 2017 00:49
That code above is... not html or javascript
Sean Vreeland
@seanvree
Mar 29 2017 00:49
I know MOST eople really care about how many streams/x codes are runndine
Andrew Newell
@scytherswings
Mar 29 2017 00:50
i don't know what it is
lol
Sean Vreeland
@seanvree
Mar 29 2017 00:50
ha ha ha
yeah
hang tight
actually
shit, yeah, youre right
Andrew Newell
@scytherswings
Mar 29 2017 00:51
That being said, I don't want to rip off PlexPy
Sean Vreeland
@seanvree
Mar 29 2017 00:51
no no no
Andrew Newell
@scytherswings
Mar 29 2017 00:51
they do a very good job
Sean Vreeland
@seanvree
Mar 29 2017 00:51
not at all
very much so
we just need a simple thing to show number of xcodes and streams
that's not from plexpy
that's from another app I use on windows
Andrew Newell
@scytherswings
Mar 29 2017 00:52
do you want to just know how many transcodes are active?
Sean Vreeland
@seanvree
Mar 29 2017 00:52
yup
Andrew Newell
@scytherswings
Mar 29 2017 00:52
I can probably figure out a way to show that in the UI... Perhaps in the top right?
buut
if you have multiple plex servers
then it would need to be able to differentiate
Sean Vreeland
@seanvree
Mar 29 2017 00:52
yeah, that's true
but, I don't think MOST opople have mulitiple servers
Andrew Newell
@scytherswings
Mar 29 2017 00:53
I was considering making the "Online" button have a "Online x3" thing
but then that kind of breaks the nice look
of the even buttons
Sean Vreeland
@seanvree
Mar 29 2017 00:53
yeah, that would be dope, or they could just add multiple plex servers, right?
via the services?
Andrew Newell
@scytherswings
Mar 29 2017 00:53
I was considering making the "Online" button have a "Online x3" thing
Where "x3" is the number of streams
You can have as many services of any type as you like
it'll just make the page longer
lol
Sean Vreeland
@seanvree
Mar 29 2017 00:54
right
Andrew Newell
@scytherswings
Mar 29 2017 00:54
and all the now-playing and recently added get smashed into that carousel
Sean Vreeland
@seanvree
Mar 29 2017 00:54
so yeah, I think something in the top right or left that shows streams/xcodes
Andrew Newell
@scytherswings
Mar 29 2017 00:54
That's a good idea
let me make a ticket
Sean Vreeland
@seanvree
Mar 29 2017 00:55
hang tight, let me redo the screenshot deal
Andrew Newell
@scytherswings
Mar 29 2017 00:55
scytherswings/Plex-Board#60
scytherswings/Plex-Board#61
Sean Vreeland
@seanvree
Mar 29 2017 00:57
see, something like that
Andrew Newell
@scytherswings
Mar 29 2017 00:58
Yeah, I think it would go best in the navbar itself
Sean Vreeland
@seanvree
Mar 29 2017 00:59
for sure
Andrew Newell
@scytherswings
Mar 29 2017 00:59
but I can show something like that
Sean Vreeland
@seanvree
Mar 29 2017 00:59
you get the diea
Andrew Newell
@scytherswings
Mar 29 2017 00:59
yeppo
Sean Vreeland
@seanvree
Mar 29 2017 00:59
you can make an API call to Plexpy for that
Andrew Newell
@scytherswings
Mar 29 2017 00:59
visuals are a good tool
haha
Sean Vreeland
@seanvree
Mar 29 2017 00:59
in that code I pasted above
Andrew Newell
@scytherswings
Mar 29 2017 00:59
I actually have the data already
Sean Vreeland
@seanvree
Mar 29 2017 00:59

; About:
; Sets Plex and PlexPy variables and makes them available to skins that
; include the "plexpyvariables.ini" file.

[Variables]

; The address to access Plex
PlexAddress=localhost:32400

; The address to access PlexPy
PlexPyAddress=192.168.1.20:32500/plexpy

; Your PlexPy API key from PlexPy Settings -> Access Control
APIKey=3bea667abbdba490315a850cdc32b539

; How often you want Rainmeter to poll PlexPy and update the stream and
; transcode counts, in seconds.
RefreshRate=15

Andrew Newell
@scytherswings
Mar 29 2017 00:59
from the plex server
Sean Vreeland
@seanvree
Mar 29 2017 00:59
right
If gured you did
I didn't know if PLEX itself would show streams vs xcodes like plexpy
so the logs thing...
Andrew Newell
@scytherswings
Mar 29 2017 01:00
Yeah Plex's api is comprehensive
Sean Vreeland
@seanvree
Mar 29 2017 01:00
it's actually easy
simple PHP code
<?php
$myfilename = "mytextfile.txt";
if(file_exists($myfilename)){
echo file_get_contents($myfilename);
}
?>
so If we did a table with that
so that's basic
that will simply show the log file of that .txt file
orrrr, we can get weird and go with loggy
which is WAY more comprehensive, but required way more setup
but we could start with that
just to see how it looks
so if we did a pop out with multiple tables....and in each table that php code referencing the txt file, then boom
don't let me inslult your intellegince here
ha ha ha
if that was too simple
but these could easily be implemented by added the optional "log file location" when they add the service
a bunch of way to do it, but that's what I was thinking
Andrew Newell
@scytherswings
Mar 29 2017 01:08
sorry I was making a screenshot
i just revived
that screenshot is how it pipes rails logs into the browser
I can probably modify this gem to take arguments etc so that we can point it to different log files
as long as plex-board can access the files it can pipe them to the screen

so if we did a pop out with multiple tables....and in each table that php code referencing the txt file, then boom

Rails is not PHP, so php isn't how it can get done in this app

I would add the logfile stuff to the service creation pages
but first i'd have to get the UI built in bootstrap
Sean Vreeland
@seanvree
Mar 29 2017 01:15
yeah, I"m a pro in PHP, not so much in rails
but yeah, that should work
Andrew Newell
@scytherswings
Mar 29 2017 01:16

yeah, I"m a pro in PHP, not so much in rails

Network-Status-Page is written in PHP!

wat do
Sean Vreeland
@seanvree
Mar 29 2017 01:16
ha ha ha, i love php
Andrew Newell
@scytherswings
Mar 29 2017 01:20
Ok I'm going to clean up some things and see if I can start by adding that plex active transcode feature
Sean Vreeland
@seanvree
Mar 29 2017 01:20
yeah, i would say that's key
Andrew Newell
@scytherswings
Mar 29 2017 01:20
low-hanging fruit and such
Sean Vreeland
@seanvree
Mar 29 2017 01:20
for sure
Andrew Newell
@scytherswings
Mar 29 2017 01:20
Also
clearly
from your demo site
image caching is a shitshow
Sean Vreeland
@seanvree
Mar 29 2017 01:21
and roger
Andrew Newell
@scytherswings
Mar 29 2017 01:21
I've fought with that so much
it's a huge pain
because I don't want to forever spam plex if fetching the image goes bad
but I also want to actually get the damn image
I'll see what I can do to beef up the image caching logic too
Andrew Newell
@scytherswings
Mar 29 2017 02:56
I've got to head to bed, started adding the new stream_type field to a plex session, gotta add tests to make sure it doesn't break anything else. Once the tests pass I can start UI work