mirror of
https://github.com/KevinMidboe/Node-Com-Handler.git
synced 2025-10-29 09:40:27 +00:00
Last changes on the sys call
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MediaContainer size="2">
|
||||
<Video addedAt="1485629236" art="/library/metadata/13191/art/1485629242" chapterSource="" contentRating="TV-PG" duration="3757632" grandparentArt="/library/metadata/13191/art/1485629242" grandparentKey="/library/metadata/13191" grandparentRatingKey="13191" grandparentTheme="/library/metadata/13191/theme/1485629242" grandparentThumb="/library/metadata/13191/thumb/1485629242" grandparentTitle="The Grand Tour (2016)" guid="com.plexapp.agents.thetvdb://314087/1/12?lang=en" index="12" key="/library/metadata/20737" librarySectionID="2" originallyAvailableAt="2017-01-27" parentIndex="1" parentKey="/library/metadata/13192" parentRatingKey="13192" parentThumb="/library/metadata/13192/thumb/1485629242" rating="10.0" ratingKey="20737" sessionKey="33" summary="The Grand Tour tent is once again in Loch Ness, Scotland after a monster discovery since the last show. This week, the hosts tour central Europe in a Jaguar F-Pace, a Bentley Bentayga and a Range Rover Autobiography, arguing over which is the best SUV and trying not to giggle at road signs. Also in this show, Jeremy kills preconceptions as he laps the Eboladrome in a Lexus GS F, the hosts examine the point of launch control, and Hollywood legend Tim Burton is invited to play Celebrity Brain Crash." thumb="/library/metadata/20737/thumb/1485629242" title="[censored] to [censored]" titleSort="censored] to [censored]" type="episode" updatedAt="1485629242" viewOffset="1640349" year="2017">
|
||||
<Media aspectRatio="1.78" audioChannels="6" audioCodec="eac3" bitrate="15757" container="mkv" duration="3757632" height="1080" id="49229" videoCodec="h264" videoFrameRate="24p" videoProfile="high" videoResolution="1080" width="1920">
|
||||
<Part container="mkv" duration="3757632" file="/media/hdd1/tv/The.Grand.Tour.S01E12.1080p.WEBRip.X264-DEFLATE[rarbg]/The.Grand.Tour.S01E12.1080p.WEBRip.X264-DEFLATE.mkv" id="49659" key="/library/parts/49659/1485629228/file.mkv" size="7401093018" videoProfile="high">
|
||||
<Stream bitDepth="8" bitrate="14803" cabac="1" chromaSubsampling="4:2:0" codec="h264" codecID="V_MPEG4/ISO/AVC" default="1" duration="3757633" frameRate="23.976" frameRateMode="cfr" hasScalingMatrix="0" height="1080" id="105504" index="0" language="English" languageCode="eng" level="41" pixelFormat="yuv420p" profile="high" refFrames="4" scanType="progressive" streamType="1" width="1920" />
|
||||
<Stream audioChannelLayout="5.1(side)" bitrate="640" bitrateMode="cbr" channels="6" codec="eac3" codecID="A_EAC3" default="1" dialogNorm="-31" duration="3757632" id="105505" index="1" language="English" languageCode="eng" samplingRate="48000" selected="1" streamType="2" />
|
||||
<Stream codec="srt" codecID="S_TEXT/UTF8" format="srt" id="105506" index="2" language="English" languageCode="eng" selected="1" streamType="3" title="English" />
|
||||
<Stream codec="srt" codecID="S_TEXT/UTF8" format="srt" id="105507" index="3" language="English" languageCode="eng" streamType="3" title="English (SDH)" />
|
||||
</Part>
|
||||
</Media>
|
||||
<Director id="29756" tag="Phil Churchward,Brian Klein, Kit Lynch Robinson" />
|
||||
<User id="6461849" title="majelg" />
|
||||
<Player address="::ffff:10.0.0.67" device="Windows" machineIdentifier="ecafd4d5-4ba0-4267-aee9-7df88b9b66d7" model="" platform="Chrome" platformVersion="55.0" product="Plex Web" profile="Web" state="playing" title="Plex Web (Chrome)" vendor="" version="2.12.9" />
|
||||
<TranscodeSession key="mz6tud6nqyl2ppmbkvtdcmcx" throttled="0" complete="0" progress="45.5" speed="1.1000000238418579" duration="3757000" remaining="2333" context="streaming" videoDecision="transcode" audioDecision="transcode" subtitleDecision="burn" protocol="http" container="mkv" videoCodec="h264" audioCodec="aac" audioChannels="6" width="1920" height="1080" />
|
||||
</Video>
|
||||
<Video addedAt="1484494896" art="/library/metadata/17918/art/1484704929" audienceRating="7.3" audienceRatingImage="rottentomatoes://image.rating.upright" chapterSource="media" contentRating="R" duration="5525153" guid="com.plexapp.agents.imdb://tt4972062?lang=en" key="/library/metadata/17918" lastViewedAt="1485640784" librarySectionID="1" originallyAvailableAt="2016-07-22" primaryExtraKey="/library/metadata/18091" rating="9.9" ratingImage="rottentomatoes://image.rating.certified" ratingKey="17918" sessionKey="34" studio="Cold Iron Pictures" summary="An improv group deals with several crises, including the loss of their lease and one member hitting the big time." tagline="The spotlight's not for everyone." thumb="/library/metadata/17918/thumb/1484704929" title="Don't Think Twice" type="movie" updatedAt="1484704929" viewOffset="2397831" year="2016">
|
||||
<Media aspectRatio="1.78" audioChannels="6" audioCodec="dca-ma" audioProfile="ma" bitrate="13194" container="mkv" duration="5525153" height="1080" id="42444" videoCodec="h264" videoFrameRate="24p" videoProfile="high" videoResolution="1080" width="1920">
|
||||
<Part audioProfile="ma" container="mkv" deepAnalysisVersion="1" duration="5525153" file="/media/hdd1/movies/Dont Think Twice (2016)/Dont.Think.Twice.2016.BluRay.1080p.x264.DTS-HD.MA.5.1.mkv" id="42865" key="/library/parts/42865/1484494888/file.mkv" requiredBandwidths="17805,17069,15647,14554,14137,13972,13972,13972" size="9112666768" videoProfile="high">
|
||||
<Stream bitDepth="8" bitrate="11658" cabac="1" chromaSubsampling="4:2:0" codec="h264" codecID="V_MPEG4/ISO/AVC" default="1" duration="5525150" frameRate="23.976" frameRateMode="cfr" hasScalingMatrix="0" height="1080" id="91632" index="0" language="English" languageCode="eng" level="41" pixelFormat="yuv420p" profile="high" refFrames="4" scanType="progressive" streamType="1" title="Dont.Think.Twice.2016.BluRay.1080p.x264.DTS-HD.MA.5.1-LTT" width="1920" />
|
||||
<Stream audioChannelLayout="5.1(side)" bitDepth="24" bitrate="1536" bitrateMode="vbr" channels="6" codec="dca" codecID="A_DTS" default="1" duration="5525153" id="91633" index="1" language="English" languageCode="eng" profile="ma" samplingRate="48000" selected="1" streamType="2" title="DTS.HD.MA.5.1" />
|
||||
<Stream codec="pgs" codecID="S_HDMV/PGS" format="pgs" id="91634" index="2" language="English" languageCode="eng" selected="1" streamType="3" title="Eng-PGS-SDH" />
|
||||
<Stream codec="srt" codecID="S_TEXT/UTF8" format="srt" id="91635" index="3" language="English" languageCode="eng" streamType="3" title="Eng.SRT-SDH" />
|
||||
<Stream codec="srt" codecID="S_TEXT/UTF8" format="srt" id="91636" index="4" language="English" languageCode="eng" streamType="3" title="Eng.SRT" />
|
||||
<Stream codec="pgs" codecID="S_HDMV/PGS" format="pgs" id="91637" index="5" language="Español" languageCode="spa" streamType="3" title="Spa-PGS" />
|
||||
<Stream codec="pgs" codecID="S_HDMV/PGS" format="pgs" id="91638" index="6" language="Français" languageCode="fre" streamType="3" title="Fre-PGS" />
|
||||
</Part>
|
||||
</Media>
|
||||
<Genre count="261" id="10" tag="Drama" />
|
||||
<Genre count="204" id="126" tag="Comedy" />
|
||||
<Director id="29547" tag="Mike Birbiglia" />
|
||||
<Writer id="29548" tag="Mike Birbiglia" />
|
||||
<Producer id="29563" tag="Ira Glass" />
|
||||
<Producer id="29564" tag="Amanda Marshall" />
|
||||
<Producer count="3" id="26257" tag="Miranda Bailey" />
|
||||
<Country count="618" id="17" tag="USA" />
|
||||
<Role count="5" id="1660" role="Jack" tag="Keegan-Michael Key" thumb="http://image.tmdb.org/t/p/original/gqPRozx8ppAg2TSjW3ww56LnIZr.jpg" />
|
||||
<Role id="29549" role="Samantha" tag="Gillian Jacobs" thumb="http://image.tmdb.org/t/p/original/rBnhe5vhNPnhRUdtYahBWx90fJM.jpg" />
|
||||
<Role count="2" id="9120" role="Miles" tag="Mike Birbiglia" thumb="http://image.tmdb.org/t/p/original/gLwimMh2rG6hfFx8LUI7InyjoLA.jpg" />
|
||||
<Role id="29550" role="Allison" tag="Kate Micucci" thumb="http://image.tmdb.org/t/p/original/qoUOtNflMZb9l1zgg9aeMiu1MF7.jpg" />
|
||||
<Role count="2" id="13597" role="Bill" tag="Chris Gethard" thumb="http://image.tmdb.org/t/p/original/3xIiXWjUTmmsD3A9c4KZklXbBrq.jpg" />
|
||||
<Role id="29551" role="Lindsay" tag="Tami Sagher" thumb="http://image.tmdb.org/t/p/original/80VIS2Cyonu7Q4TgsoutgO9SsHJ.jpg" />
|
||||
<Role id="29552" role="Liz" tag="Maggie Kemper" />
|
||||
<Role id="29553" role="Timothy" tag="Seth Barrish" thumb="http://image.tmdb.org/t/p/original/1GArHoOwEvvwY6wLGFWSTdJmCtN.jpg" />
|
||||
<Role id="29554" role="Natasha" tag="Erin Darke" thumb="http://image.tmdb.org/t/p/original/s01fpaZ27cwxxnXV2XIfgShXslL.jpg" />
|
||||
<Role count="2" id="387" role="Bouncer" tag="Brian Edwards" />
|
||||
<Role id="29555" role="Improv Intern" tag="Elise Edwards" />
|
||||
<Role id="29556" role="Subway Bucket Drummer" tag="DeWitt Fleming Jr." />
|
||||
<Role id="29557" role="Bonnie" tag="Sondra James" thumb="http://image.tmdb.org/t/p/original/4ZJkBxkwM1Ub6UQ5LFSvzGDFBdX.jpg" />
|
||||
<Role id="29558" role="Guy Looking for Apartment" tag="Brandon Scott Jones" />
|
||||
<Role id="29559" role="Audience Member 3" tag="Jordan Kenneth Kamp" />
|
||||
<Role id="29560" role="Herself" tag="Lena Dunham" thumb="http://image.tmdb.org/t/p/original/mz9Fz5OxH2CtuM0NOm6v0xxAlrl.jpg" />
|
||||
<Role count="7" id="1859" role="Himself" tag="Ben Stiller" thumb="http://image.tmdb.org/t/p/original/umikKeCX3vEZoUcx2klxPG8571s.jpg" />
|
||||
<Role id="29561" role="Himself" tag="Pete Holmes" thumb="http://image.tmdb.org/t/p/original/pdbfJcxTcv4eJzEnNE9Qs3DFNFH.jpg" />
|
||||
<Role id="29562" role="Robert" tag="Adam Pally" thumb="http://image.tmdb.org/t/p/original/3BOKAOQRNY9UcZ6M3nQQsbPKbA1.jpg" />
|
||||
<User id="1" thumb="https://plex.tv/users/d249503d948004d7/avatar" title="KevinMidboe" />
|
||||
<Player address="::ffff:10.0.0.39" device="Chromecast" machineIdentifier="z00y479qot8bpc7p246nd0a4" model="" platform="Chromecast" platformVersion="2.0.0" product="Plex Chromecast" profile="Chromecast" state="playing" title="Chromecast" vendor="" version="2.12.2" />
|
||||
<TranscodeSession key="3h1srvim5v9o05hii1bkbxd2" throttled="0" complete="0" progress="46.200000762939453" speed="0.80000001192092896" duration="5525000" remaining="3099" context="streaming" videoDecision="transcode" audioDecision="transcode" subtitleDecision="burn" protocol="http" container="mkv" videoCodec="h264" audioCodec="aac" audioChannels="6" width="1920" height="1080" />
|
||||
</Video>
|
||||
</MediaContainer>
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
# @Last Modified by: KevinMidboe
|
||||
# @Last Modified time: 2017-01-28 23:28:49
|
||||
|
||||
from os import system
|
||||
from os import system, popen
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
def plex_watching():
|
||||
# Every call saves the info of session.xml to a file named plexPlaying
|
||||
system('curl --silent 10.0.0.41:32400/status/sessions > /plexPy/plexPlaying.xml')
|
||||
system('curl --silent 10.0.0.41:32400/status/sessions > plexPy/plexPlaying.xml')
|
||||
|
||||
# XML parsing, creates a tree and saves the root node as root
|
||||
tree = ET.parse('plexPy/plexPlaying.xml')
|
||||
@@ -21,7 +21,7 @@ def plex_watching():
|
||||
if (root.get('size') != '0'):
|
||||
|
||||
# Get load of CPU and I/O
|
||||
return_text = '\n\t' + str(os.popen('cat /proc/loadavg').read())
|
||||
return_text = '\n\t' + str(popen('cat /proc/loadavg').read())
|
||||
return_text += '\tCur: \t' + str(root.get('size')) + '\n'
|
||||
|
||||
# Goes through all the 'video' elements in MediaContainer
|
||||
@@ -52,4 +52,4 @@ def plex_watching():
|
||||
return 'Null playing'
|
||||
|
||||
if __name__ == '__main__':
|
||||
plex_watching()
|
||||
plex_watching()
|
||||
|
||||
Reference in New Issue
Block a user