Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

use query string parser

+18 -3
+14
Cargo.lock
··· 5024 5024 ] 5025 5025 5026 5026 [[package]] 5027 + name = "queryst" 5028 + version = "3.0.0" 5029 + source = "registry+https://github.com/rust-lang/crates.io-index" 5030 + checksum = "c1cbeb75ac695daf201ca2d66d9c684f873b135f28af4f2c79952478cab3b9d9" 5031 + dependencies = [ 5032 + "lazy_static", 5033 + "percent-encoding", 5034 + "regex", 5035 + "serde", 5036 + "serde_json", 5037 + ] 5038 + 5039 + [[package]] 5027 5040 name = "quick-error" 5028 5041 version = "1.2.3" 5029 5042 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5380 5393 version = "0.1.0" 5381 5394 dependencies = [ 5382 5395 "owo-colors 4.1.0", 5396 + "queryst", 5383 5397 "reqwest", 5384 5398 "rockbox-graphql", 5385 5399 "rockbox-rpc",
+1
crates/server/Cargo.toml
··· 8 8 9 9 [dependencies] 10 10 owo-colors = "4.0.0" 11 + queryst = "3.0.0" 11 12 reqwest = {version = "0.12.7", features = ["blocking", "rustls-tls"], default-features = false} 12 13 rockbox-graphql = {path = "../graphql"} 13 14 rockbox-rpc = {path = "../rpc"}
+3 -3
crates/server/src/lib.rs
··· 234 234 235 235 if path.starts_with("/tree_entries?") { 236 236 let params: Vec<_> = path.split('?').collect(); 237 - let params: Vec<_> = params[1].split('&').collect(); 238 - let q = params[0].split('=').collect::<Vec<_>>()[1]; 239 - rb::browse::rockbox_browse_at(q); 237 + let params = queryst::parse(params[1]).unwrap_or_default(); 238 + println!("{}", params); 239 + rb::browse::rockbox_browse_at(params["q"].as_str().unwrap_or("/")); 240 240 let mut entries = vec![]; 241 241 let context = rb::browse::tree_get_context(); 242 242