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
382 changes: 355 additions & 27 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 @@ -43,10 +43,12 @@ itertools = "0.14.0"
log = "0.4.29"
lofty = "0.23.2"
m3u = "1.0.0"
md5 = "0.7.0"
memoize = "0.6.0"
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.149"
sqlx = { version = "0.8.6", features = ["sqlite", "runtime-tokio", "macros"] }
Expand Down
12 changes: 12 additions & 0 deletions src-tauri/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ fn main() {
"default-view",
tauri_build::InlinedPlugin::new().commands(&["set"]),
)
.plugin(

"lastfm",
tauri_build::InlinedPlugin::new().commands(&[
"lastfm_get_auth_url",
"lastfm_get_session",
"lastfm_disconnect",
"lastfm_now_playing",
"lastfm_scrobble",
"lastfm_test_connection",
]),
)
.plugin(
"sleepblocker",
tauri_build::InlinedPlugin::new().commands(&["enable", "disable"]),
Expand Down
6 changes: 6 additions & 0 deletions src-tauri/capabilities/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
"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",
"lastfm:allow-lastfm-test-connection",
"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 @@ -75,6 +75,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 @@ -76,6 +76,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 Down Expand Up @@ -106,6 +109,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