test
This commit is contained in:
parent
4d3de78d08
commit
8dc8f3c482
@ -34,20 +34,20 @@ class plex_info():
|
|||||||
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')
|
||||||
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()
|
||||||
token_proc.communicate()
|
#token_proc.communicate()
|
||||||
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
|
return token_script
|
||||||
|
|
||||||
@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