Fixed Discord IPC pipe path for Unix

This commit is contained in:
Phin 2023-11-05 10:58:41 +05:30
parent 2d2bbbc55f
commit ca7b986ef3
2 changed files with 2 additions and 2 deletions

View file

@ -2,7 +2,7 @@ import os
import sys import sys
name = "Discord Rich Presence for Plex" name = "Discord Rich Presence for Plex"
version = "2.4.0" version = "2.4.1"
plexClientID = "discord-rich-presence-plex" plexClientID = "discord-rich-presence-plex"
discordClientID = "413407336082833418" discordClientID = "413407336082833418"

View file

@ -11,7 +11,7 @@ import time
class DiscordIpcService: class DiscordIpcService:
def __init__(self): def __init__(self):
self.ipcPipe = ("/run/app" if os.path.isdir("/run/app") else os.environ.get("XDG_RUNTIME_DIR", os.environ.get("TMPDIR", os.environ.get("TMP", os.environ.get("TEMP", "/tmp"))))) if isUnix else r"\\?\pipe\discord-ipc-0" self.ipcPipe = (("/run/app" if os.path.isdir("/run/app") else os.environ.get("XDG_RUNTIME_DIR", os.environ.get("TMPDIR", os.environ.get("TMP", os.environ.get("TEMP", "/tmp"))))) + "/discord-ipc-0") if isUnix else r"\\?\pipe\discord-ipc-0"
self.loop: asyncio.AbstractEventLoop = None # pyright: ignore[reportGeneralTypeIssues] self.loop: asyncio.AbstractEventLoop = None # pyright: ignore[reportGeneralTypeIssues]
self.pipeReader: asyncio.StreamReader = None # pyright: ignore[reportGeneralTypeIssues] self.pipeReader: asyncio.StreamReader = None # pyright: ignore[reportGeneralTypeIssues]
self.pipeWriter: asyncio.StreamWriter = None # pyright: ignore[reportGeneralTypeIssues] self.pipeWriter: asyncio.StreamWriter = None # pyright: ignore[reportGeneralTypeIssues]