diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 71c1716e..e8137671 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -1367,6 +1367,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
dependencies = [
"futures-core",
+ "futures-sink",
]
[[package]]
@@ -3442,6 +3443,7 @@ dependencies = [
"tauri-plugin-updater",
"tauri-plugin-window-state",
"tokio",
+ "url",
]
[[package]]
@@ -3737,6 +3739,7 @@ checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147"
dependencies = [
"base64 0.22.1",
"bytes",
+ "futures-channel",
"futures-core",
"futures-util",
"http",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 2349c31e..45c7bd76 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -32,7 +32,7 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"
rodio = { version = "0.19", default-features = false, features = ["symphonia-all"] }
symphonia = { version = "0.5", default-features = false, features = ["flac", "mp3", "pcm", "aac", "isomp4", "vorbis", "ogg", "wav", "adpcm"] }
-reqwest = { version = "0.12", default-features = false, features = ["stream", "json", "multipart", "rustls-tls"] }
+reqwest = { version = "0.12", default-features = false, features = ["stream", "json", "multipart", "rustls-tls", "blocking"] }
futures-util = "0.3"
md5 = "0.7"
tokio = { version = "1", features = ["rt", "time"] }
@@ -43,3 +43,4 @@ tauri-plugin-updater = "2"
tauri-plugin-process = "2"
souvlaki = { version = "0.8", default-features = false, features = ["use_zbus"] }
discord-rich-presence = "0.2"
+url = "2"
diff --git a/src-tauri/src/discord.rs b/src-tauri/src/discord.rs
index fc253319..1fef1247 100644
--- a/src-tauri/src/discord.rs
+++ b/src-tauri/src/discord.rs
@@ -1,10 +1,8 @@
/// Discord Rich Presence integration.
///
-/// To enable this feature:
-/// 1. Go to https://discord.com/developers/applications and create an application.
-/// 2. Copy the Application ID and replace DISCORD_APP_ID below.
-/// 3. In the "Rich Presence → Art Assets" tab, upload a PNG named "psysonic"
-/// (use the app icon from public/logo.png).
+/// Album artwork is fetched from the iTunes Search API and passed directly to
+/// Discord via the large_image URL field. This avoids the need to pre-upload
+/// assets to the Discord Developer Portal.
///
/// The commands silently no-op when Discord is not running or the App ID is wrong,
/// so the app always starts cleanly regardless of Discord availability.
@@ -13,15 +11,201 @@ use discord_rich_presence::{
activity::{Activity, ActivityType, Assets, Timestamps},
DiscordIpc, DiscordIpcClient,
};
-use std::sync::Mutex;
+use reqwest::blocking::Client;
+use serde::Deserialize;
+use std::collections::HashMap;
+use std::sync::{Arc, Mutex};
+use std::time::Instant;
const DISCORD_APP_ID: &str = "1489544859718258779";
-pub struct DiscordState(pub Mutex