mirror of
https://github.com/socatlolmeow/drift.git
synced 2026-11-04 03:37:18 +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::thread;
|
||||||
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
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 discord_rich_presence::{DiscordIpc, DiscordIpcClient};
|
||||||
|
|
||||||
use crate::app::PlayState;
|
use crate::app::PlayState;
|
||||||
|
|
@ -158,6 +160,7 @@ fn send(client: &mut DiscordIpcClient, msg: &Msg) -> bool {
|
||||||
};
|
};
|
||||||
let mut activity = Activity::new()
|
let mut activity = Activity::new()
|
||||||
.activity_type(ActivityType::Listening)
|
.activity_type(ActivityType::Listening)
|
||||||
|
.status_display_type(StatusDisplayType::Details)
|
||||||
.details(&p.title)
|
.details(&p.title)
|
||||||
.state(&artist)
|
.state(&artist)
|
||||||
.assets(assets)
|
.assets(assets)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue