Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
305 changes: 299 additions & 6 deletions src-tauri/Cargo.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ itertools = "0.14.0"
log = "0.4.28"
lofty = "0.22.4"
m3u = "1.0.0"
md5 = "0.7.0"
memoize = "0.5.1"
nosleep = "0.2.1"
pathdiff = "0.2.3"
rayon = "1.11.0"
reqwest = { version = "0.12.15", features = ["json"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.145"
sqlx = { version = "0.8.6", features = ["sqlite", "runtime-tokio", "macros"] }
Expand Down
14 changes: 14 additions & 0 deletions src-tauri/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@ fn main() {
"default-view",
tauri_build::InlinedPlugin::new().commands(&["set"]),
)
.plugin(
"default-view",
tauri_build::InlinedPlugin::new().commands(&["set"]),
)
.plugin(
Comment on lines +47 to +50
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate plugin registration for "default-view". This plugin is already registered at lines 42-45. Remove this duplicate entry.

Suggested change
"default-view",
tauri_build::InlinedPlugin::new().commands(&["set"]),
)
.plugin(

Copilot uses AI. Check for mistakes.
"lastfm",
tauri_build::InlinedPlugin::new().commands(&[
"lastfm_get_auth_url",
"lastfm_get_session",
"lastfm_disconnect",
"lastfm_now_playing",
"lastfm_scrobble",
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lastfm_test_connection command is defined in the plugin handler (lastfm.rs line 213) but not registered here. Add "lastfm_test_connection" to this commands list. Similarly, update src-tauri/capabilities/main.json to include "lastfm:allow-lastfm-test-connection" permission.

Suggested change
"lastfm_scrobble",
"lastfm_scrobble",
"lastfm_test_connection",

Copilot uses AI. Check for mistakes.
]),
)
.plugin(
"sleepblocker",
tauri_build::InlinedPlugin::new().commands(&["enable", "disable"]),
Expand Down
5 changes: 5 additions & 0 deletions src-tauri/capabilities/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
"database:allow-delete-playlist",
"database:allow-reset",
"default-view:allow-set",
"lastfm:allow-lastfm-get-auth-url",
"lastfm:allow-lastfm-get-session",
"lastfm:allow-lastfm-disconnect",
"lastfm:allow-lastfm-now-playing",
"lastfm:allow-lastfm-scrobble",
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lastfm_test_connection command exists in the backend (src-tauri/src/plugins/lastfm.rs line 213) and is exported in the bridge (src/lib/bridge-lastfm.ts line 53), but the permission is missing here. Add "lastfm:allow-lastfm-test-connection" to allow this command to be invoked from the frontend.

Suggested change
"lastfm:allow-lastfm-scrobble",
"lastfm:allow-lastfm-scrobble",
"lastfm:allow-lastfm-test-connection",

Copilot uses AI. Check for mistakes.
"sleepblocker:allow-enable",
"sleepblocker:allow-disable"
],
Expand Down
3 changes: 3 additions & 0 deletions src-tauri/src/libs/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ pub enum MuseeksError {

#[error("Failed to find ID3 tags for path: {0}")]
ID3NoTags(PathBuf),

#[error("Last.fm error: {0}")]
LastFm(String),
}

/**
Expand Down
1 change: 1 addition & 0 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ fn main() {
.plugin(plugins::debug::init())
.plugin(plugins::default_view::init())
.plugin(plugins::file_associations::init())
.plugin(plugins::lastfm::init())
.plugin(plugins::sleepblocker::init())
// Tauri integrations with the Operating System
.plugin(tauri_plugin_clipboard_manager::init())
Expand Down
6 changes: 6 additions & 0 deletions src-tauri/src/plugins/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ pub struct Config {
pub notifications: bool,
pub track_view_density: TrackViewDensity,
pub wayland_compat: bool,
pub lastfm_enabled: bool,
pub lastfm_session_key: Option<String>,
pub lastfm_username: Option<String>,
}

pub const SYSTEM_THEME: &str = "__system";
Expand All @@ -100,6 +103,9 @@ impl Config {
notifications: false,
track_view_density: TrackViewDensity::Normal,
wayland_compat: false,
lastfm_enabled: false,
lastfm_session_key: None,
lastfm_username: None,
}
}
}
Expand Down
Loading
Loading