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 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")