Skip to content

Commit

Permalink
Merge pull request #170 from JakeStanger/feat/listening-activity
Browse files Browse the repository at this point in the history
Change activity type to 'listening to' instead of 'playing'
  • Loading branch information
JakeStanger authored Nov 16, 2024
2 parents 66a2e62 + fdfa3dd commit d4f2a60
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ readme = "README.md"
keywords = ["mpd", "discord", "rpc", "music", "mopidy"]

[dependencies]
discord-presence = "1.3.1"
discord-presence = {version = "1.3.1", features = ["activity_type"]}
mpd_client = "1.4.1"
dirs = "5.0.1"
toml = "0.8.19"
Expand Down
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::time::Duration;

use discord_presence::models::ActivityType;
use discord_presence::models::EventData;
use discord_presence::{Client as DiscordClient, DiscordError};
use mpd_client::client::ConnectionEvent::SubsystemChange;
Expand Down Expand Up @@ -186,6 +187,7 @@ impl<'a> Service<'a> {

let res = self.drpc.set_activity(|act| {
act.state(state)
._type(ActivityType::Listening)
.details(details)
.assets(|mut assets| {
match url {
Expand Down

0 comments on commit d4f2a60

Please sign in to comment.