Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Listening activity type in Discord RPC #1350

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extra/requirements_optional.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ opencc-python-reimplemented; sys_platform == 'win32'
plexapi
PyChromecast
#python-magic # WIP
pypresence
pypresence>=4.4.0
setproctitle
tekore
tidalapi
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/tauon/t_modules/t_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand All @@ -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")
Expand Down