diff --git a/README.md b/README.md index de7561a..1e7e993 100644 --- a/README.md +++ b/README.md @@ -219,8 +219,8 @@ services: DRPP_UID: 1000 DRPP_GID: 1000 volumes: + - ./data:/app/data - /run/user/1000:/run/app - - ./drpp:/app/data ``` ### Containerised Discord @@ -252,8 +252,8 @@ services: image: ghcr.io/phin05/discord-rich-presence-plex:latest restart: unless-stopped volumes: - - ./kasmcord:/run/app:ro - ./drpp:/app/data + - ./kasmcord:/run/app:ro depends_on: - kasmcord ``` diff --git a/core/discord.py b/core/discord.py index 8f4a1f8..4a3f92c 100644 --- a/core/discord.py +++ b/core/discord.py @@ -30,10 +30,10 @@ async def handshake(self) -> None: for pipe in self.pipes: try: if isUnix: - self.pipeReader, self.pipeWriter = await asyncio.open_unix_connection(pipe) # pyright: ignore[reportGeneralTypeIssues,reportUnknownMemberType] + self.pipeReader, self.pipeWriter = await asyncio.open_unix_connection(pipe) # pyright: ignore[reportAttributeAccessIssue,reportUnknownMemberType] else: self.pipeReader = asyncio.StreamReader() - self.pipeWriter = (await self.loop.create_pipe_connection(lambda: asyncio.StreamReaderProtocol(self.pipeReader), pipe))[0] # pyright: ignore[reportGeneralTypeIssues,reportUnknownMemberType] + self.pipeWriter = (await self.loop.create_pipe_connection(lambda: asyncio.StreamReaderProtocol(self.pipeReader), pipe))[0] # pyright: ignore[reportAttributeAccessIssue,reportUnknownMemberType,reportArgumentType] self.write(0, { "v": 1, "client_id": discordClientID }) if await self.read(): self.connected = True diff --git a/main.py b/main.py index 05fd403..f718479 100644 --- a/main.py +++ b/main.py @@ -7,7 +7,7 @@ if not os.path.isdir(runtimeDirectory): logger.error(f"Runtime directory does not exist. Ensure that it is mounted into the container at {runtimeDirectory}") exit(1) - if os.geteuid() == 0: # pyright: ignore[reportGeneralTypeIssues,reportUnknownMemberType] + if os.geteuid() == 0: # pyright: ignore[reportAttributeAccessIssue,reportUnknownMemberType] if uid == -1 or gid == -1: logger.warning(f"Environment variable(s) DRPP_UID and/or DRPP_GID are/is not set. Manually ensure appropriate ownership of {runtimeDirectory}") statResult = os.stat(runtimeDirectory) @@ -19,8 +19,8 @@ os.system(f"chmod 700 {runtimeDirectory}") os.system(f"chown -R {uid}:{gid} {runtimeDirectory}") os.system(f"chown -R {uid}:{gid} {containerCwd}") - os.setgid(gid) # pyright: ignore[reportGeneralTypeIssues,reportUnknownMemberType] - os.setuid(uid) # pyright: ignore[reportGeneralTypeIssues,reportUnknownMemberType] + os.setgid(gid) # pyright: ignore[reportAttributeAccessIssue,reportUnknownMemberType] + os.setuid(uid) # pyright: ignore[reportAttributeAccessIssue,reportUnknownMemberType] else: logger.warning(f"Not running as the superuser. Manually ensure appropriate ownership of mounted contents") else: