This commit is contained in:
deathbybandaid 2024-02-21 10:08:56 -05:00
parent 4d3de78d08
commit 8dc8f3c482

View File

@ -34,20 +34,20 @@ class plex_info():
def token(self):
token_script = pathlib.Path(SCRIPT_DIR).joinpath('plex-token.sh')
token_proc = subprocess.Popen(['/bin/bash', token_script], stdout=subprocess.PIPE)
token = token_proc.stdout.read().decode().strip("\n")
token_proc.terminate()
token_proc.communicate()
token_proc.kill()
#token = token_proc.stdout.read().decode().strip("\n")
#token_proc.terminate()
#token_proc.communicate()
#token_proc.kill()
# token = subprocess.run(['/bin/bash', token_script], capture_output=True, text=True).stdout
return token
return token_script
@property
def url(self):
return '%s%s:%s' % (self.proto, self.address, str(self.port))
print(plex_info.token())
print(plex_info.token)
#sess = requests.Session()
#sess.verify = False