From 307a1c759bb25ad32ccc0ea075507b8f4e3c3c1a Mon Sep 17 00:00:00 2001 From: Phin <59180111+phin05@users.noreply.github.com> Date: Wed, 11 May 2022 05:46:02 +0530 Subject: [PATCH] Pipe connection fixes --- README.md | 2 +- services/DiscordRpcService.py | 6 +++--- store/constants.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e91f2bb..3661c0e 100644 --- a/README.md +++ b/README.md @@ -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", diff --git a/services/DiscordRpcService.py b/services/DiscordRpcService.py index 78ee911..8f4ec2a 100644 --- a/services/DiscordRpcService.py +++ b/services/DiscordRpcService.py @@ -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 diff --git a/store/constants.py b/store/constants.py index 2e01951..7b68236 100644 --- a/store/constants.py +++ b/store/constants.py @@ -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()