test
This commit is contained in:
parent
c6a7539925
commit
4d3de78d08
@ -33,7 +33,6 @@ class plex_info():
|
|||||||
@property
|
@property
|
||||||
def token(self):
|
def token(self):
|
||||||
token_script = pathlib.Path(SCRIPT_DIR).joinpath('plex-token.sh')
|
token_script = pathlib.Path(SCRIPT_DIR).joinpath('plex-token.sh')
|
||||||
print(token_script)
|
|
||||||
token_proc = subprocess.Popen(['/bin/bash', token_script], stdout=subprocess.PIPE)
|
token_proc = subprocess.Popen(['/bin/bash', token_script], stdout=subprocess.PIPE)
|
||||||
token = token_proc.stdout.read().decode().strip("\n")
|
token = token_proc.stdout.read().decode().strip("\n")
|
||||||
token_proc.terminate()
|
token_proc.terminate()
|
||||||
@ -41,14 +40,14 @@ class plex_info():
|
|||||||
token_proc.kill()
|
token_proc.kill()
|
||||||
|
|
||||||
# token = subprocess.run(['/bin/bash', token_script], capture_output=True, text=True).stdout
|
# token = subprocess.run(['/bin/bash', token_script], capture_output=True, text=True).stdout
|
||||||
return token_script
|
return token
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def url(self):
|
def url(self):
|
||||||
return '%s%s:%s' % (self.proto, self.address, str(self.port))
|
return '%s%s:%s' % (self.proto, self.address, str(self.port))
|
||||||
|
|
||||||
|
|
||||||
print(plex_info.token)
|
print(plex_info.token())
|
||||||
|
|
||||||
#sess = requests.Session()
|
#sess = requests.Session()
|
||||||
#sess.verify = False
|
#sess.verify = False
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user