mirror of
https://github.com/socatlolmeow/drift.git
synced 2026-11-03 19:27:19 +00:00
feat(discord): show song name instead of application name
This commit is contained in:
parent
27353d3358
commit
f25b96d5fd
1 changed files with 4 additions and 1 deletions
|
|
@ -2,7 +2,9 @@ use std::sync::mpsc::{self, RecvTimeoutError, Sender};
|
|||
use std::thread;
|
||||
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
||||
|
||||
use discord_rich_presence::activity::{Activity, ActivityType, Assets, Button, Timestamps};
|
||||
use discord_rich_presence::activity::{
|
||||
Activity, ActivityType, Assets, Button, StatusDisplayType, Timestamps,
|
||||
};
|
||||
use discord_rich_presence::{DiscordIpc, DiscordIpcClient};
|
||||
|
||||
use crate::app::PlayState;
|
||||
|
|
@ -158,6 +160,7 @@ fn send(client: &mut DiscordIpcClient, msg: &Msg) -> bool {
|
|||
};
|
||||
let mut activity = Activity::new()
|
||||
.activity_type(ActivityType::Listening)
|
||||
.status_display_type(StatusDisplayType::Details)
|
||||
.details(&p.title)
|
||||
.state(&artist)
|
||||
.assets(assets)
|
||||
|
|
|
|||
Loading…
Reference in a new issue