Removed elapsed time
This commit is contained in:
parent
629a8e8c37
commit
fc904d1bca
@ -1,6 +1,6 @@
|
|||||||
use chrono::{Duration, Local, Utc};
|
use chrono::{Duration, Local};
|
||||||
use discord_rich_presence::{
|
use discord_rich_presence::{
|
||||||
activity::{Activity, Assets, Button, Timestamps},
|
activity::{Activity, Assets, Button},
|
||||||
DiscordIpc, DiscordIpcClient,
|
DiscordIpc, DiscordIpcClient,
|
||||||
};
|
};
|
||||||
use std::{
|
use std::{
|
||||||
@ -35,7 +35,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
|
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
let user_url = format!("https://www.last.fm/user/{}", lfm_username);
|
let user_url = format!("https://www.last.fm/user/{}", lfm_username);
|
||||||
let started_at = Utc::now();
|
|
||||||
loop {
|
loop {
|
||||||
match recv_stop.try_recv() {
|
match recv_stop.try_recv() {
|
||||||
Err(oneshot::error::TryRecvError::Empty) => {
|
Err(oneshot::error::TryRecvError::Empty) => {
|
||||||
@ -66,7 +65,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
)
|
)
|
||||||
.details(details.as_str())
|
.details(details.as_str())
|
||||||
.state(state.as_str())
|
.state(state.as_str())
|
||||||
.timestamps(Timestamps::new().start(started_at.timestamp()))
|
|
||||||
.buttons(vec![Button::new("Profile", &user_url)]);
|
.buttons(vec![Button::new("Profile", &user_url)]);
|
||||||
|
|
||||||
let mut ipc_client = _ipc_client2.lock().unwrap();
|
let mut ipc_client = _ipc_client2.lock().unwrap();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user