mirror of
https://github.com/phin05/discord-rich-presence-plex
synced 2024-11-22 01:23:02 +00:00
Pipe connection fixes
This commit is contained in:
parent
8a29fb5aff
commit
307a1c759b
3 changed files with 5 additions and 5 deletions
|
@ -45,7 +45,7 @@ The script must be running on the same machine as your Discord client.
|
|||
"token": "HPbrz2NhfLRjU888Rrdt",
|
||||
"servers": [
|
||||
{
|
||||
"name": "Bob's Home Media Server",
|
||||
"name": "Bob's Home Media Server"
|
||||
},
|
||||
{
|
||||
"name": "A Friend's Server",
|
||||
|
|
|
@ -30,10 +30,10 @@ class DiscordRpcService:
|
|||
async def handshake(self):
|
||||
try:
|
||||
if isUnix:
|
||||
self.pipeReader, self.pipeWriter = await asyncio.open_unix_connection(self.ipcPipe, loop = self.loop)
|
||||
self.pipeReader, self.pipeWriter = await asyncio.open_unix_connection(self.ipcPipe)
|
||||
else:
|
||||
self.pipeReader = asyncio.StreamReader(loop = self.loop)
|
||||
self.pipeWriter, _ = await self.loop.create_pipe_connection(lambda: asyncio.StreamReaderProtocol(self.pipeReader, loop = self.loop), self.ipcPipe)
|
||||
self.pipeReader = asyncio.StreamReader()
|
||||
self.pipeWriter, _ = await self.loop.create_pipe_connection(lambda: asyncio.StreamReaderProtocol(self.pipeReader), self.ipcPipe)
|
||||
self.write(0, { "v": 1, "client_id": self.clientID })
|
||||
if await self.read():
|
||||
self.connected = True
|
||||
|
|
|
@ -2,7 +2,7 @@ import sys
|
|||
import os
|
||||
|
||||
name = "Discord Rich Presence for Plex"
|
||||
version = "2.0.0"
|
||||
version = "2.0.1"
|
||||
plexClientID = "discord-rich-presence-plex"
|
||||
isUnix = sys.platform in ["linux", "darwin"]
|
||||
processID = os.getpid()
|
||||
|
|
Loading…
Reference in a new issue