From 767d88f3f22c34523ef143954b8ab6b8eb286f9c Mon Sep 17 00:00:00 2001 From: Bruno Henrique Paiva Date: Wed, 18 Dec 2024 10:34:44 -0300 Subject: [PATCH 1/2] Use Listening activity type in Discord RPC --- src/tauon/t_modules/t_main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tauon/t_modules/t_main.py b/src/tauon/t_modules/t_main.py index 5393e061d..c811b5c54 100644 --- a/src/tauon/t_modules/t_main.py +++ b/src/tauon/t_modules/t_main.py @@ -380,7 +380,7 @@ # logging.exception("Unable to import rpc, Discord Rich Presence will be disabled.") discord_allow = False try: - from pypresence import Presence + from pypresence import Presence, ActivityType except ModuleNotFoundError: logging.warning("Unable to import pypresence, Discord Rich Presence will be disabled.") except Exception: @@ -23860,6 +23860,7 @@ def discord_loop() -> None: large_image = url small_image = "tauon-standard" RPC.update( + activity_type = ActivityType.LISTENING, pid=pid, state=album, details=title, @@ -23870,6 +23871,7 @@ def discord_loop() -> None: else: #logging.info("Discord RPC - Stop") RPC.update( + activity_type = ActivityType.LISTENING, pid=pid, state="Idle", large_image="tauon-standard") From 23e136ab6d9acb1ba9f36cfcce4e2a9dd7c81496 Mon Sep 17 00:00:00 2001 From: Bruno Henrique Paiva Date: Fri, 3 Jan 2025 21:24:18 -0300 Subject: [PATCH 2/2] Add pypresence version constraint --- extra/requirements_optional.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/requirements_optional.txt b/extra/requirements_optional.txt index afdb6e6af..283101cca 100644 --- a/extra/requirements_optional.txt +++ b/extra/requirements_optional.txt @@ -8,7 +8,7 @@ opencc-python-reimplemented; sys_platform == 'win32' plexapi PyChromecast #python-magic # WIP -pypresence +pypresence>=4.4.0 setproctitle tekore tidalapi diff --git a/requirements.txt b/requirements.txt index bde48cca3..e43ba2751 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,7 @@ keyboard; sys_platform == 'win32' lynxtray; sys_platform == 'win32' opencc; sys_platform != 'win32' # optional opencc-python-reimplemented; sys_platform == 'win32' # optional -pypresence # optional +pypresence>=4.4.0 # optional tekore # optional natsort # optional PyChromecast # optional