add mac patch
This commit is contained in:
23
patches/pypresence_macfix.patch
Normal file
23
patches/pypresence_macfix.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
--- utils.py.orig 2025-12-09 20:28:26
|
||||
+++ utils.py 2025-12-09 20:31:08
|
||||
@@ -5,6 +5,7 @@
|
||||
import sys
|
||||
import tempfile
|
||||
import socket
|
||||
+import subprocess
|
||||
|
||||
|
||||
def remove_none(d: dict):
|
||||
@@ -32,6 +33,12 @@
|
||||
|
||||
# Returns on first IPC pipe matching Discord's
|
||||
def get_ipc_path(pipe=None):
|
||||
+ # TODO: Temporary MacOS fix for Discord not using standard paths
|
||||
+ shell_command = 'find /private/var/folders -name "*discord-ipc*" 2> /dev/null'
|
||||
+ proc = subprocess.Popen(shell_command, shell=True, stdout=subprocess.PIPE)
|
||||
+ out = proc.communicate()[0]
|
||||
+ return out.decode('utf-8').strip()
|
||||
+
|
||||
ipc = "discord-ipc-"
|
||||
if pipe is not None:
|
||||
ipc = f"{ipc}{pipe}"
|
||||
Reference in New Issue
Block a user