mirror of
https://github.com/phin05/discord-rich-presence-plex
synced 2025-02-17 22:28:24 +00:00
Update discordRichPresencePlex.py
This commit is contained in:
parent
0ab038f483
commit
a08013fe7f
1 changed files with 2 additions and 2 deletions
|
@ -70,7 +70,7 @@ class discordRichPresence:
|
||||||
with open(emptyProcessFilePath, "w") as emptyProcessFile:
|
with open(emptyProcessFilePath, "w") as emptyProcessFile:
|
||||||
emptyProcessFile.write("import time\n\ntry:\n\twhile (True):\n\t\ttime.sleep(3600)\nexcept:\n\tpass")
|
emptyProcessFile.write("import time\n\ntry:\n\twhile (True):\n\t\ttime.sleep(3600)\nexcept:\n\tpass")
|
||||||
self.process = subprocess.Popen(["python3" if isLinux else "pythonw", emptyProcessFilePath])
|
self.process = subprocess.Popen(["python3" if isLinux else "pythonw", emptyProcessFilePath])
|
||||||
self.loop = asyncio.get_event_loop() if isLinux else asyncio.ProactorEventLoop()
|
self.loop = asyncio.new_event_loop() if isLinux else asyncio.ProactorEventLoop()
|
||||||
self.loop.run_until_complete(self.handshake())
|
self.loop.run_until_complete(self.handshake())
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
|
@ -100,7 +100,7 @@ class discordRichPresence:
|
||||||
},
|
},
|
||||||
"nonce": "{0:.20f}".format(time.time())
|
"nonce": "{0:.20f}".format(time.time())
|
||||||
}
|
}
|
||||||
sent = self.write(1, payload)
|
self.write(1, payload)
|
||||||
self.loop.run_until_complete(self.read())
|
self.loop.run_until_complete(self.read())
|
||||||
|
|
||||||
class discordRichPresencePlex(discordRichPresence):
|
class discordRichPresencePlex(discordRichPresence):
|
||||||
|
|
Loading…
Add table
Reference in a new issue