tnychn / mpv-discord

🎈 A cross-platform Discord Rich Presence integration for mpv with no external dependencies.
MIT License
172 stars 14 forks source link

Key bind to toggle rich presence on/off. #10

Closed PlaylistsTrance closed 3 years ago

PlaylistsTrance commented 3 years ago

Could it be possible to have a way to enable/disable rich presence without having to change it in discord.conf each time?

PlaylistsTrance commented 3 years ago

Thanks, that was really quick. I have a suggestion though, because currently it only works if active is set to yes in the config, so it's always active by default. What I did is I removed the if statement in start(), but put the options.active check before the file-loaded event if options.active then mp.register_event("file-loaded", start) end I prefer this as now the toggle also works when active is set to no by default.

tnychn commented 3 years ago

Nice! This sounds better and I actually prefer your idea too! I will adopt your suggestion in the coming release.