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.

Merge pull request #156 from tsirysndr/feat/select-output-devices

Add device picker UI and Squeezelite client support

authored by

Tsiry Sandratraina and committed by
GitHub
217440b2 8cbc0dbe

+2633 -2719
+1
Cargo.lock
··· 9402 9402 "rockbox-rocksky", 9403 9403 "rockbox-rpc", 9404 9404 "rockbox-settings", 9405 + "rockbox-slim", 9405 9406 "rockbox-sys", 9406 9407 "rockbox-tracklist", 9407 9408 "rockbox-traits",
+45 -17
crates/chromecast/src/lib.rs
··· 66 66 player.port.unwrap(), 67 67 ) { 68 68 Ok(cast_device) => cast_device, 69 - Err(err) => panic!("Could not establish connection with Cast Device: {:?}", err), 69 + Err(err) => { 70 + return Err(anyhow::anyhow!( 71 + "Could not establish connection with Cast Device: {:?}", 72 + err 73 + )) 74 + } 70 75 }; 71 76 72 77 cast_device ··· 107 112 self.port.unwrap(), 108 113 ) { 109 114 Ok(cast_device) => cast_device, 110 - Err(err) => panic!("Could not establish connection with Cast Device: {:?}", err), 115 + Err(err) => { 116 + return Err(anyhow::anyhow!( 117 + "Could not establish connection with Cast Device: {:?}", 118 + err 119 + )) 120 + } 111 121 }; 112 122 113 123 cast_device ··· 269 279 Some(start_index.unwrap_or(0)), 270 280 None, 271 281 )?; 272 - println!("[chromecast] Tracks loaded"); 273 - println!("[chromecast] Playing track {:#?}", media[0]); 282 + tracing::info!("chromecast: tracks loaded, first={:?}", media[0].content_id); 274 283 return Ok(()); 275 284 } 276 285 ··· 374 383 thread::spawn(move || { 375 384 let cast_device = match CastDevice::connect_without_host_verification(host, port) { 376 385 Ok(cast_device) => cast_device, 377 - Err(err) => panic!("Could not establish connection with Cast Device: {:?}", err), 386 + Err(err) => { 387 + tracing::warn!("CastPlayer: could not connect to Cast Device: {:?}", err); 388 + return; 389 + } 378 390 }; 379 391 380 392 cast_device ··· 552 564 }); 553 565 } 554 566 555 - fn current_app_session(&self) -> Result<(String, i32, String), Error> { 567 + fn current_app_session(&self) -> Result<Option<(String, i32, String)>, Error> { 556 568 let app_to_manage = CastDeviceApp::from_str(DEFAULT_APP_ID).unwrap(); 557 569 self.cast_device 558 570 .connection ··· 578 590 .get_status(app.transport_id.as_str(), None)?; 579 591 580 592 if status.entries.is_empty() { 581 - return Err(Error::msg("No media session running")); 593 + return Ok(None); 582 594 } 583 595 584 596 let status = status.entries.first().unwrap(); 585 597 let media_session_id = status.media_session_id; 586 598 let transport_id = app.transport_id.as_str(); 587 - Ok((transport_id.to_string(), media_session_id, "".to_string())) 599 + Ok(Some(( 600 + transport_id.to_string(), 601 + media_session_id, 602 + "".to_string(), 603 + ))) 588 604 } 589 - None => Err(Error::msg(format!("{:?} is not running", app_to_manage))), 605 + None => Ok(None), 590 606 } 591 607 } 592 608 593 609 fn handle_play(&self) -> Result<(), Error> { 594 - let (transport_id, media_session_id, _) = self.current_app_session()?; 610 + let Some((transport_id, media_session_id, _)) = self.current_app_session()? else { 611 + return Ok(()); 612 + }; 595 613 self.cast_device 596 614 .media 597 615 .play(transport_id.as_str(), media_session_id)?; ··· 599 617 } 600 618 601 619 fn handle_pause(&self) -> Result<(), Error> { 602 - let (transport_id, media_session_id, _) = self.current_app_session()?; 620 + let Some((transport_id, media_session_id, _)) = self.current_app_session()? else { 621 + return Ok(()); 622 + }; 603 623 self.cast_device 604 624 .media 605 625 .pause(transport_id.as_str(), media_session_id)?; ··· 607 627 } 608 628 609 629 fn handle_stop(&self) -> Result<(), Error> { 610 - let (transport_id, media_session_id, _) = self.current_app_session()?; 630 + let Some((transport_id, media_session_id, _)) = self.current_app_session()? else { 631 + return Ok(()); 632 + }; 611 633 self.cast_device 612 634 .media 613 635 .stop(transport_id.as_str(), media_session_id)?; ··· 615 637 } 616 638 617 639 fn handle_next(&self) -> Result<(), Error> { 618 - let (transport_id, media_session_id, _) = self.current_app_session()?; 640 + let Some((transport_id, media_session_id, _)) = self.current_app_session()? else { 641 + return Ok(()); 642 + }; 619 643 self.cast_device 620 644 .media 621 645 .next(transport_id.as_str(), media_session_id)?; ··· 623 647 } 624 648 625 649 fn handle_previous(&self) -> Result<(), Error> { 626 - let (transport_id, media_session_id, _) = self.current_app_session()?; 650 + let Some((transport_id, media_session_id, _)) = self.current_app_session()? else { 651 + return Ok(()); 652 + }; 627 653 self.cast_device 628 654 .media 629 655 .previous(transport_id.as_str(), media_session_id)?; ··· 676 702 } 677 703 } 678 704 679 - let (transport_id, media_session_id, _) = self.current_app_session()?; 705 + let Some((transport_id, media_session_id, _)) = self.current_app_session()? else { 706 + return Ok(()); 707 + }; 680 708 self.cast_device.media.queue_insert( 681 709 transport_id.as_str(), 682 710 media_session_id, ··· 732 760 733 761 if let Some(cmd) = cmd { 734 762 if let Err(e) = self.handle_command(cmd) { 735 - println!("{:?}", e); 763 + tracing::warn!("chromecast: command error: {:?}", e); 736 764 } 737 765 } 738 766 ··· 742 770 current_playback.current = Some(playback); 743 771 } 744 772 Err(e) => { 745 - println!("{:?}", e); 773 + tracing::warn!("chromecast: get_current_playback error: {:?}", e); 746 774 } 747 775 } 748 776 thread::sleep(Duration::from_millis(500));
+72 -17
crates/chromecast/src/pcm.rs
··· 23 23 use std::net::TcpListener; 24 24 use std::path::Path; 25 25 use std::str::FromStr; 26 - use std::sync::atomic::{AtomicBool, Ordering}; 26 + use std::sync::atomic::{AtomicBool, AtomicU32, Ordering}; 27 27 use std::sync::{Arc, Condvar, Mutex, OnceLock}; 28 28 use std::thread; 29 29 use std::time::Duration; ··· 159 159 static PCM_STARTED: Mutex<bool> = Mutex::new(false); 160 160 static CAST_PLAYING: Mutex<bool> = Mutex::new(false); 161 161 static CAST_STOP: AtomicBool = AtomicBool::new(false); 162 + // Monotonically increasing; incremented by teardown so an old cast_loop 163 + // recognises it is stale and exits even after CAST_STOP is re-armed. 164 + static CAST_GENERATION: AtomicU32 = AtomicU32::new(0); 165 + // Set when the cast loop is already running and the sink resumes (pause/resume 166 + // or track change); the monitor loop reloads the media URL so the Chromecast 167 + // reconnects to the WAV stream. 168 + static RELOAD_REQUESTED: AtomicBool = AtomicBool::new(false); 162 169 163 170 struct ChromecastPcmConfig { 164 171 device_host: String, ··· 480 487 481 488 const ROCKBOX_APP_ID: &str = "88DCBD57"; 482 489 483 - fn cast_session(host: &str, device_port: u16, stream_url: &str, art_url_base: &str) -> bool { 490 + fn cast_session( 491 + host: &str, 492 + device_port: u16, 493 + stream_url: &str, 494 + art_url_base: &str, 495 + gen: u32, 496 + ) -> bool { 484 497 let cast_device = match CastDevice::connect_without_host_verification(host, device_port) { 485 498 Ok(d) => d, 486 499 Err(e) => { ··· 560 573 561 574 // Monitor loop: heartbeat + track-change metadata updates 562 575 loop { 563 - if CAST_STOP.load(Ordering::SeqCst) { 576 + let stale = 577 + CAST_STOP.load(Ordering::SeqCst) || CAST_GENERATION.load(Ordering::SeqCst) != gen; 578 + if stale { 564 579 let _ = cast_device.receiver.stop_app(app.session_id.as_str()); 565 580 return true; 566 581 } ··· 575 590 let current = rockbox_sys::playback::current_track(); 576 591 let current_path = current.as_ref().map(|t| t.path.clone()).unwrap_or_default(); 577 592 578 - if !current_path.is_empty() && current_path != last_track_path { 579 - last_track_path = current_path; 580 - // Increment art_seq so the Chromecast re-fetches cover art 581 - art_seq += 1; 593 + let reload = RELOAD_REQUESTED.swap(false, Ordering::SeqCst); 594 + let track_changed = !current_path.is_empty() && current_path != last_track_path; 595 + 596 + if reload || track_changed { 597 + if track_changed { 598 + last_track_path = current_path; 599 + art_seq += 1; 600 + } 601 + // Reset the buffer so the Chromecast fetches a clean stream start. 602 + if reload { 603 + get_buffer().reset(); 604 + tracing::info!("chromecast/pcm: sink resumed — reloading media"); 605 + } 582 606 let updated = build_media(stream_url, art_url_base, art_seq); 583 607 let new_title = updated 584 608 .metadata ··· 593 617 .media 594 618 .load(app.transport_id.as_str(), "", &updated) 595 619 { 596 - tracing::warn!("chromecast/pcm: track reload failed: {}, reconnecting", e); 620 + tracing::warn!("chromecast/pcm: reload failed: {}, reconnecting", e); 597 621 return false; 598 622 } 599 - tracing::info!("chromecast/pcm: track change → «{}»", new_title); 623 + if track_changed { 624 + tracing::info!("chromecast/pcm: track change → «{}»", new_title); 625 + } 600 626 } 601 627 } 602 628 } 603 629 604 - fn cast_loop(host: String, device_port: u16, http_port: u16) { 630 + fn cast_loop(host: String, device_port: u16, http_port: u16, gen: u32) { 605 631 let local_ip = get_local_ip(); 606 632 let stream_url = format!("http://{}:{}/stream.wav", local_ip, http_port); 607 633 let art_url_base = format!("http://{}:{}/now-playing/art", local_ip, http_port); 608 634 609 - while !CAST_STOP.load(Ordering::SeqCst) { 610 - let ok = cast_session(&host, device_port, &stream_url, &art_url_base); 611 - if ok || CAST_STOP.load(Ordering::SeqCst) { 635 + while !CAST_STOP.load(Ordering::SeqCst) && CAST_GENERATION.load(Ordering::SeqCst) == gen { 636 + let ok = cast_session(&host, device_port, &stream_url, &art_url_base, gen); 637 + if ok || CAST_STOP.load(Ordering::SeqCst) || CAST_GENERATION.load(Ordering::SeqCst) != gen { 612 638 break; 613 639 } 614 640 // Brief pause before reconnect attempt 615 641 thread::sleep(Duration::from_secs(3)); 616 642 } 617 643 618 - *CAST_PLAYING.lock().unwrap() = false; 644 + // Only clear CAST_PLAYING if this is still the current generation — a newer 645 + // cast_loop may already have set it to true. 646 + if CAST_GENERATION.load(Ordering::SeqCst) == gen { 647 + *CAST_PLAYING.lock().unwrap() = false; 648 + } 619 649 } 620 650 621 651 // --------------------------------------------------------------------------- ··· 657 687 #[cfg(feature = "ffi")] 658 688 #[no_mangle] 659 689 pub extern "C" fn pcm_chromecast_start() -> c_int { 660 - // Start the HTTP broadcast server once 690 + // Start the HTTP broadcast server once; on subsequent calls just re-open 691 + // the buffer (teardown closes it without stopping the listener thread). 661 692 { 662 693 let mut started = PCM_STARTED.lock().unwrap(); 663 694 if !*started { ··· 671 702 thread::spawn(move || serve_http(http_port, sample_rate, buf_http)); 672 703 *started = true; 673 704 tracing::info!("chromecast/pcm: WAV stream started on :{http_port}"); 705 + } else { 706 + // Re-open the buffer so new WAV readers can connect after teardown. 707 + get_buffer().reset(); 674 708 } 675 709 } 676 710 677 - // Spawn the Cast protocol thread if not already running 711 + // Spawn a Cast protocol thread if not already running for this generation. 678 712 let already_playing = { 679 713 let mut p = CAST_PLAYING.lock().unwrap(); 680 714 let was = *p; ··· 686 720 687 721 if !already_playing { 688 722 CAST_STOP.store(false, Ordering::SeqCst); 723 + let gen = CAST_GENERATION.load(Ordering::SeqCst); 689 724 let (host, device_port, http_port) = { 690 725 let cfg = CONFIG.lock().unwrap(); 691 726 (cfg.device_host.clone(), cfg.device_port, cfg.http_port) ··· 696 731 ); 697 732 *CAST_PLAYING.lock().unwrap() = false; 698 733 } else { 699 - thread::spawn(move || cast_loop(host, device_port, http_port)); 734 + thread::spawn(move || cast_loop(host, device_port, http_port, gen)); 735 + } 736 + } else { 737 + // cast_loop already running; signal it to reload media so the Chromecast 738 + // reconnects to the WAV stream (it may have dropped the connection during a pause). 739 + if !CAST_STOP.load(Ordering::SeqCst) { 740 + RELOAD_REQUESTED.store(true, Ordering::SeqCst); 700 741 } 701 742 } 702 743 ··· 719 760 pub extern "C" fn pcm_chromecast_stop() { 720 761 // No-op: the Cast session stays connected during pause so the Chromecast 721 762 // player UI remains open and resumes seamlessly when data flows again. 763 + } 764 + 765 + /// Tear down the active Cast session without shutting down the HTTP server. 766 + /// Called when switching away from the Chromecast output. The next call to 767 + /// pcm_chromecast_start() will spawn a fresh cast_loop and re-open the buffer. 768 + #[cfg(feature = "ffi")] 769 + #[no_mangle] 770 + pub extern "C" fn pcm_chromecast_teardown() { 771 + CAST_GENERATION.fetch_add(1, Ordering::SeqCst); 772 + CAST_STOP.store(true, Ordering::SeqCst); 773 + *CAST_PLAYING.lock().unwrap() = false; 774 + RELOAD_REQUESTED.store(false, Ordering::SeqCst); 775 + // Close the buffer so any in-flight WAV readers unblock and exit cleanly. 776 + get_buffer().close(); 722 777 } 723 778 724 779 #[cfg(feature = "ffi")]
+1
crates/server/Cargo.toml
··· 18 18 rand = "0.8.5" 19 19 reqwest = {version = "0.12.5", features = ["blocking", "rustls-tls"], default-features = false} 20 20 rockbox-chromecast = {path = "../chromecast"} 21 + rockbox-slim = {path = "../slim"} 21 22 rockbox-upnp = {path = "../upnp"} 22 23 rockbox-discovery = {path = "../discovery"} 23 24 rockbox-graphql = {path = "../graphql"}
+183 -18
crates/server/src/handlers/devices.rs
··· 1 1 use anyhow::Error; 2 - use rockbox_chromecast::Chromecast; 2 + use rockbox_settings::{read_settings, save_settings_to_file}; 3 + use rockbox_sys::sound::pcm; 3 4 4 5 use crate::{ 5 6 http::{Context, Request, Response}, ··· 10 11 let id = &req.params[0]; 11 12 let mut player = ctx.player.lock().unwrap(); 12 13 let mut current_device = ctx.current_device.lock().unwrap(); 13 - let devices = ctx.devices.lock().unwrap(); 14 - let device = devices.iter().find(|d| d.id == *id); 15 - if let Some(device) = device { 16 - let mut mutex = GLOBAL_MUTEX.lock().unwrap(); 17 - *mutex = 1; 18 - *player = Chromecast::connect(device.clone())?; 19 - *current_device = Some(device.clone()); 20 - res.set_status(200); 21 - return Ok(()); 14 + let mut devices = ctx.devices.lock().unwrap(); 15 + 16 + let device = match devices.iter().find(|d| d.id == *id).cloned().or_else(|| { 17 + // Synthetic device from settings (mDNS not yet found it). 18 + current_device.as_ref().filter(|d| d.id == *id).cloned() 19 + }) { 20 + Some(d) => d, 21 + None => { 22 + res.set_status(404); 23 + return Ok(()); 24 + } 25 + }; 26 + 27 + // Stop any existing player session. 28 + if let Some(p) = player.as_mut() { 29 + let _ = p.stop().await; 30 + let _ = p.disconnect().await; 31 + } 32 + *player = None; 33 + 34 + // If switching away from or to Chromecast, tear down the cast session so 35 + // the next pcm_chromecast_start() always gets a clean slate. 36 + let old_service = current_device 37 + .as_ref() 38 + .map(|d| d.service.as_str()) 39 + .unwrap_or(""); 40 + if old_service == "chromecast" || device.service == "chromecast" { 41 + pcm::chromecast_teardown(); 42 + } 43 + 44 + // Read current settings so we preserve all other fields. 45 + let mut settings = read_settings().unwrap_or_default(); 46 + 47 + match device.service.as_str() { 48 + "builtin" => { 49 + settings.audio_output = Some("builtin".to_string()); 50 + pcm::switch_sink(pcm::PCM_SINK_BUILTIN); 51 + *GLOBAL_MUTEX.lock().unwrap() = 0; 52 + } 53 + "fifo" => { 54 + settings.audio_output = Some("fifo".to_string()); 55 + let path = settings 56 + .fifo_path 57 + .as_deref() 58 + .unwrap_or("/tmp/rockbox.fifo") 59 + .to_string(); 60 + pcm::fifo_set_path(&path); 61 + pcm::switch_sink(pcm::PCM_SINK_FIFO); 62 + *GLOBAL_MUTEX.lock().unwrap() = 0; 63 + } 64 + "airplay" => { 65 + settings.audio_output = Some("airplay".to_string()); 66 + settings.airplay_host = Some(device.ip.clone()); 67 + settings.airplay_port = Some(device.port); 68 + pcm::airplay_clear_receivers(); 69 + pcm::airplay_set_host(&device.ip, device.port); 70 + pcm::switch_sink(pcm::PCM_SINK_AIRPLAY); 71 + *GLOBAL_MUTEX.lock().unwrap() = 0; 72 + } 73 + "squeezelite" => { 74 + let slim_port = settings.squeezelite_port.unwrap_or(3483); 75 + let http_port = settings.squeezelite_http_port.unwrap_or(9999); 76 + settings.audio_output = Some("squeezelite".to_string()); 77 + pcm::squeezelite_set_slim_port(slim_port); 78 + pcm::squeezelite_set_http_port(http_port); 79 + pcm::switch_sink(pcm::PCM_SINK_SQUEEZELITE); 80 + *GLOBAL_MUTEX.lock().unwrap() = 0; 81 + } 82 + "upnp" => { 83 + let http_port = settings.upnp_http_port.unwrap_or(7879); 84 + settings.audio_output = Some("upnp".to_string()); 85 + if let Some(ref url) = device.base_url { 86 + settings.upnp_renderer_url = Some(url.clone()); 87 + pcm::upnp_set_renderer_url(url); 88 + } 89 + pcm::upnp_set_http_port(http_port); 90 + pcm::switch_sink(pcm::PCM_SINK_UPNP); 91 + *GLOBAL_MUTEX.lock().unwrap() = 0; 92 + } 93 + "chromecast" => { 94 + let http_port = settings.chromecast_http_port.unwrap_or(7881); 95 + settings.audio_output = Some("chromecast".to_string()); 96 + settings.chromecast_host = Some(device.ip.clone()); 97 + settings.chromecast_port = Some(device.port); 98 + pcm::chromecast_set_http_port(http_port); 99 + pcm::chromecast_set_device_host(&device.ip); 100 + pcm::chromecast_set_device_port(device.port); 101 + pcm::switch_sink(pcm::PCM_SINK_CHROMECAST); 102 + *GLOBAL_MUTEX.lock().unwrap() = 0; 103 + } 104 + other => { 105 + tracing::warn!("connect: unknown device service {:?}", other); 106 + res.set_status(400); 107 + return Ok(()); 108 + } 109 + } 110 + 111 + // Persist and update state before any potentially-failing connection attempt 112 + // so that the selection survives even if e.g. the Chromecast is temporarily unreachable. 113 + if let Err(e) = save_settings_to_file(&settings) { 114 + tracing::warn!("connect: failed to save settings: {e}"); 115 + } 116 + 117 + // Mark new current device; clear is_current_device on all others. 118 + for d in devices.iter_mut() { 119 + d.is_current_device = d.id == device.id; 22 120 } 23 - res.set_status(404); 121 + *current_device = Some(device.clone()); 122 + 123 + // The Cast protocol session is managed entirely by the pcm.rs cast_loop; 124 + // no separate lib.rs Chromecast::connect() needed here. 125 + 126 + res.set_status(200); 24 127 Ok(()) 25 128 } 26 129 ··· 28 131 let _id = &req.params[0]; 29 132 let mut player = ctx.player.lock().unwrap(); 30 133 let mut current_device = ctx.current_device.lock().unwrap(); 31 - if let Some(player) = player.as_mut() { 32 - player.stop().await?; 33 - player.disconnect().await?; 134 + let mut devices = ctx.devices.lock().unwrap(); 135 + 136 + if let Some(p) = player.as_mut() { 137 + let _ = p.stop().await; 138 + let _ = p.disconnect().await; 34 139 } 35 - let mut mutex = GLOBAL_MUTEX.lock().unwrap(); 36 - *mutex = 0; 140 + *GLOBAL_MUTEX.lock().unwrap() = 0; 37 141 *player = None; 38 - *current_device = None; 142 + 143 + // If disconnecting from Chromecast, stop the cast loop before switching sink. 144 + if current_device 145 + .as_ref() 146 + .map_or(false, |d| d.service == "chromecast") 147 + { 148 + pcm::chromecast_teardown(); 149 + } 150 + 151 + // Fall back to built-in sink. 152 + pcm::switch_sink(pcm::PCM_SINK_BUILTIN); 153 + 154 + let mut settings = read_settings().unwrap_or_default(); 155 + settings.audio_output = Some("builtin".to_string()); 156 + if let Err(e) = save_settings_to_file(&settings) { 157 + tracing::warn!("disconnect: failed to save settings: {e}"); 158 + } 159 + 160 + // Mark built-in as current. 161 + for d in devices.iter_mut() { 162 + d.is_current_device = d.id == "builtin"; 163 + } 164 + *current_device = devices.iter().find(|d| d.id == "builtin").cloned(); 165 + 39 166 res.set_status(200); 40 167 Ok(()) 41 168 } 42 169 43 170 pub async fn get_devices(ctx: &Context, _req: &Request, res: &mut Response) -> Result<(), Error> { 171 + let current = ctx.current_device.lock().unwrap().clone(); 44 172 let devices = ctx.devices.lock().unwrap(); 45 - res.json(&devices.clone()); 173 + 174 + let mut result: Vec<_> = devices 175 + .iter() 176 + .map(|d| { 177 + let mut d = d.clone(); 178 + d.is_current_device = current 179 + .as_ref() 180 + .map(|c| devices_match(c, &d)) 181 + .unwrap_or(false); 182 + d 183 + }) 184 + .collect(); 185 + 186 + // If the current device isn't in the discovered list yet (e.g. Chromecast 187 + // from settings but mDNS hasn't found it), include it so UIs can show it. 188 + if let Some(ref cd) = current { 189 + if !result.iter().any(|d| devices_match(cd, d)) { 190 + result.push(cd.clone()); 191 + } 192 + } 193 + 194 + res.json(&result); 46 195 Ok(()) 196 + } 197 + 198 + /// Two devices represent the same physical output if their IDs match OR if 199 + /// their service + IP match (handles ID format differences between settings- 200 + /// based synthetic devices and mDNS-discovered ones). 201 + fn devices_match(a: &rockbox_types::device::Device, b: &rockbox_types::device::Device) -> bool { 202 + if a.id == b.id { 203 + return true; 204 + } 205 + if a.service != b.service { 206 + return false; 207 + } 208 + match a.service.as_str() { 209 + "builtin" | "fifo" | "squeezelite" => true, 210 + _ => !a.ip.is_empty() && a.ip == b.ip, 211 + } 47 212 } 48 213 49 214 pub async fn get_device(ctx: &Context, req: &Request, res: &mut Response) -> Result<(), Error> {
+6 -24
crates/server/src/handlers/player.rs
··· 415 415 416 416 pub async fn next(ctx: &Context, _req: &Request, _res: &mut Response) -> Result<(), Error> { 417 417 let player_mutex = PLAYER_MUTEX.lock().unwrap(); 418 - let player = ctx.player.lock().unwrap(); 419 - 420 - match player.as_deref() { 421 - Some(player) => { 422 - player.next().await?; 423 - } 424 - None => { 425 - rb::playback::next(); 426 - } 427 - } 428 - 418 + // Always advance the Rockbox playlist regardless of active player (e.g. 419 + // Chromecast). The Cast monitor loop detects the track change and reloads. 420 + rb::playback::next(); 429 421 drop(player_mutex); 430 - 422 + let _ = ctx; 431 423 Ok(()) 432 424 } 433 425 434 426 pub async fn previous(ctx: &Context, _req: &Request, _res: &mut Response) -> Result<(), Error> { 435 427 let player_mutex = PLAYER_MUTEX.lock().unwrap(); 436 - let player = ctx.player.lock().unwrap(); 437 - 438 - match player.as_deref() { 439 - Some(player) => { 440 - player.previous().await?; 441 - } 442 - None => { 443 - rb::playback::prev(); 444 - } 445 - } 446 - 428 + rb::playback::prev(); 447 429 drop(player_mutex); 448 - 430 + let _ = ctx; 449 431 Ok(()) 450 432 } 451 433
+91 -3
crates/server/src/http.rs
··· 24 24 use crate::{ 25 25 kv::{build_tracks_kv, KV}, 26 26 player_events::listen_for_playback_changes, 27 - scan::{scan_chromecast_devices, scan_upnp_devices}, 27 + scan::{ 28 + scan_airplay_devices, scan_chromecast_devices, scan_squeezelite_clients, scan_upnp_devices, 29 + virtual_devices, 30 + }, 28 31 }; 29 32 30 33 type Handler = fn(&Context, &Request, &mut Response) -> Result<(), Error>; ··· 248 251 let db_pool = rt.block_on(rockbox_library::create_connection_pool())?; 249 252 let fs_cache = Arc::new(tokio::sync::Mutex::new(HashMap::new())); 250 253 let metadata_cache = Arc::new(tokio::sync::Mutex::new(HashMap::new())); 251 - let devices = Arc::new(Mutex::new(Vec::new())); 252 - let current_device = Arc::new(Mutex::new(None)); 254 + // Seed device list with always-present virtual outputs. 255 + let devices = Arc::new(Mutex::new(virtual_devices())); 256 + 257 + // Determine which device is currently active from settings.toml. 258 + let current_device = { 259 + let active = rockbox_settings::read_settings().ok().and_then(|s| { 260 + let output = s.audio_output.as_deref().unwrap_or("builtin"); 261 + let mut device = match output { 262 + "builtin" | "fifo" => { 263 + virtual_devices().into_iter().find(|d| d.service == output) 264 + } 265 + "airplay" => { 266 + let host = s.airplay_host.clone().unwrap_or_default(); 267 + Some(Device { 268 + id: format!("airplay-{}", host), 269 + name: if host.is_empty() { 270 + "AirPlay".to_string() 271 + } else { 272 + format!("AirPlay ({})", host) 273 + }, 274 + host: host.clone(), 275 + ip: host, 276 + port: s.airplay_port.unwrap_or(5000), 277 + service: "airplay".to_string(), 278 + app: "AirPlay".to_string(), 279 + ..Default::default() 280 + }) 281 + } 282 + "squeezelite" => Some(Device { 283 + id: "squeezelite".to_string(), 284 + name: "Squeezelite".to_string(), 285 + host: "localhost".to_string(), 286 + ip: "127.0.0.1".to_string(), 287 + port: s.squeezelite_port.unwrap_or(3483), 288 + service: "squeezelite".to_string(), 289 + app: "squeezelite".to_string(), 290 + ..Default::default() 291 + }), 292 + "upnp" => { 293 + let url = s.upnp_renderer_url.clone().unwrap_or_default(); 294 + Some(Device { 295 + id: format!( 296 + "upnp-{:.8}", 297 + format!("{:x}", md5::compute(url.as_bytes())) 298 + ), 299 + name: "UPnP/DLNA".to_string(), 300 + host: "localhost".to_string(), 301 + ip: "127.0.0.1".to_string(), 302 + port: 0, 303 + service: "upnp".to_string(), 304 + app: "upnp".to_string(), 305 + base_url: Some(url), 306 + ..Default::default() 307 + }) 308 + } 309 + "chromecast" => { 310 + let host = s.chromecast_host.clone().unwrap_or_default(); 311 + Some(Device { 312 + id: format!("chromecast-{}", host), 313 + name: if host.is_empty() { 314 + "Chromecast".to_string() 315 + } else { 316 + format!("Chromecast ({})", host) 317 + }, 318 + host: host.clone(), 319 + ip: host, 320 + port: s.chromecast_port.unwrap_or(8009), 321 + service: "chromecast".to_string(), 322 + app: "Chromecast".to_string(), 323 + is_cast_device: true, 324 + ..Default::default() 325 + }) 326 + } 327 + _ => virtual_devices() 328 + .into_iter() 329 + .find(|d| d.service == "builtin"), 330 + }; 331 + if let Some(ref mut d) = device { 332 + d.is_current_device = true; 333 + } 334 + device 335 + }); 336 + Arc::new(Mutex::new(active)) 337 + }; 338 + 253 339 let player = Arc::new(Mutex::new(None)); 254 340 let kv = Arc::new(Mutex::new(rt.block_on(build_tracks_kv(db_pool.clone()))?)); 255 341 ··· 260 346 // Start scanning for devices 261 347 scan_chromecast_devices(devices.clone()); 262 348 scan_upnp_devices(devices.clone()); 349 + scan_airplay_devices(devices.clone()); 350 + scan_squeezelite_clients(devices.clone()); 263 351 listen_for_playback_changes(player.clone(), db_pool.clone()); 264 352 265 353 loop {
+107 -3
crates/server/src/scan.rs
··· 1 1 use futures_util::StreamExt; 2 2 use rockbox_discovery::{discover, CHROMECAST_SERVICE_NAME}; 3 3 use rockbox_graphql::simplebroker::SimpleBroker; 4 - use rockbox_types::device::{Device, UPNP_DLNA_DEVICE}; 4 + use rockbox_types::device::{Device, AIRPLAY_DEVICE, AIRPLAY_SERVICE_NAME, UPNP_DLNA_DEVICE}; 5 5 use std::{ 6 6 sync::{Arc, Mutex}, 7 7 thread, 8 + time::Duration, 8 9 }; 9 10 11 + /// Returns the always-present virtual output devices (built-in SDL and 12 + /// Snapcast/FIFO). Squeezelite clients are discovered dynamically via Slim 13 + /// Protocol HELO tracking, not listed here. 14 + pub fn virtual_devices() -> Vec<Device> { 15 + vec![ 16 + Device { 17 + id: "builtin".to_string(), 18 + name: "Rockbox (Built-in)".to_string(), 19 + host: "localhost".to_string(), 20 + ip: "127.0.0.1".to_string(), 21 + port: 0, 22 + service: "builtin".to_string(), 23 + app: "builtin".to_string(), 24 + is_cast_device: false, 25 + is_source_device: false, 26 + ..Default::default() 27 + }, 28 + Device { 29 + id: "fifo".to_string(), 30 + name: "Snapcast (FIFO)".to_string(), 31 + host: "localhost".to_string(), 32 + ip: "127.0.0.1".to_string(), 33 + port: 0, 34 + service: "fifo".to_string(), 35 + app: "fifo".to_string(), 36 + is_cast_device: false, 37 + is_source_device: false, 38 + ..Default::default() 39 + }, 40 + ] 41 + } 42 + 10 43 /// Scan the local network for UPnP/DLNA MediaRenderer devices (Kodi, etc.). 11 44 /// Runs once at startup; discovered renderers are added to the shared devices list. 12 45 pub fn scan_upnp_devices(devices: Arc<Mutex<Vec<Device>>>) { ··· 56 89 { 57 90 continue; 58 91 } 59 - devices.push(Device::from(info.clone())); 60 - SimpleBroker::<Device>::publish(Device::from(info.clone())); 92 + let mut device = Device::from(info.clone()); 93 + device.service = "chromecast".to_string(); 94 + device.is_cast_device = true; 95 + devices.push(device.clone()); 96 + SimpleBroker::<Device>::publish(device); 61 97 } 62 98 }); 63 99 }); 64 100 } 101 + 102 + /// Discover AirPlay receivers via mDNS (`_raop._tcp.local.`). 103 + pub fn scan_airplay_devices(devices: Arc<Mutex<Vec<Device>>>) { 104 + thread::spawn(move || { 105 + tokio::runtime::Runtime::new().unwrap().block_on(async { 106 + let services = discover(AIRPLAY_SERVICE_NAME); 107 + tokio::pin!(services); 108 + while let Some(info) = services.next().await { 109 + let mut devices = devices.lock().unwrap(); 110 + if devices 111 + .iter() 112 + .any(|d| d.id == info.get_fullname().to_owned()) 113 + { 114 + continue; 115 + } 116 + let mut device = Device::from(info.clone()); 117 + device.service = "airplay".to_string(); 118 + device.app = AIRPLAY_DEVICE.to_string(); 119 + device.is_cast_device = true; 120 + devices.push(device.clone()); 121 + SimpleBroker::<Device>::publish(device); 122 + } 123 + }); 124 + }); 125 + } 126 + 127 + /// Poll squeezelite clients that have connected via Slim Protocol HELO. 128 + /// Runs in a background thread; adds newly connected clients and removes 129 + /// disconnected ones from the shared device list every 2 seconds. 130 + pub fn scan_squeezelite_clients(devices: Arc<Mutex<Vec<Device>>>) { 131 + thread::spawn(move || loop { 132 + let connected = rockbox_slim::get_connected_clients(); 133 + 134 + let mut devs = devices.lock().unwrap(); 135 + 136 + // Add newly connected clients. 137 + for client in &connected { 138 + if !devs.iter().any(|d| d.id == client.id) { 139 + let device = Device { 140 + id: client.id.clone(), 141 + name: client.name.clone(), 142 + host: client.ip.clone(), 143 + ip: client.ip.clone(), 144 + port: 3483, 145 + service: "squeezelite".to_string(), 146 + app: "squeezelite".to_string(), 147 + is_cast_device: false, 148 + is_source_device: false, 149 + ..Default::default() 150 + }; 151 + tracing::info!("slim: discovered client {} ({})", client.name, client.id); 152 + SimpleBroker::<Device>::publish(device.clone()); 153 + devs.push(device); 154 + } 155 + } 156 + 157 + // Remove clients that have disconnected. 158 + devs.retain(|d| { 159 + if d.service != "squeezelite" { 160 + return true; 161 + } 162 + connected.iter().any(|c| c.id == d.id) 163 + }); 164 + 165 + drop(devs); 166 + thread::sleep(Duration::from_secs(2)); 167 + }); 168 + }
+22
crates/settings/src/lib.rs
··· 148 148 Ok(()) 149 149 } 150 150 151 + /// Read the current settings.toml without applying anything. 152 + pub fn read_settings() -> Result<NewGlobalSettings, Error> { 153 + let home = std::env::var("HOME")?; 154 + let path = format!("{}/.config/rockbox.org/settings.toml", home); 155 + match std::fs::read_to_string(&path) { 156 + Ok(content) => Ok(toml::from_str(&content)?), 157 + Err(_) => Ok(NewGlobalSettings::default()), 158 + } 159 + } 160 + 161 + /// Persist `settings` to settings.toml as-is (all fields preserved, no C 162 + /// firmware involvement). Use this instead of `write_settings()` when you 163 + /// want to save audio-output-related fields that the C firmware doesn't know 164 + /// about. 165 + pub fn save_settings_to_file(settings: &NewGlobalSettings) -> Result<(), Error> { 166 + let home = std::env::var("HOME")?; 167 + let path = format!("{}/.config/rockbox.org/settings.toml", home); 168 + let content = toml::to_string(settings)?; 169 + std::fs::write(&path, content)?; 170 + Ok(()) 171 + } 172 + 151 173 pub fn get_music_dir() -> Result<String, Error> { 152 174 let home = std::env::var("HOME")?; 153 175 let path = format!("{}/.config/rockbox.org/settings.toml", home);
+34
crates/slim/src/lib.rs
··· 10 10 use std::time::{Duration, SystemTime, UNIX_EPOCH}; 11 11 12 12 // --------------------------------------------------------------------------- 13 + // Connected-client registry — updated as squeezelite instances connect / 14 + // disconnect. Readable from outside the crate via `get_connected_clients()`. 15 + // --------------------------------------------------------------------------- 16 + 17 + /// A squeezelite client currently connected to the Slim Protocol server. 18 + #[derive(Clone, Debug)] 19 + pub struct SlimClient { 20 + /// MAC-address-based unique ID (lowercase hex, no colons). 21 + pub id: String, 22 + /// Friendly name from HELO capabilities ("Name=…" field), or IP as fallback. 23 + pub name: String, 24 + /// Peer IP address. 25 + pub ip: String, 26 + } 27 + 28 + static CLIENTS: Mutex<Vec<SlimClient>> = Mutex::new(Vec::new()); 29 + 30 + /// Snapshot of all currently connected squeezelite clients. 31 + pub fn get_connected_clients() -> Vec<SlimClient> { 32 + CLIENTS.lock().unwrap().clone() 33 + } 34 + 35 + pub(crate) fn add_client(client: SlimClient) { 36 + let mut c = CLIENTS.lock().unwrap(); 37 + if !c.iter().any(|x| x.id == client.id) { 38 + c.push(client); 39 + } 40 + } 41 + 42 + pub(crate) fn remove_client(id: &str) { 43 + CLIENTS.lock().unwrap().retain(|c| c.id != id); 44 + } 45 + 46 + // --------------------------------------------------------------------------- 13 47 // Broadcast buffer — one writer, N independent readers. 14 48 // 15 49 // Each chunk is stored with a monotonically-increasing sequence number.
+58 -4
crates/slim/src/slimproto.rs
··· 37 37 .unwrap_or_default(); 38 38 tracing::info!("slim: client connected from {peer}"); 39 39 40 - match read_client_packet(&mut stream) { 41 - Ok((opcode, _body)) if opcode == "HELO" => { 42 - tracing::info!("slim: HELO from {peer}"); 40 + let client_id = match read_client_packet(&mut stream) { 41 + Ok((opcode, body)) if opcode == "HELO" => { 42 + let id = parse_helo_mac_id(&body); 43 + let peer_ip = stream 44 + .peer_addr() 45 + .map(|a| a.ip().to_string()) 46 + .unwrap_or_default(); 47 + let name = parse_helo_name(&body).unwrap_or_else(|| peer_ip.clone()); 48 + tracing::info!("slim: HELO from {peer} id={id} name={name:?}"); 49 + crate::add_client(crate::SlimClient { 50 + id: id.clone(), 51 + name, 52 + ip: peer_ip, 53 + }); 54 + id 43 55 } 44 56 Ok((opcode, _)) => { 45 57 tracing::warn!("slim: expected HELO, got '{opcode}' from {peer}"); ··· 49 61 tracing::debug!("slim: read error from {peer}: {e}"); 50 62 return; 51 63 } 52 - } 64 + }; 53 65 54 66 if let Err(e) = send_strm_start(&mut stream, http_port) { 55 67 tracing::error!("slim: send STRM to {peer} failed: {e}"); ··· 121 133 } 122 134 } 123 135 } 136 + crate::remove_client(&client_id); 124 137 } 125 138 126 139 // --------------------------------------------------------------------------- ··· 235 248 data[offset + 3], 236 249 ]) 237 250 } 251 + 252 + // --------------------------------------------------------------------------- 253 + // HELO body parsers 254 + // 255 + // HELO body layout: 256 + // [0] device_id 257 + // [1] revision 258 + // [2..8] mac address (6 bytes) 259 + // [8..24] uuid (16 bytes) 260 + // [24..26] wlan_channel_list (2 bytes) 261 + // [26..34] bytes_received (8 bytes) 262 + // [34..36] language (2 bytes) 263 + // [36..] capabilities (variable, comma-separated key=value pairs) 264 + // --------------------------------------------------------------------------- 265 + 266 + fn parse_helo_mac_id(body: &[u8]) -> String { 267 + if body.len() < 8 { 268 + return "unknown".to_string(); 269 + } 270 + let mac = &body[2..8]; 271 + format!( 272 + "{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}", 273 + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5] 274 + ) 275 + } 276 + 277 + fn parse_helo_name(body: &[u8]) -> Option<String> { 278 + const CAP_OFFSET: usize = 36; 279 + if body.len() <= CAP_OFFSET { 280 + return None; 281 + } 282 + let cap_str = std::str::from_utf8(&body[CAP_OFFSET..]).ok()?; 283 + for part in cap_str.trim_end_matches('\0').split(',') { 284 + if let Some(name) = part.strip_prefix("Name=") { 285 + if !name.is_empty() { 286 + return Some(name.to_string()); 287 + } 288 + } 289 + } 290 + None 291 + }
+1
crates/sys/src/lib.rs
··· 1159 1159 fn pcm_chromecast_set_http_port(port: c_ushort); 1160 1160 fn pcm_chromecast_set_device_host(host: *const c_char); 1161 1161 fn pcm_chromecast_set_device_port(port: c_ushort); 1162 + fn pcm_chromecast_teardown(); 1162 1163 fn beep_play(frequency: c_uint, duration: c_uint, amplitude: c_uint); 1163 1164 fn dsp_set_crossfeed_type(r#type: c_int); 1164 1165 fn dsp_eq_enable(enable: c_uchar);
+4
crates/sys/src/sound/pcm.rs
··· 114 114 pub fn chromecast_set_device_port(port: u16) { 115 115 unsafe { crate::pcm_chromecast_set_device_port(port) } 116 116 } 117 + 118 + pub fn chromecast_teardown() { 119 + unsafe { crate::pcm_chromecast_teardown() } 120 + }
+1255 -2532
crates/upnp/src/api/rockbox.v1alpha1.rs
··· 43 43 dead_code, 44 44 missing_docs, 45 45 clippy::wildcard_imports, 46 - clippy::let_unit_value, 46 + clippy::let_unit_value 47 47 )] 48 - use tonic::codegen::*; 49 48 use tonic::codegen::http::Uri; 49 + use tonic::codegen::*; 50 50 #[derive(Debug, Clone)] 51 51 pub struct BrowseServiceClient<T> { 52 52 inner: tonic::client::Grpc<T>, ··· 90 90 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 91 91 >, 92 92 >, 93 - <T as tonic::codegen::Service< 94 - http::Request<tonic::body::BoxBody>, 95 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 93 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 94 + Into<StdError> + std::marker::Send + std::marker::Sync, 96 95 { 97 96 BrowseServiceClient::new(InterceptedService::new(inner, interceptor)) 98 97 } ··· 130 129 pub async fn tree_get_entries( 131 130 &mut self, 132 131 request: impl tonic::IntoRequest<super::TreeGetEntriesRequest>, 133 - ) -> std::result::Result< 134 - tonic::Response<super::TreeGetEntriesResponse>, 135 - tonic::Status, 136 - > { 137 - self.inner 138 - .ready() 139 - .await 140 - .map_err(|e| { 141 - tonic::Status::unknown( 142 - format!("Service was not ready: {}", e.into()), 143 - ) 144 - })?; 132 + ) -> std::result::Result<tonic::Response<super::TreeGetEntriesResponse>, tonic::Status> 133 + { 134 + self.inner.ready().await.map_err(|e| { 135 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 136 + })?; 145 137 let codec = tonic::codec::ProstCodec::default(); 146 138 let path = http::uri::PathAndQuery::from_static( 147 139 "/rockbox.v1alpha1.BrowseService/TreeGetEntries", 148 140 ); 149 141 let mut req = request.into_request(); 150 - req.extensions_mut() 151 - .insert( 152 - GrpcMethod::new("rockbox.v1alpha1.BrowseService", "TreeGetEntries"), 153 - ); 142 + req.extensions_mut().insert(GrpcMethod::new( 143 + "rockbox.v1alpha1.BrowseService", 144 + "TreeGetEntries", 145 + )); 154 146 self.inner.unary(req, path, codec).await 155 147 } 156 148 } ··· 162 154 dead_code, 163 155 missing_docs, 164 156 clippy::wildcard_imports, 165 - clippy::let_unit_value, 157 + clippy::let_unit_value 166 158 )] 167 159 use tonic::codegen::*; 168 160 /// Generated trait containing gRPC methods that should be implemented for use with BrowseServiceServer. ··· 171 163 async fn tree_get_entries( 172 164 &self, 173 165 request: tonic::Request<super::TreeGetEntriesRequest>, 174 - ) -> std::result::Result< 175 - tonic::Response<super::TreeGetEntriesResponse>, 176 - tonic::Status, 177 - >; 166 + ) -> std::result::Result<tonic::Response<super::TreeGetEntriesResponse>, tonic::Status>; 178 167 } 179 168 #[derive(Debug)] 180 169 pub struct BrowseServiceServer<T> { ··· 197 186 max_encoding_message_size: None, 198 187 } 199 188 } 200 - pub fn with_interceptor<F>( 201 - inner: T, 202 - interceptor: F, 203 - ) -> InterceptedService<Self, F> 189 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 204 190 where 205 191 F: tonic::service::Interceptor, 206 192 { ··· 255 241 "/rockbox.v1alpha1.BrowseService/TreeGetEntries" => { 256 242 #[allow(non_camel_case_types)] 257 243 struct TreeGetEntriesSvc<T: BrowseService>(pub Arc<T>); 258 - impl< 259 - T: BrowseService, 260 - > tonic::server::UnaryService<super::TreeGetEntriesRequest> 261 - for TreeGetEntriesSvc<T> { 244 + impl<T: BrowseService> tonic::server::UnaryService<super::TreeGetEntriesRequest> 245 + for TreeGetEntriesSvc<T> 246 + { 262 247 type Response = super::TreeGetEntriesResponse; 263 - type Future = BoxFuture< 264 - tonic::Response<Self::Response>, 265 - tonic::Status, 266 - >; 248 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 267 249 fn call( 268 250 &mut self, 269 251 request: tonic::Request<super::TreeGetEntriesRequest>, 270 252 ) -> Self::Future { 271 253 let inner = Arc::clone(&self.0); 272 254 let fut = async move { 273 - <T as BrowseService>::tree_get_entries(&inner, request) 274 - .await 255 + <T as BrowseService>::tree_get_entries(&inner, request).await 275 256 }; 276 257 Box::pin(fut) 277 258 } ··· 298 279 }; 299 280 Box::pin(fut) 300 281 } 301 - _ => { 302 - Box::pin(async move { 303 - let mut response = http::Response::new(empty_body()); 304 - let headers = response.headers_mut(); 305 - headers 306 - .insert( 307 - tonic::Status::GRPC_STATUS, 308 - (tonic::Code::Unimplemented as i32).into(), 309 - ); 310 - headers 311 - .insert( 312 - http::header::CONTENT_TYPE, 313 - tonic::metadata::GRPC_CONTENT_TYPE, 314 - ); 315 - Ok(response) 316 - }) 317 - } 282 + _ => Box::pin(async move { 283 + let mut response = http::Response::new(empty_body()); 284 + let headers = response.headers_mut(); 285 + headers.insert( 286 + tonic::Status::GRPC_STATUS, 287 + (tonic::Code::Unimplemented as i32).into(), 288 + ); 289 + headers.insert( 290 + http::header::CONTENT_TYPE, 291 + tonic::metadata::GRPC_CONTENT_TYPE, 292 + ); 293 + Ok(response) 294 + }), 318 295 } 319 296 } 320 297 } ··· 571 548 dead_code, 572 549 missing_docs, 573 550 clippy::wildcard_imports, 574 - clippy::let_unit_value, 551 + clippy::let_unit_value 575 552 )] 576 - use tonic::codegen::*; 577 553 use tonic::codegen::http::Uri; 554 + use tonic::codegen::*; 578 555 #[derive(Debug, Clone)] 579 556 pub struct LibraryServiceClient<T> { 580 557 inner: tonic::client::Grpc<T>, ··· 618 595 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 619 596 >, 620 597 >, 621 - <T as tonic::codegen::Service< 622 - http::Request<tonic::body::BoxBody>, 623 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 598 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 599 + Into<StdError> + std::marker::Send + std::marker::Sync, 624 600 { 625 601 LibraryServiceClient::new(InterceptedService::new(inner, interceptor)) 626 602 } ··· 658 634 pub async fn get_albums( 659 635 &mut self, 660 636 request: impl tonic::IntoRequest<super::GetAlbumsRequest>, 661 - ) -> std::result::Result< 662 - tonic::Response<super::GetAlbumsResponse>, 663 - tonic::Status, 664 - > { 665 - self.inner 666 - .ready() 667 - .await 668 - .map_err(|e| { 669 - tonic::Status::unknown( 670 - format!("Service was not ready: {}", e.into()), 671 - ) 672 - })?; 637 + ) -> std::result::Result<tonic::Response<super::GetAlbumsResponse>, tonic::Status> { 638 + self.inner.ready().await.map_err(|e| { 639 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 640 + })?; 673 641 let codec = tonic::codec::ProstCodec::default(); 674 - let path = http::uri::PathAndQuery::from_static( 675 - "/rockbox.v1alpha1.LibraryService/GetAlbums", 676 - ); 642 + let path = 643 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbums"); 677 644 let mut req = request.into_request(); 678 - req.extensions_mut() 679 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbums")); 645 + req.extensions_mut().insert(GrpcMethod::new( 646 + "rockbox.v1alpha1.LibraryService", 647 + "GetAlbums", 648 + )); 680 649 self.inner.unary(req, path, codec).await 681 650 } 682 651 pub async fn get_artists( 683 652 &mut self, 684 653 request: impl tonic::IntoRequest<super::GetArtistsRequest>, 685 - ) -> std::result::Result< 686 - tonic::Response<super::GetArtistsResponse>, 687 - tonic::Status, 688 - > { 689 - self.inner 690 - .ready() 691 - .await 692 - .map_err(|e| { 693 - tonic::Status::unknown( 694 - format!("Service was not ready: {}", e.into()), 695 - ) 696 - })?; 654 + ) -> std::result::Result<tonic::Response<super::GetArtistsResponse>, tonic::Status> 655 + { 656 + self.inner.ready().await.map_err(|e| { 657 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 658 + })?; 697 659 let codec = tonic::codec::ProstCodec::default(); 698 - let path = http::uri::PathAndQuery::from_static( 699 - "/rockbox.v1alpha1.LibraryService/GetArtists", 700 - ); 660 + let path = 661 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtists"); 701 662 let mut req = request.into_request(); 702 - req.extensions_mut() 703 - .insert( 704 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtists"), 705 - ); 663 + req.extensions_mut().insert(GrpcMethod::new( 664 + "rockbox.v1alpha1.LibraryService", 665 + "GetArtists", 666 + )); 706 667 self.inner.unary(req, path, codec).await 707 668 } 708 669 pub async fn get_tracks( 709 670 &mut self, 710 671 request: impl tonic::IntoRequest<super::GetTracksRequest>, 711 - ) -> std::result::Result< 712 - tonic::Response<super::GetTracksResponse>, 713 - tonic::Status, 714 - > { 715 - self.inner 716 - .ready() 717 - .await 718 - .map_err(|e| { 719 - tonic::Status::unknown( 720 - format!("Service was not ready: {}", e.into()), 721 - ) 722 - })?; 672 + ) -> std::result::Result<tonic::Response<super::GetTracksResponse>, tonic::Status> { 673 + self.inner.ready().await.map_err(|e| { 674 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 675 + })?; 723 676 let codec = tonic::codec::ProstCodec::default(); 724 - let path = http::uri::PathAndQuery::from_static( 725 - "/rockbox.v1alpha1.LibraryService/GetTracks", 726 - ); 677 + let path = 678 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTracks"); 727 679 let mut req = request.into_request(); 728 - req.extensions_mut() 729 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTracks")); 680 + req.extensions_mut().insert(GrpcMethod::new( 681 + "rockbox.v1alpha1.LibraryService", 682 + "GetTracks", 683 + )); 730 684 self.inner.unary(req, path, codec).await 731 685 } 732 686 pub async fn get_album( 733 687 &mut self, 734 688 request: impl tonic::IntoRequest<super::GetAlbumRequest>, 735 - ) -> std::result::Result< 736 - tonic::Response<super::GetAlbumResponse>, 737 - tonic::Status, 738 - > { 739 - self.inner 740 - .ready() 741 - .await 742 - .map_err(|e| { 743 - tonic::Status::unknown( 744 - format!("Service was not ready: {}", e.into()), 745 - ) 746 - })?; 689 + ) -> std::result::Result<tonic::Response<super::GetAlbumResponse>, tonic::Status> { 690 + self.inner.ready().await.map_err(|e| { 691 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 692 + })?; 747 693 let codec = tonic::codec::ProstCodec::default(); 748 - let path = http::uri::PathAndQuery::from_static( 749 - "/rockbox.v1alpha1.LibraryService/GetAlbum", 750 - ); 694 + let path = 695 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetAlbum"); 751 696 let mut req = request.into_request(); 752 - req.extensions_mut() 753 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetAlbum")); 697 + req.extensions_mut().insert(GrpcMethod::new( 698 + "rockbox.v1alpha1.LibraryService", 699 + "GetAlbum", 700 + )); 754 701 self.inner.unary(req, path, codec).await 755 702 } 756 703 pub async fn get_artist( 757 704 &mut self, 758 705 request: impl tonic::IntoRequest<super::GetArtistRequest>, 759 - ) -> std::result::Result< 760 - tonic::Response<super::GetArtistResponse>, 761 - tonic::Status, 762 - > { 763 - self.inner 764 - .ready() 765 - .await 766 - .map_err(|e| { 767 - tonic::Status::unknown( 768 - format!("Service was not ready: {}", e.into()), 769 - ) 770 - })?; 706 + ) -> std::result::Result<tonic::Response<super::GetArtistResponse>, tonic::Status> { 707 + self.inner.ready().await.map_err(|e| { 708 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 709 + })?; 771 710 let codec = tonic::codec::ProstCodec::default(); 772 - let path = http::uri::PathAndQuery::from_static( 773 - "/rockbox.v1alpha1.LibraryService/GetArtist", 774 - ); 711 + let path = 712 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetArtist"); 775 713 let mut req = request.into_request(); 776 - req.extensions_mut() 777 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetArtist")); 714 + req.extensions_mut().insert(GrpcMethod::new( 715 + "rockbox.v1alpha1.LibraryService", 716 + "GetArtist", 717 + )); 778 718 self.inner.unary(req, path, codec).await 779 719 } 780 720 pub async fn get_track( 781 721 &mut self, 782 722 request: impl tonic::IntoRequest<super::GetTrackRequest>, 783 - ) -> std::result::Result< 784 - tonic::Response<super::GetTrackResponse>, 785 - tonic::Status, 786 - > { 787 - self.inner 788 - .ready() 789 - .await 790 - .map_err(|e| { 791 - tonic::Status::unknown( 792 - format!("Service was not ready: {}", e.into()), 793 - ) 794 - })?; 723 + ) -> std::result::Result<tonic::Response<super::GetTrackResponse>, tonic::Status> { 724 + self.inner.ready().await.map_err(|e| { 725 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 726 + })?; 795 727 let codec = tonic::codec::ProstCodec::default(); 796 - let path = http::uri::PathAndQuery::from_static( 797 - "/rockbox.v1alpha1.LibraryService/GetTrack", 798 - ); 728 + let path = 729 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/GetTrack"); 799 730 let mut req = request.into_request(); 800 - req.extensions_mut() 801 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetTrack")); 731 + req.extensions_mut().insert(GrpcMethod::new( 732 + "rockbox.v1alpha1.LibraryService", 733 + "GetTrack", 734 + )); 802 735 self.inner.unary(req, path, codec).await 803 736 } 804 737 pub async fn like_track( 805 738 &mut self, 806 739 request: impl tonic::IntoRequest<super::LikeTrackRequest>, 807 - ) -> std::result::Result< 808 - tonic::Response<super::LikeTrackResponse>, 809 - tonic::Status, 810 - > { 811 - self.inner 812 - .ready() 813 - .await 814 - .map_err(|e| { 815 - tonic::Status::unknown( 816 - format!("Service was not ready: {}", e.into()), 817 - ) 818 - })?; 740 + ) -> std::result::Result<tonic::Response<super::LikeTrackResponse>, tonic::Status> { 741 + self.inner.ready().await.map_err(|e| { 742 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 743 + })?; 819 744 let codec = tonic::codec::ProstCodec::default(); 820 - let path = http::uri::PathAndQuery::from_static( 821 - "/rockbox.v1alpha1.LibraryService/LikeTrack", 822 - ); 745 + let path = 746 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeTrack"); 823 747 let mut req = request.into_request(); 824 - req.extensions_mut() 825 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeTrack")); 748 + req.extensions_mut().insert(GrpcMethod::new( 749 + "rockbox.v1alpha1.LibraryService", 750 + "LikeTrack", 751 + )); 826 752 self.inner.unary(req, path, codec).await 827 753 } 828 754 pub async fn unlike_track( 829 755 &mut self, 830 756 request: impl tonic::IntoRequest<super::UnlikeTrackRequest>, 831 - ) -> std::result::Result< 832 - tonic::Response<super::UnlikeTrackResponse>, 833 - tonic::Status, 834 - > { 835 - self.inner 836 - .ready() 837 - .await 838 - .map_err(|e| { 839 - tonic::Status::unknown( 840 - format!("Service was not ready: {}", e.into()), 841 - ) 842 - })?; 757 + ) -> std::result::Result<tonic::Response<super::UnlikeTrackResponse>, tonic::Status> 758 + { 759 + self.inner.ready().await.map_err(|e| { 760 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 761 + })?; 843 762 let codec = tonic::codec::ProstCodec::default(); 844 763 let path = http::uri::PathAndQuery::from_static( 845 764 "/rockbox.v1alpha1.LibraryService/UnlikeTrack", 846 765 ); 847 766 let mut req = request.into_request(); 848 - req.extensions_mut() 849 - .insert( 850 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeTrack"), 851 - ); 767 + req.extensions_mut().insert(GrpcMethod::new( 768 + "rockbox.v1alpha1.LibraryService", 769 + "UnlikeTrack", 770 + )); 852 771 self.inner.unary(req, path, codec).await 853 772 } 854 773 pub async fn like_album( 855 774 &mut self, 856 775 request: impl tonic::IntoRequest<super::LikeAlbumRequest>, 857 - ) -> std::result::Result< 858 - tonic::Response<super::LikeAlbumResponse>, 859 - tonic::Status, 860 - > { 861 - self.inner 862 - .ready() 863 - .await 864 - .map_err(|e| { 865 - tonic::Status::unknown( 866 - format!("Service was not ready: {}", e.into()), 867 - ) 868 - })?; 776 + ) -> std::result::Result<tonic::Response<super::LikeAlbumResponse>, tonic::Status> { 777 + self.inner.ready().await.map_err(|e| { 778 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 779 + })?; 869 780 let codec = tonic::codec::ProstCodec::default(); 870 - let path = http::uri::PathAndQuery::from_static( 871 - "/rockbox.v1alpha1.LibraryService/LikeAlbum", 872 - ); 781 + let path = 782 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/LikeAlbum"); 873 783 let mut req = request.into_request(); 874 - req.extensions_mut() 875 - .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "LikeAlbum")); 784 + req.extensions_mut().insert(GrpcMethod::new( 785 + "rockbox.v1alpha1.LibraryService", 786 + "LikeAlbum", 787 + )); 876 788 self.inner.unary(req, path, codec).await 877 789 } 878 790 pub async fn unlike_album( 879 791 &mut self, 880 792 request: impl tonic::IntoRequest<super::UnlikeAlbumRequest>, 881 - ) -> std::result::Result< 882 - tonic::Response<super::UnlikeAlbumResponse>, 883 - tonic::Status, 884 - > { 885 - self.inner 886 - .ready() 887 - .await 888 - .map_err(|e| { 889 - tonic::Status::unknown( 890 - format!("Service was not ready: {}", e.into()), 891 - ) 892 - })?; 793 + ) -> std::result::Result<tonic::Response<super::UnlikeAlbumResponse>, tonic::Status> 794 + { 795 + self.inner.ready().await.map_err(|e| { 796 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 797 + })?; 893 798 let codec = tonic::codec::ProstCodec::default(); 894 799 let path = http::uri::PathAndQuery::from_static( 895 800 "/rockbox.v1alpha1.LibraryService/UnlikeAlbum", 896 801 ); 897 802 let mut req = request.into_request(); 898 - req.extensions_mut() 899 - .insert( 900 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "UnlikeAlbum"), 901 - ); 803 + req.extensions_mut().insert(GrpcMethod::new( 804 + "rockbox.v1alpha1.LibraryService", 805 + "UnlikeAlbum", 806 + )); 902 807 self.inner.unary(req, path, codec).await 903 808 } 904 809 pub async fn get_liked_tracks( 905 810 &mut self, 906 811 request: impl tonic::IntoRequest<super::GetLikedTracksRequest>, 907 - ) -> std::result::Result< 908 - tonic::Response<super::GetLikedTracksResponse>, 909 - tonic::Status, 910 - > { 911 - self.inner 912 - .ready() 913 - .await 914 - .map_err(|e| { 915 - tonic::Status::unknown( 916 - format!("Service was not ready: {}", e.into()), 917 - ) 918 - })?; 812 + ) -> std::result::Result<tonic::Response<super::GetLikedTracksResponse>, tonic::Status> 813 + { 814 + self.inner.ready().await.map_err(|e| { 815 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 816 + })?; 919 817 let codec = tonic::codec::ProstCodec::default(); 920 818 let path = http::uri::PathAndQuery::from_static( 921 819 "/rockbox.v1alpha1.LibraryService/GetLikedTracks", 922 820 ); 923 821 let mut req = request.into_request(); 924 - req.extensions_mut() 925 - .insert( 926 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedTracks"), 927 - ); 822 + req.extensions_mut().insert(GrpcMethod::new( 823 + "rockbox.v1alpha1.LibraryService", 824 + "GetLikedTracks", 825 + )); 928 826 self.inner.unary(req, path, codec).await 929 827 } 930 828 pub async fn get_liked_albums( 931 829 &mut self, 932 830 request: impl tonic::IntoRequest<super::GetLikedAlbumsRequest>, 933 - ) -> std::result::Result< 934 - tonic::Response<super::GetLikedAlbumsResponse>, 935 - tonic::Status, 936 - > { 937 - self.inner 938 - .ready() 939 - .await 940 - .map_err(|e| { 941 - tonic::Status::unknown( 942 - format!("Service was not ready: {}", e.into()), 943 - ) 944 - })?; 831 + ) -> std::result::Result<tonic::Response<super::GetLikedAlbumsResponse>, tonic::Status> 832 + { 833 + self.inner.ready().await.map_err(|e| { 834 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 835 + })?; 945 836 let codec = tonic::codec::ProstCodec::default(); 946 837 let path = http::uri::PathAndQuery::from_static( 947 838 "/rockbox.v1alpha1.LibraryService/GetLikedAlbums", 948 839 ); 949 840 let mut req = request.into_request(); 950 - req.extensions_mut() 951 - .insert( 952 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "GetLikedAlbums"), 953 - ); 841 + req.extensions_mut().insert(GrpcMethod::new( 842 + "rockbox.v1alpha1.LibraryService", 843 + "GetLikedAlbums", 844 + )); 954 845 self.inner.unary(req, path, codec).await 955 846 } 956 847 pub async fn scan_library( 957 848 &mut self, 958 849 request: impl tonic::IntoRequest<super::ScanLibraryRequest>, 959 - ) -> std::result::Result< 960 - tonic::Response<super::ScanLibraryResponse>, 961 - tonic::Status, 962 - > { 963 - self.inner 964 - .ready() 965 - .await 966 - .map_err(|e| { 967 - tonic::Status::unknown( 968 - format!("Service was not ready: {}", e.into()), 969 - ) 970 - })?; 850 + ) -> std::result::Result<tonic::Response<super::ScanLibraryResponse>, tonic::Status> 851 + { 852 + self.inner.ready().await.map_err(|e| { 853 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 854 + })?; 971 855 let codec = tonic::codec::ProstCodec::default(); 972 856 let path = http::uri::PathAndQuery::from_static( 973 857 "/rockbox.v1alpha1.LibraryService/ScanLibrary", 974 858 ); 975 859 let mut req = request.into_request(); 976 - req.extensions_mut() 977 - .insert( 978 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "ScanLibrary"), 979 - ); 860 + req.extensions_mut().insert(GrpcMethod::new( 861 + "rockbox.v1alpha1.LibraryService", 862 + "ScanLibrary", 863 + )); 980 864 self.inner.unary(req, path, codec).await 981 865 } 982 866 pub async fn stream_library( ··· 986 870 tonic::Response<tonic::codec::Streaming<super::StreamLibraryResponse>>, 987 871 tonic::Status, 988 872 > { 989 - self.inner 990 - .ready() 991 - .await 992 - .map_err(|e| { 993 - tonic::Status::unknown( 994 - format!("Service was not ready: {}", e.into()), 995 - ) 996 - })?; 873 + self.inner.ready().await.map_err(|e| { 874 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 875 + })?; 997 876 let codec = tonic::codec::ProstCodec::default(); 998 877 let path = http::uri::PathAndQuery::from_static( 999 878 "/rockbox.v1alpha1.LibraryService/StreamLibrary", 1000 879 ); 1001 880 let mut req = request.into_request(); 1002 - req.extensions_mut() 1003 - .insert( 1004 - GrpcMethod::new("rockbox.v1alpha1.LibraryService", "StreamLibrary"), 1005 - ); 881 + req.extensions_mut().insert(GrpcMethod::new( 882 + "rockbox.v1alpha1.LibraryService", 883 + "StreamLibrary", 884 + )); 1006 885 self.inner.server_streaming(req, path, codec).await 1007 886 } 1008 887 pub async fn search( 1009 888 &mut self, 1010 889 request: impl tonic::IntoRequest<super::SearchRequest>, 1011 890 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> { 1012 - self.inner 1013 - .ready() 1014 - .await 1015 - .map_err(|e| { 1016 - tonic::Status::unknown( 1017 - format!("Service was not ready: {}", e.into()), 1018 - ) 1019 - })?; 891 + self.inner.ready().await.map_err(|e| { 892 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 893 + })?; 1020 894 let codec = tonic::codec::ProstCodec::default(); 1021 - let path = http::uri::PathAndQuery::from_static( 1022 - "/rockbox.v1alpha1.LibraryService/Search", 1023 - ); 895 + let path = 896 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.LibraryService/Search"); 1024 897 let mut req = request.into_request(); 1025 898 req.extensions_mut() 1026 899 .insert(GrpcMethod::new("rockbox.v1alpha1.LibraryService", "Search")); ··· 1035 908 dead_code, 1036 909 missing_docs, 1037 910 clippy::wildcard_imports, 1038 - clippy::let_unit_value, 911 + clippy::let_unit_value 1039 912 )] 1040 913 use tonic::codegen::*; 1041 914 /// Generated trait containing gRPC methods that should be implemented for use with LibraryServiceServer. ··· 1044 917 async fn get_albums( 1045 918 &self, 1046 919 request: tonic::Request<super::GetAlbumsRequest>, 1047 - ) -> std::result::Result< 1048 - tonic::Response<super::GetAlbumsResponse>, 1049 - tonic::Status, 1050 - >; 920 + ) -> std::result::Result<tonic::Response<super::GetAlbumsResponse>, tonic::Status>; 1051 921 async fn get_artists( 1052 922 &self, 1053 923 request: tonic::Request<super::GetArtistsRequest>, 1054 - ) -> std::result::Result< 1055 - tonic::Response<super::GetArtistsResponse>, 1056 - tonic::Status, 1057 - >; 924 + ) -> std::result::Result<tonic::Response<super::GetArtistsResponse>, tonic::Status>; 1058 925 async fn get_tracks( 1059 926 &self, 1060 927 request: tonic::Request<super::GetTracksRequest>, 1061 - ) -> std::result::Result< 1062 - tonic::Response<super::GetTracksResponse>, 1063 - tonic::Status, 1064 - >; 928 + ) -> std::result::Result<tonic::Response<super::GetTracksResponse>, tonic::Status>; 1065 929 async fn get_album( 1066 930 &self, 1067 931 request: tonic::Request<super::GetAlbumRequest>, 1068 - ) -> std::result::Result< 1069 - tonic::Response<super::GetAlbumResponse>, 1070 - tonic::Status, 1071 - >; 932 + ) -> std::result::Result<tonic::Response<super::GetAlbumResponse>, tonic::Status>; 1072 933 async fn get_artist( 1073 934 &self, 1074 935 request: tonic::Request<super::GetArtistRequest>, 1075 - ) -> std::result::Result< 1076 - tonic::Response<super::GetArtistResponse>, 1077 - tonic::Status, 1078 - >; 936 + ) -> std::result::Result<tonic::Response<super::GetArtistResponse>, tonic::Status>; 1079 937 async fn get_track( 1080 938 &self, 1081 939 request: tonic::Request<super::GetTrackRequest>, 1082 - ) -> std::result::Result< 1083 - tonic::Response<super::GetTrackResponse>, 1084 - tonic::Status, 1085 - >; 940 + ) -> std::result::Result<tonic::Response<super::GetTrackResponse>, tonic::Status>; 1086 941 async fn like_track( 1087 942 &self, 1088 943 request: tonic::Request<super::LikeTrackRequest>, 1089 - ) -> std::result::Result< 1090 - tonic::Response<super::LikeTrackResponse>, 1091 - tonic::Status, 1092 - >; 944 + ) -> std::result::Result<tonic::Response<super::LikeTrackResponse>, tonic::Status>; 1093 945 async fn unlike_track( 1094 946 &self, 1095 947 request: tonic::Request<super::UnlikeTrackRequest>, 1096 - ) -> std::result::Result< 1097 - tonic::Response<super::UnlikeTrackResponse>, 1098 - tonic::Status, 1099 - >; 948 + ) -> std::result::Result<tonic::Response<super::UnlikeTrackResponse>, tonic::Status>; 1100 949 async fn like_album( 1101 950 &self, 1102 951 request: tonic::Request<super::LikeAlbumRequest>, 1103 - ) -> std::result::Result< 1104 - tonic::Response<super::LikeAlbumResponse>, 1105 - tonic::Status, 1106 - >; 952 + ) -> std::result::Result<tonic::Response<super::LikeAlbumResponse>, tonic::Status>; 1107 953 async fn unlike_album( 1108 954 &self, 1109 955 request: tonic::Request<super::UnlikeAlbumRequest>, 1110 - ) -> std::result::Result< 1111 - tonic::Response<super::UnlikeAlbumResponse>, 1112 - tonic::Status, 1113 - >; 956 + ) -> std::result::Result<tonic::Response<super::UnlikeAlbumResponse>, tonic::Status>; 1114 957 async fn get_liked_tracks( 1115 958 &self, 1116 959 request: tonic::Request<super::GetLikedTracksRequest>, 1117 - ) -> std::result::Result< 1118 - tonic::Response<super::GetLikedTracksResponse>, 1119 - tonic::Status, 1120 - >; 960 + ) -> std::result::Result<tonic::Response<super::GetLikedTracksResponse>, tonic::Status>; 1121 961 async fn get_liked_albums( 1122 962 &self, 1123 963 request: tonic::Request<super::GetLikedAlbumsRequest>, 1124 - ) -> std::result::Result< 1125 - tonic::Response<super::GetLikedAlbumsResponse>, 1126 - tonic::Status, 1127 - >; 964 + ) -> std::result::Result<tonic::Response<super::GetLikedAlbumsResponse>, tonic::Status>; 1128 965 async fn scan_library( 1129 966 &self, 1130 967 request: tonic::Request<super::ScanLibraryRequest>, 1131 - ) -> std::result::Result< 1132 - tonic::Response<super::ScanLibraryResponse>, 1133 - tonic::Status, 1134 - >; 968 + ) -> std::result::Result<tonic::Response<super::ScanLibraryResponse>, tonic::Status>; 1135 969 /// Server streaming response type for the StreamLibrary method. 1136 970 type StreamLibraryStream: tonic::codegen::tokio_stream::Stream< 1137 971 Item = std::result::Result<super::StreamLibraryResponse, tonic::Status>, 1138 - > 1139 - + std::marker::Send 972 + > + std::marker::Send 1140 973 + 'static; 1141 974 async fn stream_library( 1142 975 &self, 1143 976 request: tonic::Request<super::StreamLibraryRequest>, 1144 - ) -> std::result::Result< 1145 - tonic::Response<Self::StreamLibraryStream>, 1146 - tonic::Status, 1147 - >; 977 + ) -> std::result::Result<tonic::Response<Self::StreamLibraryStream>, tonic::Status>; 1148 978 async fn search( 1149 979 &self, 1150 980 request: tonic::Request<super::SearchRequest>, ··· 1171 1001 max_encoding_message_size: None, 1172 1002 } 1173 1003 } 1174 - pub fn with_interceptor<F>( 1175 - inner: T, 1176 - interceptor: F, 1177 - ) -> InterceptedService<Self, F> 1004 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 1178 1005 where 1179 1006 F: tonic::service::Interceptor, 1180 1007 { ··· 1229 1056 "/rockbox.v1alpha1.LibraryService/GetAlbums" => { 1230 1057 #[allow(non_camel_case_types)] 1231 1058 struct GetAlbumsSvc<T: LibraryService>(pub Arc<T>); 1232 - impl< 1233 - T: LibraryService, 1234 - > tonic::server::UnaryService<super::GetAlbumsRequest> 1235 - for GetAlbumsSvc<T> { 1059 + impl<T: LibraryService> tonic::server::UnaryService<super::GetAlbumsRequest> for GetAlbumsSvc<T> { 1236 1060 type Response = super::GetAlbumsResponse; 1237 - type Future = BoxFuture< 1238 - tonic::Response<Self::Response>, 1239 - tonic::Status, 1240 - >; 1061 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1241 1062 fn call( 1242 1063 &mut self, 1243 1064 request: tonic::Request<super::GetAlbumsRequest>, ··· 1274 1095 "/rockbox.v1alpha1.LibraryService/GetArtists" => { 1275 1096 #[allow(non_camel_case_types)] 1276 1097 struct GetArtistsSvc<T: LibraryService>(pub Arc<T>); 1277 - impl< 1278 - T: LibraryService, 1279 - > tonic::server::UnaryService<super::GetArtistsRequest> 1280 - for GetArtistsSvc<T> { 1098 + impl<T: LibraryService> tonic::server::UnaryService<super::GetArtistsRequest> for GetArtistsSvc<T> { 1281 1099 type Response = super::GetArtistsResponse; 1282 - type Future = BoxFuture< 1283 - tonic::Response<Self::Response>, 1284 - tonic::Status, 1285 - >; 1100 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1286 1101 fn call( 1287 1102 &mut self, 1288 1103 request: tonic::Request<super::GetArtistsRequest>, ··· 1319 1134 "/rockbox.v1alpha1.LibraryService/GetTracks" => { 1320 1135 #[allow(non_camel_case_types)] 1321 1136 struct GetTracksSvc<T: LibraryService>(pub Arc<T>); 1322 - impl< 1323 - T: LibraryService, 1324 - > tonic::server::UnaryService<super::GetTracksRequest> 1325 - for GetTracksSvc<T> { 1137 + impl<T: LibraryService> tonic::server::UnaryService<super::GetTracksRequest> for GetTracksSvc<T> { 1326 1138 type Response = super::GetTracksResponse; 1327 - type Future = BoxFuture< 1328 - tonic::Response<Self::Response>, 1329 - tonic::Status, 1330 - >; 1139 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1331 1140 fn call( 1332 1141 &mut self, 1333 1142 request: tonic::Request<super::GetTracksRequest>, ··· 1364 1173 "/rockbox.v1alpha1.LibraryService/GetAlbum" => { 1365 1174 #[allow(non_camel_case_types)] 1366 1175 struct GetAlbumSvc<T: LibraryService>(pub Arc<T>); 1367 - impl< 1368 - T: LibraryService, 1369 - > tonic::server::UnaryService<super::GetAlbumRequest> 1370 - for GetAlbumSvc<T> { 1176 + impl<T: LibraryService> tonic::server::UnaryService<super::GetAlbumRequest> for GetAlbumSvc<T> { 1371 1177 type Response = super::GetAlbumResponse; 1372 - type Future = BoxFuture< 1373 - tonic::Response<Self::Response>, 1374 - tonic::Status, 1375 - >; 1178 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1376 1179 fn call( 1377 1180 &mut self, 1378 1181 request: tonic::Request<super::GetAlbumRequest>, ··· 1409 1212 "/rockbox.v1alpha1.LibraryService/GetArtist" => { 1410 1213 #[allow(non_camel_case_types)] 1411 1214 struct GetArtistSvc<T: LibraryService>(pub Arc<T>); 1412 - impl< 1413 - T: LibraryService, 1414 - > tonic::server::UnaryService<super::GetArtistRequest> 1415 - for GetArtistSvc<T> { 1215 + impl<T: LibraryService> tonic::server::UnaryService<super::GetArtistRequest> for GetArtistSvc<T> { 1416 1216 type Response = super::GetArtistResponse; 1417 - type Future = BoxFuture< 1418 - tonic::Response<Self::Response>, 1419 - tonic::Status, 1420 - >; 1217 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1421 1218 fn call( 1422 1219 &mut self, 1423 1220 request: tonic::Request<super::GetArtistRequest>, ··· 1454 1251 "/rockbox.v1alpha1.LibraryService/GetTrack" => { 1455 1252 #[allow(non_camel_case_types)] 1456 1253 struct GetTrackSvc<T: LibraryService>(pub Arc<T>); 1457 - impl< 1458 - T: LibraryService, 1459 - > tonic::server::UnaryService<super::GetTrackRequest> 1460 - for GetTrackSvc<T> { 1254 + impl<T: LibraryService> tonic::server::UnaryService<super::GetTrackRequest> for GetTrackSvc<T> { 1461 1255 type Response = super::GetTrackResponse; 1462 - type Future = BoxFuture< 1463 - tonic::Response<Self::Response>, 1464 - tonic::Status, 1465 - >; 1256 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1466 1257 fn call( 1467 1258 &mut self, 1468 1259 request: tonic::Request<super::GetTrackRequest>, ··· 1499 1290 "/rockbox.v1alpha1.LibraryService/LikeTrack" => { 1500 1291 #[allow(non_camel_case_types)] 1501 1292 struct LikeTrackSvc<T: LibraryService>(pub Arc<T>); 1502 - impl< 1503 - T: LibraryService, 1504 - > tonic::server::UnaryService<super::LikeTrackRequest> 1505 - for LikeTrackSvc<T> { 1293 + impl<T: LibraryService> tonic::server::UnaryService<super::LikeTrackRequest> for LikeTrackSvc<T> { 1506 1294 type Response = super::LikeTrackResponse; 1507 - type Future = BoxFuture< 1508 - tonic::Response<Self::Response>, 1509 - tonic::Status, 1510 - >; 1295 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1511 1296 fn call( 1512 1297 &mut self, 1513 1298 request: tonic::Request<super::LikeTrackRequest>, ··· 1544 1329 "/rockbox.v1alpha1.LibraryService/UnlikeTrack" => { 1545 1330 #[allow(non_camel_case_types)] 1546 1331 struct UnlikeTrackSvc<T: LibraryService>(pub Arc<T>); 1547 - impl< 1548 - T: LibraryService, 1549 - > tonic::server::UnaryService<super::UnlikeTrackRequest> 1550 - for UnlikeTrackSvc<T> { 1332 + impl<T: LibraryService> tonic::server::UnaryService<super::UnlikeTrackRequest> 1333 + for UnlikeTrackSvc<T> 1334 + { 1551 1335 type Response = super::UnlikeTrackResponse; 1552 - type Future = BoxFuture< 1553 - tonic::Response<Self::Response>, 1554 - tonic::Status, 1555 - >; 1336 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1556 1337 fn call( 1557 1338 &mut self, 1558 1339 request: tonic::Request<super::UnlikeTrackRequest>, ··· 1589 1370 "/rockbox.v1alpha1.LibraryService/LikeAlbum" => { 1590 1371 #[allow(non_camel_case_types)] 1591 1372 struct LikeAlbumSvc<T: LibraryService>(pub Arc<T>); 1592 - impl< 1593 - T: LibraryService, 1594 - > tonic::server::UnaryService<super::LikeAlbumRequest> 1595 - for LikeAlbumSvc<T> { 1373 + impl<T: LibraryService> tonic::server::UnaryService<super::LikeAlbumRequest> for LikeAlbumSvc<T> { 1596 1374 type Response = super::LikeAlbumResponse; 1597 - type Future = BoxFuture< 1598 - tonic::Response<Self::Response>, 1599 - tonic::Status, 1600 - >; 1375 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1601 1376 fn call( 1602 1377 &mut self, 1603 1378 request: tonic::Request<super::LikeAlbumRequest>, ··· 1634 1409 "/rockbox.v1alpha1.LibraryService/UnlikeAlbum" => { 1635 1410 #[allow(non_camel_case_types)] 1636 1411 struct UnlikeAlbumSvc<T: LibraryService>(pub Arc<T>); 1637 - impl< 1638 - T: LibraryService, 1639 - > tonic::server::UnaryService<super::UnlikeAlbumRequest> 1640 - for UnlikeAlbumSvc<T> { 1412 + impl<T: LibraryService> tonic::server::UnaryService<super::UnlikeAlbumRequest> 1413 + for UnlikeAlbumSvc<T> 1414 + { 1641 1415 type Response = super::UnlikeAlbumResponse; 1642 - type Future = BoxFuture< 1643 - tonic::Response<Self::Response>, 1644 - tonic::Status, 1645 - >; 1416 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1646 1417 fn call( 1647 1418 &mut self, 1648 1419 request: tonic::Request<super::UnlikeAlbumRequest>, ··· 1679 1450 "/rockbox.v1alpha1.LibraryService/GetLikedTracks" => { 1680 1451 #[allow(non_camel_case_types)] 1681 1452 struct GetLikedTracksSvc<T: LibraryService>(pub Arc<T>); 1682 - impl< 1683 - T: LibraryService, 1684 - > tonic::server::UnaryService<super::GetLikedTracksRequest> 1685 - for GetLikedTracksSvc<T> { 1453 + impl<T: LibraryService> 1454 + tonic::server::UnaryService<super::GetLikedTracksRequest> 1455 + for GetLikedTracksSvc<T> 1456 + { 1686 1457 type Response = super::GetLikedTracksResponse; 1687 - type Future = BoxFuture< 1688 - tonic::Response<Self::Response>, 1689 - tonic::Status, 1690 - >; 1458 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1691 1459 fn call( 1692 1460 &mut self, 1693 1461 request: tonic::Request<super::GetLikedTracksRequest>, 1694 1462 ) -> Self::Future { 1695 1463 let inner = Arc::clone(&self.0); 1696 1464 let fut = async move { 1697 - <T as LibraryService>::get_liked_tracks(&inner, request) 1698 - .await 1465 + <T as LibraryService>::get_liked_tracks(&inner, request).await 1699 1466 }; 1700 1467 Box::pin(fut) 1701 1468 } ··· 1725 1492 "/rockbox.v1alpha1.LibraryService/GetLikedAlbums" => { 1726 1493 #[allow(non_camel_case_types)] 1727 1494 struct GetLikedAlbumsSvc<T: LibraryService>(pub Arc<T>); 1728 - impl< 1729 - T: LibraryService, 1730 - > tonic::server::UnaryService<super::GetLikedAlbumsRequest> 1731 - for GetLikedAlbumsSvc<T> { 1495 + impl<T: LibraryService> 1496 + tonic::server::UnaryService<super::GetLikedAlbumsRequest> 1497 + for GetLikedAlbumsSvc<T> 1498 + { 1732 1499 type Response = super::GetLikedAlbumsResponse; 1733 - type Future = BoxFuture< 1734 - tonic::Response<Self::Response>, 1735 - tonic::Status, 1736 - >; 1500 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1737 1501 fn call( 1738 1502 &mut self, 1739 1503 request: tonic::Request<super::GetLikedAlbumsRequest>, 1740 1504 ) -> Self::Future { 1741 1505 let inner = Arc::clone(&self.0); 1742 1506 let fut = async move { 1743 - <T as LibraryService>::get_liked_albums(&inner, request) 1744 - .await 1507 + <T as LibraryService>::get_liked_albums(&inner, request).await 1745 1508 }; 1746 1509 Box::pin(fut) 1747 1510 } ··· 1771 1534 "/rockbox.v1alpha1.LibraryService/ScanLibrary" => { 1772 1535 #[allow(non_camel_case_types)] 1773 1536 struct ScanLibrarySvc<T: LibraryService>(pub Arc<T>); 1774 - impl< 1775 - T: LibraryService, 1776 - > tonic::server::UnaryService<super::ScanLibraryRequest> 1777 - for ScanLibrarySvc<T> { 1537 + impl<T: LibraryService> tonic::server::UnaryService<super::ScanLibraryRequest> 1538 + for ScanLibrarySvc<T> 1539 + { 1778 1540 type Response = super::ScanLibraryResponse; 1779 - type Future = BoxFuture< 1780 - tonic::Response<Self::Response>, 1781 - tonic::Status, 1782 - >; 1541 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1783 1542 fn call( 1784 1543 &mut self, 1785 1544 request: tonic::Request<super::ScanLibraryRequest>, ··· 1816 1575 "/rockbox.v1alpha1.LibraryService/StreamLibrary" => { 1817 1576 #[allow(non_camel_case_types)] 1818 1577 struct StreamLibrarySvc<T: LibraryService>(pub Arc<T>); 1819 - impl< 1820 - T: LibraryService, 1821 - > tonic::server::ServerStreamingService<super::StreamLibraryRequest> 1822 - for StreamLibrarySvc<T> { 1578 + impl<T: LibraryService> 1579 + tonic::server::ServerStreamingService<super::StreamLibraryRequest> 1580 + for StreamLibrarySvc<T> 1581 + { 1823 1582 type Response = super::StreamLibraryResponse; 1824 1583 type ResponseStream = T::StreamLibraryStream; 1825 - type Future = BoxFuture< 1826 - tonic::Response<Self::ResponseStream>, 1827 - tonic::Status, 1828 - >; 1584 + type Future = 1585 + BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>; 1829 1586 fn call( 1830 1587 &mut self, 1831 1588 request: tonic::Request<super::StreamLibraryRequest>, ··· 1862 1619 "/rockbox.v1alpha1.LibraryService/Search" => { 1863 1620 #[allow(non_camel_case_types)] 1864 1621 struct SearchSvc<T: LibraryService>(pub Arc<T>); 1865 - impl< 1866 - T: LibraryService, 1867 - > tonic::server::UnaryService<super::SearchRequest> 1868 - for SearchSvc<T> { 1622 + impl<T: LibraryService> tonic::server::UnaryService<super::SearchRequest> for SearchSvc<T> { 1869 1623 type Response = super::SearchResponse; 1870 - type Future = BoxFuture< 1871 - tonic::Response<Self::Response>, 1872 - tonic::Status, 1873 - >; 1624 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 1874 1625 fn call( 1875 1626 &mut self, 1876 1627 request: tonic::Request<super::SearchRequest>, 1877 1628 ) -> Self::Future { 1878 1629 let inner = Arc::clone(&self.0); 1879 - let fut = async move { 1880 - <T as LibraryService>::search(&inner, request).await 1881 - }; 1630 + let fut = 1631 + async move { <T as LibraryService>::search(&inner, request).await }; 1882 1632 Box::pin(fut) 1883 1633 } 1884 1634 } ··· 1904 1654 }; 1905 1655 Box::pin(fut) 1906 1656 } 1907 - _ => { 1908 - Box::pin(async move { 1909 - let mut response = http::Response::new(empty_body()); 1910 - let headers = response.headers_mut(); 1911 - headers 1912 - .insert( 1913 - tonic::Status::GRPC_STATUS, 1914 - (tonic::Code::Unimplemented as i32).into(), 1915 - ); 1916 - headers 1917 - .insert( 1918 - http::header::CONTENT_TYPE, 1919 - tonic::metadata::GRPC_CONTENT_TYPE, 1920 - ); 1921 - Ok(response) 1922 - }) 1923 - } 1657 + _ => Box::pin(async move { 1658 + let mut response = http::Response::new(empty_body()); 1659 + let headers = response.headers_mut(); 1660 + headers.insert( 1661 + tonic::Status::GRPC_STATUS, 1662 + (tonic::Code::Unimplemented as i32).into(), 1663 + ); 1664 + headers.insert( 1665 + http::header::CONTENT_TYPE, 1666 + tonic::metadata::GRPC_CONTENT_TYPE, 1667 + ); 1668 + Ok(response) 1669 + }), 1924 1670 } 1925 1671 } 1926 1672 } ··· 1949 1695 dead_code, 1950 1696 missing_docs, 1951 1697 clippy::wildcard_imports, 1952 - clippy::let_unit_value, 1698 + clippy::let_unit_value 1953 1699 )] 1954 - use tonic::codegen::*; 1955 1700 use tonic::codegen::http::Uri; 1701 + use tonic::codegen::*; 1956 1702 #[derive(Debug, Clone)] 1957 1703 pub struct MetadataServiceClient<T> { 1958 1704 inner: tonic::client::Grpc<T>, ··· 1996 1742 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 1997 1743 >, 1998 1744 >, 1999 - <T as tonic::codegen::Service< 2000 - http::Request<tonic::body::BoxBody>, 2001 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 1745 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 1746 + Into<StdError> + std::marker::Send + std::marker::Sync, 2002 1747 { 2003 1748 MetadataServiceClient::new(InterceptedService::new(inner, interceptor)) 2004 1749 } ··· 2042 1787 dead_code, 2043 1788 missing_docs, 2044 1789 clippy::wildcard_imports, 2045 - clippy::let_unit_value, 1790 + clippy::let_unit_value 2046 1791 )] 2047 1792 use tonic::codegen::*; 2048 1793 /// Generated trait containing gRPC methods that should be implemented for use with MetadataServiceServer. ··· 2069 1814 max_encoding_message_size: None, 2070 1815 } 2071 1816 } 2072 - pub fn with_interceptor<F>( 2073 - inner: T, 2074 - interceptor: F, 2075 - ) -> InterceptedService<Self, F> 1817 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 2076 1818 where 2077 1819 F: tonic::service::Interceptor, 2078 1820 { ··· 2124 1866 } 2125 1867 fn call(&mut self, req: http::Request<B>) -> Self::Future { 2126 1868 match req.uri().path() { 2127 - _ => { 2128 - Box::pin(async move { 2129 - let mut response = http::Response::new(empty_body()); 2130 - let headers = response.headers_mut(); 2131 - headers 2132 - .insert( 2133 - tonic::Status::GRPC_STATUS, 2134 - (tonic::Code::Unimplemented as i32).into(), 2135 - ); 2136 - headers 2137 - .insert( 2138 - http::header::CONTENT_TYPE, 2139 - tonic::metadata::GRPC_CONTENT_TYPE, 2140 - ); 2141 - Ok(response) 2142 - }) 2143 - } 1869 + _ => Box::pin(async move { 1870 + let mut response = http::Response::new(empty_body()); 1871 + let headers = response.headers_mut(); 1872 + headers.insert( 1873 + tonic::Status::GRPC_STATUS, 1874 + (tonic::Code::Unimplemented as i32).into(), 1875 + ); 1876 + headers.insert( 1877 + http::header::CONTENT_TYPE, 1878 + tonic::metadata::GRPC_CONTENT_TYPE, 1879 + ); 1880 + Ok(response) 1881 + }), 2144 1882 } 2145 1883 } 2146 1884 } ··· 2424 2162 dead_code, 2425 2163 missing_docs, 2426 2164 clippy::wildcard_imports, 2427 - clippy::let_unit_value, 2165 + clippy::let_unit_value 2428 2166 )] 2429 - use tonic::codegen::*; 2430 2167 use tonic::codegen::http::Uri; 2168 + use tonic::codegen::*; 2431 2169 #[derive(Debug, Clone)] 2432 2170 pub struct PlaybackServiceClient<T> { 2433 2171 inner: tonic::client::Grpc<T>, ··· 2471 2209 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 2472 2210 >, 2473 2211 >, 2474 - <T as tonic::codegen::Service< 2475 - http::Request<tonic::body::BoxBody>, 2476 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 2212 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 2213 + Into<StdError> + std::marker::Send + std::marker::Sync, 2477 2214 { 2478 2215 PlaybackServiceClient::new(InterceptedService::new(inner, interceptor)) 2479 2216 } ··· 2512 2249 &mut self, 2513 2250 request: impl tonic::IntoRequest<super::PlayRequest>, 2514 2251 ) -> std::result::Result<tonic::Response<super::PlayResponse>, tonic::Status> { 2515 - self.inner 2516 - .ready() 2517 - .await 2518 - .map_err(|e| { 2519 - tonic::Status::unknown( 2520 - format!("Service was not ready: {}", e.into()), 2521 - ) 2522 - })?; 2252 + self.inner.ready().await.map_err(|e| { 2253 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2254 + })?; 2523 2255 let codec = tonic::codec::ProstCodec::default(); 2524 - let path = http::uri::PathAndQuery::from_static( 2525 - "/rockbox.v1alpha1.PlaybackService/Play", 2526 - ); 2256 + let path = 2257 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Play"); 2527 2258 let mut req = request.into_request(); 2528 2259 req.extensions_mut() 2529 2260 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Play")); ··· 2533 2264 &mut self, 2534 2265 request: impl tonic::IntoRequest<super::PauseRequest>, 2535 2266 ) -> std::result::Result<tonic::Response<super::PauseResponse>, tonic::Status> { 2536 - self.inner 2537 - .ready() 2538 - .await 2539 - .map_err(|e| { 2540 - tonic::Status::unknown( 2541 - format!("Service was not ready: {}", e.into()), 2542 - ) 2543 - })?; 2267 + self.inner.ready().await.map_err(|e| { 2268 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2269 + })?; 2544 2270 let codec = tonic::codec::ProstCodec::default(); 2545 - let path = http::uri::PathAndQuery::from_static( 2546 - "/rockbox.v1alpha1.PlaybackService/Pause", 2547 - ); 2271 + let path = 2272 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Pause"); 2548 2273 let mut req = request.into_request(); 2549 2274 req.extensions_mut() 2550 2275 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Pause")); ··· 2553 2278 pub async fn play_or_pause( 2554 2279 &mut self, 2555 2280 request: impl tonic::IntoRequest<super::PlayOrPauseRequest>, 2556 - ) -> std::result::Result< 2557 - tonic::Response<super::PlayOrPauseResponse>, 2558 - tonic::Status, 2559 - > { 2560 - self.inner 2561 - .ready() 2562 - .await 2563 - .map_err(|e| { 2564 - tonic::Status::unknown( 2565 - format!("Service was not ready: {}", e.into()), 2566 - ) 2567 - })?; 2281 + ) -> std::result::Result<tonic::Response<super::PlayOrPauseResponse>, tonic::Status> 2282 + { 2283 + self.inner.ready().await.map_err(|e| { 2284 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2285 + })?; 2568 2286 let codec = tonic::codec::ProstCodec::default(); 2569 2287 let path = http::uri::PathAndQuery::from_static( 2570 2288 "/rockbox.v1alpha1.PlaybackService/PlayOrPause", 2571 2289 ); 2572 2290 let mut req = request.into_request(); 2573 - req.extensions_mut() 2574 - .insert( 2575 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayOrPause"), 2576 - ); 2291 + req.extensions_mut().insert(GrpcMethod::new( 2292 + "rockbox.v1alpha1.PlaybackService", 2293 + "PlayOrPause", 2294 + )); 2577 2295 self.inner.unary(req, path, codec).await 2578 2296 } 2579 2297 pub async fn resume( 2580 2298 &mut self, 2581 2299 request: impl tonic::IntoRequest<super::ResumeRequest>, 2582 2300 ) -> std::result::Result<tonic::Response<super::ResumeResponse>, tonic::Status> { 2583 - self.inner 2584 - .ready() 2585 - .await 2586 - .map_err(|e| { 2587 - tonic::Status::unknown( 2588 - format!("Service was not ready: {}", e.into()), 2589 - ) 2590 - })?; 2301 + self.inner.ready().await.map_err(|e| { 2302 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2303 + })?; 2591 2304 let codec = tonic::codec::ProstCodec::default(); 2592 - let path = http::uri::PathAndQuery::from_static( 2593 - "/rockbox.v1alpha1.PlaybackService/Resume", 2594 - ); 2305 + let path = 2306 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Resume"); 2595 2307 let mut req = request.into_request(); 2596 - req.extensions_mut() 2597 - .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Resume")); 2308 + req.extensions_mut().insert(GrpcMethod::new( 2309 + "rockbox.v1alpha1.PlaybackService", 2310 + "Resume", 2311 + )); 2598 2312 self.inner.unary(req, path, codec).await 2599 2313 } 2600 2314 pub async fn next( 2601 2315 &mut self, 2602 2316 request: impl tonic::IntoRequest<super::NextRequest>, 2603 2317 ) -> std::result::Result<tonic::Response<super::NextResponse>, tonic::Status> { 2604 - self.inner 2605 - .ready() 2606 - .await 2607 - .map_err(|e| { 2608 - tonic::Status::unknown( 2609 - format!("Service was not ready: {}", e.into()), 2610 - ) 2611 - })?; 2318 + self.inner.ready().await.map_err(|e| { 2319 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2320 + })?; 2612 2321 let codec = tonic::codec::ProstCodec::default(); 2613 - let path = http::uri::PathAndQuery::from_static( 2614 - "/rockbox.v1alpha1.PlaybackService/Next", 2615 - ); 2322 + let path = 2323 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Next"); 2616 2324 let mut req = request.into_request(); 2617 2325 req.extensions_mut() 2618 2326 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Next")); ··· 2621 2329 pub async fn previous( 2622 2330 &mut self, 2623 2331 request: impl tonic::IntoRequest<super::PreviousRequest>, 2624 - ) -> std::result::Result< 2625 - tonic::Response<super::PreviousResponse>, 2626 - tonic::Status, 2627 - > { 2628 - self.inner 2629 - .ready() 2630 - .await 2631 - .map_err(|e| { 2632 - tonic::Status::unknown( 2633 - format!("Service was not ready: {}", e.into()), 2634 - ) 2635 - })?; 2332 + ) -> std::result::Result<tonic::Response<super::PreviousResponse>, tonic::Status> { 2333 + self.inner.ready().await.map_err(|e| { 2334 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2335 + })?; 2636 2336 let codec = tonic::codec::ProstCodec::default(); 2637 - let path = http::uri::PathAndQuery::from_static( 2638 - "/rockbox.v1alpha1.PlaybackService/Previous", 2639 - ); 2337 + let path = 2338 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Previous"); 2640 2339 let mut req = request.into_request(); 2641 - req.extensions_mut() 2642 - .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Previous")); 2340 + req.extensions_mut().insert(GrpcMethod::new( 2341 + "rockbox.v1alpha1.PlaybackService", 2342 + "Previous", 2343 + )); 2643 2344 self.inner.unary(req, path, codec).await 2644 2345 } 2645 2346 pub async fn fast_forward_rewind( 2646 2347 &mut self, 2647 2348 request: impl tonic::IntoRequest<super::FastForwardRewindRequest>, 2648 - ) -> std::result::Result< 2649 - tonic::Response<super::FastForwardRewindResponse>, 2650 - tonic::Status, 2651 - > { 2652 - self.inner 2653 - .ready() 2654 - .await 2655 - .map_err(|e| { 2656 - tonic::Status::unknown( 2657 - format!("Service was not ready: {}", e.into()), 2658 - ) 2659 - })?; 2349 + ) -> std::result::Result<tonic::Response<super::FastForwardRewindResponse>, tonic::Status> 2350 + { 2351 + self.inner.ready().await.map_err(|e| { 2352 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2353 + })?; 2660 2354 let codec = tonic::codec::ProstCodec::default(); 2661 2355 let path = http::uri::PathAndQuery::from_static( 2662 2356 "/rockbox.v1alpha1.PlaybackService/FastForwardRewind", 2663 2357 ); 2664 2358 let mut req = request.into_request(); 2665 - req.extensions_mut() 2666 - .insert( 2667 - GrpcMethod::new( 2668 - "rockbox.v1alpha1.PlaybackService", 2669 - "FastForwardRewind", 2670 - ), 2671 - ); 2359 + req.extensions_mut().insert(GrpcMethod::new( 2360 + "rockbox.v1alpha1.PlaybackService", 2361 + "FastForwardRewind", 2362 + )); 2672 2363 self.inner.unary(req, path, codec).await 2673 2364 } 2674 2365 pub async fn status( 2675 2366 &mut self, 2676 2367 request: impl tonic::IntoRequest<super::StatusRequest>, 2677 2368 ) -> std::result::Result<tonic::Response<super::StatusResponse>, tonic::Status> { 2678 - self.inner 2679 - .ready() 2680 - .await 2681 - .map_err(|e| { 2682 - tonic::Status::unknown( 2683 - format!("Service was not ready: {}", e.into()), 2684 - ) 2685 - })?; 2369 + self.inner.ready().await.map_err(|e| { 2370 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2371 + })?; 2686 2372 let codec = tonic::codec::ProstCodec::default(); 2687 - let path = http::uri::PathAndQuery::from_static( 2688 - "/rockbox.v1alpha1.PlaybackService/Status", 2689 - ); 2373 + let path = 2374 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/Status"); 2690 2375 let mut req = request.into_request(); 2691 - req.extensions_mut() 2692 - .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "Status")); 2376 + req.extensions_mut().insert(GrpcMethod::new( 2377 + "rockbox.v1alpha1.PlaybackService", 2378 + "Status", 2379 + )); 2693 2380 self.inner.unary(req, path, codec).await 2694 2381 } 2695 2382 pub async fn current_track( 2696 2383 &mut self, 2697 2384 request: impl tonic::IntoRequest<super::CurrentTrackRequest>, 2698 - ) -> std::result::Result< 2699 - tonic::Response<super::CurrentTrackResponse>, 2700 - tonic::Status, 2701 - > { 2702 - self.inner 2703 - .ready() 2704 - .await 2705 - .map_err(|e| { 2706 - tonic::Status::unknown( 2707 - format!("Service was not ready: {}", e.into()), 2708 - ) 2709 - })?; 2385 + ) -> std::result::Result<tonic::Response<super::CurrentTrackResponse>, tonic::Status> 2386 + { 2387 + self.inner.ready().await.map_err(|e| { 2388 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2389 + })?; 2710 2390 let codec = tonic::codec::ProstCodec::default(); 2711 2391 let path = http::uri::PathAndQuery::from_static( 2712 2392 "/rockbox.v1alpha1.PlaybackService/CurrentTrack", 2713 2393 ); 2714 2394 let mut req = request.into_request(); 2715 - req.extensions_mut() 2716 - .insert( 2717 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "CurrentTrack"), 2718 - ); 2395 + req.extensions_mut().insert(GrpcMethod::new( 2396 + "rockbox.v1alpha1.PlaybackService", 2397 + "CurrentTrack", 2398 + )); 2719 2399 self.inner.unary(req, path, codec).await 2720 2400 } 2721 2401 pub async fn next_track( 2722 2402 &mut self, 2723 2403 request: impl tonic::IntoRequest<super::NextTrackRequest>, 2724 - ) -> std::result::Result< 2725 - tonic::Response<super::NextTrackResponse>, 2726 - tonic::Status, 2727 - > { 2728 - self.inner 2729 - .ready() 2730 - .await 2731 - .map_err(|e| { 2732 - tonic::Status::unknown( 2733 - format!("Service was not ready: {}", e.into()), 2734 - ) 2735 - })?; 2404 + ) -> std::result::Result<tonic::Response<super::NextTrackResponse>, tonic::Status> { 2405 + self.inner.ready().await.map_err(|e| { 2406 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2407 + })?; 2736 2408 let codec = tonic::codec::ProstCodec::default(); 2737 - let path = http::uri::PathAndQuery::from_static( 2738 - "/rockbox.v1alpha1.PlaybackService/NextTrack", 2739 - ); 2409 + let path = 2410 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/NextTrack"); 2740 2411 let mut req = request.into_request(); 2741 - req.extensions_mut() 2742 - .insert( 2743 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "NextTrack"), 2744 - ); 2412 + req.extensions_mut().insert(GrpcMethod::new( 2413 + "rockbox.v1alpha1.PlaybackService", 2414 + "NextTrack", 2415 + )); 2745 2416 self.inner.unary(req, path, codec).await 2746 2417 } 2747 2418 pub async fn flush_and_reload_tracks( 2748 2419 &mut self, 2749 2420 request: impl tonic::IntoRequest<super::FlushAndReloadTracksRequest>, 2750 - ) -> std::result::Result< 2751 - tonic::Response<super::FlushAndReloadTracksResponse>, 2752 - tonic::Status, 2753 - > { 2754 - self.inner 2755 - .ready() 2756 - .await 2757 - .map_err(|e| { 2758 - tonic::Status::unknown( 2759 - format!("Service was not ready: {}", e.into()), 2760 - ) 2761 - })?; 2421 + ) -> std::result::Result<tonic::Response<super::FlushAndReloadTracksResponse>, tonic::Status> 2422 + { 2423 + self.inner.ready().await.map_err(|e| { 2424 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2425 + })?; 2762 2426 let codec = tonic::codec::ProstCodec::default(); 2763 2427 let path = http::uri::PathAndQuery::from_static( 2764 2428 "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks", 2765 2429 ); 2766 2430 let mut req = request.into_request(); 2767 - req.extensions_mut() 2768 - .insert( 2769 - GrpcMethod::new( 2770 - "rockbox.v1alpha1.PlaybackService", 2771 - "FlushAndReloadTracks", 2772 - ), 2773 - ); 2431 + req.extensions_mut().insert(GrpcMethod::new( 2432 + "rockbox.v1alpha1.PlaybackService", 2433 + "FlushAndReloadTracks", 2434 + )); 2774 2435 self.inner.unary(req, path, codec).await 2775 2436 } 2776 2437 pub async fn get_file_position( 2777 2438 &mut self, 2778 2439 request: impl tonic::IntoRequest<super::GetFilePositionRequest>, 2779 - ) -> std::result::Result< 2780 - tonic::Response<super::GetFilePositionResponse>, 2781 - tonic::Status, 2782 - > { 2783 - self.inner 2784 - .ready() 2785 - .await 2786 - .map_err(|e| { 2787 - tonic::Status::unknown( 2788 - format!("Service was not ready: {}", e.into()), 2789 - ) 2790 - })?; 2440 + ) -> std::result::Result<tonic::Response<super::GetFilePositionResponse>, tonic::Status> 2441 + { 2442 + self.inner.ready().await.map_err(|e| { 2443 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2444 + })?; 2791 2445 let codec = tonic::codec::ProstCodec::default(); 2792 2446 let path = http::uri::PathAndQuery::from_static( 2793 2447 "/rockbox.v1alpha1.PlaybackService/GetFilePosition", 2794 2448 ); 2795 2449 let mut req = request.into_request(); 2796 - req.extensions_mut() 2797 - .insert( 2798 - GrpcMethod::new( 2799 - "rockbox.v1alpha1.PlaybackService", 2800 - "GetFilePosition", 2801 - ), 2802 - ); 2450 + req.extensions_mut().insert(GrpcMethod::new( 2451 + "rockbox.v1alpha1.PlaybackService", 2452 + "GetFilePosition", 2453 + )); 2803 2454 self.inner.unary(req, path, codec).await 2804 2455 } 2805 2456 pub async fn hard_stop( 2806 2457 &mut self, 2807 2458 request: impl tonic::IntoRequest<super::HardStopRequest>, 2808 - ) -> std::result::Result< 2809 - tonic::Response<super::HardStopResponse>, 2810 - tonic::Status, 2811 - > { 2812 - self.inner 2813 - .ready() 2814 - .await 2815 - .map_err(|e| { 2816 - tonic::Status::unknown( 2817 - format!("Service was not ready: {}", e.into()), 2818 - ) 2819 - })?; 2459 + ) -> std::result::Result<tonic::Response<super::HardStopResponse>, tonic::Status> { 2460 + self.inner.ready().await.map_err(|e| { 2461 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2462 + })?; 2820 2463 let codec = tonic::codec::ProstCodec::default(); 2821 - let path = http::uri::PathAndQuery::from_static( 2822 - "/rockbox.v1alpha1.PlaybackService/HardStop", 2823 - ); 2464 + let path = 2465 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/HardStop"); 2824 2466 let mut req = request.into_request(); 2825 - req.extensions_mut() 2826 - .insert(GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "HardStop")); 2467 + req.extensions_mut().insert(GrpcMethod::new( 2468 + "rockbox.v1alpha1.PlaybackService", 2469 + "HardStop", 2470 + )); 2827 2471 self.inner.unary(req, path, codec).await 2828 2472 } 2829 2473 pub async fn play_album( 2830 2474 &mut self, 2831 2475 request: impl tonic::IntoRequest<super::PlayAlbumRequest>, 2832 - ) -> std::result::Result< 2833 - tonic::Response<super::PlayAlbumResponse>, 2834 - tonic::Status, 2835 - > { 2836 - self.inner 2837 - .ready() 2838 - .await 2839 - .map_err(|e| { 2840 - tonic::Status::unknown( 2841 - format!("Service was not ready: {}", e.into()), 2842 - ) 2843 - })?; 2476 + ) -> std::result::Result<tonic::Response<super::PlayAlbumResponse>, tonic::Status> { 2477 + self.inner.ready().await.map_err(|e| { 2478 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2479 + })?; 2844 2480 let codec = tonic::codec::ProstCodec::default(); 2845 - let path = http::uri::PathAndQuery::from_static( 2846 - "/rockbox.v1alpha1.PlaybackService/PlayAlbum", 2847 - ); 2481 + let path = 2482 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayAlbum"); 2848 2483 let mut req = request.into_request(); 2849 - req.extensions_mut() 2850 - .insert( 2851 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAlbum"), 2852 - ); 2484 + req.extensions_mut().insert(GrpcMethod::new( 2485 + "rockbox.v1alpha1.PlaybackService", 2486 + "PlayAlbum", 2487 + )); 2853 2488 self.inner.unary(req, path, codec).await 2854 2489 } 2855 2490 pub async fn play_artist_tracks( 2856 2491 &mut self, 2857 2492 request: impl tonic::IntoRequest<super::PlayArtistTracksRequest>, 2858 - ) -> std::result::Result< 2859 - tonic::Response<super::PlayArtistTracksResponse>, 2860 - tonic::Status, 2861 - > { 2862 - self.inner 2863 - .ready() 2864 - .await 2865 - .map_err(|e| { 2866 - tonic::Status::unknown( 2867 - format!("Service was not ready: {}", e.into()), 2868 - ) 2869 - })?; 2493 + ) -> std::result::Result<tonic::Response<super::PlayArtistTracksResponse>, tonic::Status> 2494 + { 2495 + self.inner.ready().await.map_err(|e| { 2496 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2497 + })?; 2870 2498 let codec = tonic::codec::ProstCodec::default(); 2871 2499 let path = http::uri::PathAndQuery::from_static( 2872 2500 "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks", 2873 2501 ); 2874 2502 let mut req = request.into_request(); 2875 - req.extensions_mut() 2876 - .insert( 2877 - GrpcMethod::new( 2878 - "rockbox.v1alpha1.PlaybackService", 2879 - "PlayArtistTracks", 2880 - ), 2881 - ); 2503 + req.extensions_mut().insert(GrpcMethod::new( 2504 + "rockbox.v1alpha1.PlaybackService", 2505 + "PlayArtistTracks", 2506 + )); 2882 2507 self.inner.unary(req, path, codec).await 2883 2508 } 2884 2509 pub async fn play_playlist( 2885 2510 &mut self, 2886 2511 request: impl tonic::IntoRequest<super::PlayPlaylistRequest>, 2887 - ) -> std::result::Result< 2888 - tonic::Response<super::PlayPlaylistResponse>, 2889 - tonic::Status, 2890 - > { 2891 - self.inner 2892 - .ready() 2893 - .await 2894 - .map_err(|e| { 2895 - tonic::Status::unknown( 2896 - format!("Service was not ready: {}", e.into()), 2897 - ) 2898 - })?; 2512 + ) -> std::result::Result<tonic::Response<super::PlayPlaylistResponse>, tonic::Status> 2513 + { 2514 + self.inner.ready().await.map_err(|e| { 2515 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2516 + })?; 2899 2517 let codec = tonic::codec::ProstCodec::default(); 2900 2518 let path = http::uri::PathAndQuery::from_static( 2901 2519 "/rockbox.v1alpha1.PlaybackService/PlayPlaylist", 2902 2520 ); 2903 2521 let mut req = request.into_request(); 2904 - req.extensions_mut() 2905 - .insert( 2906 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayPlaylist"), 2907 - ); 2522 + req.extensions_mut().insert(GrpcMethod::new( 2523 + "rockbox.v1alpha1.PlaybackService", 2524 + "PlayPlaylist", 2525 + )); 2908 2526 self.inner.unary(req, path, codec).await 2909 2527 } 2910 2528 pub async fn play_directory( 2911 2529 &mut self, 2912 2530 request: impl tonic::IntoRequest<super::PlayDirectoryRequest>, 2913 - ) -> std::result::Result< 2914 - tonic::Response<super::PlayDirectoryResponse>, 2915 - tonic::Status, 2916 - > { 2917 - self.inner 2918 - .ready() 2919 - .await 2920 - .map_err(|e| { 2921 - tonic::Status::unknown( 2922 - format!("Service was not ready: {}", e.into()), 2923 - ) 2924 - })?; 2531 + ) -> std::result::Result<tonic::Response<super::PlayDirectoryResponse>, tonic::Status> 2532 + { 2533 + self.inner.ready().await.map_err(|e| { 2534 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2535 + })?; 2925 2536 let codec = tonic::codec::ProstCodec::default(); 2926 2537 let path = http::uri::PathAndQuery::from_static( 2927 2538 "/rockbox.v1alpha1.PlaybackService/PlayDirectory", 2928 2539 ); 2929 2540 let mut req = request.into_request(); 2930 - req.extensions_mut() 2931 - .insert( 2932 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayDirectory"), 2933 - ); 2541 + req.extensions_mut().insert(GrpcMethod::new( 2542 + "rockbox.v1alpha1.PlaybackService", 2543 + "PlayDirectory", 2544 + )); 2934 2545 self.inner.unary(req, path, codec).await 2935 2546 } 2936 2547 pub async fn play_music_directory( 2937 2548 &mut self, 2938 2549 request: impl tonic::IntoRequest<super::PlayMusicDirectoryRequest>, 2939 - ) -> std::result::Result< 2940 - tonic::Response<super::PlayMusicDirectoryResponse>, 2941 - tonic::Status, 2942 - > { 2943 - self.inner 2944 - .ready() 2945 - .await 2946 - .map_err(|e| { 2947 - tonic::Status::unknown( 2948 - format!("Service was not ready: {}", e.into()), 2949 - ) 2950 - })?; 2550 + ) -> std::result::Result<tonic::Response<super::PlayMusicDirectoryResponse>, tonic::Status> 2551 + { 2552 + self.inner.ready().await.map_err(|e| { 2553 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2554 + })?; 2951 2555 let codec = tonic::codec::ProstCodec::default(); 2952 2556 let path = http::uri::PathAndQuery::from_static( 2953 2557 "/rockbox.v1alpha1.PlaybackService/PlayMusicDirectory", 2954 2558 ); 2955 2559 let mut req = request.into_request(); 2956 - req.extensions_mut() 2957 - .insert( 2958 - GrpcMethod::new( 2959 - "rockbox.v1alpha1.PlaybackService", 2960 - "PlayMusicDirectory", 2961 - ), 2962 - ); 2560 + req.extensions_mut().insert(GrpcMethod::new( 2561 + "rockbox.v1alpha1.PlaybackService", 2562 + "PlayMusicDirectory", 2563 + )); 2963 2564 self.inner.unary(req, path, codec).await 2964 2565 } 2965 2566 pub async fn play_track( 2966 2567 &mut self, 2967 2568 request: impl tonic::IntoRequest<super::PlayTrackRequest>, 2968 - ) -> std::result::Result< 2969 - tonic::Response<super::PlayTrackResponse>, 2970 - tonic::Status, 2971 - > { 2972 - self.inner 2973 - .ready() 2974 - .await 2975 - .map_err(|e| { 2976 - tonic::Status::unknown( 2977 - format!("Service was not ready: {}", e.into()), 2978 - ) 2979 - })?; 2569 + ) -> std::result::Result<tonic::Response<super::PlayTrackResponse>, tonic::Status> { 2570 + self.inner.ready().await.map_err(|e| { 2571 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2572 + })?; 2980 2573 let codec = tonic::codec::ProstCodec::default(); 2981 - let path = http::uri::PathAndQuery::from_static( 2982 - "/rockbox.v1alpha1.PlaybackService/PlayTrack", 2983 - ); 2574 + let path = 2575 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaybackService/PlayTrack"); 2984 2576 let mut req = request.into_request(); 2985 - req.extensions_mut() 2986 - .insert( 2987 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayTrack"), 2988 - ); 2577 + req.extensions_mut().insert(GrpcMethod::new( 2578 + "rockbox.v1alpha1.PlaybackService", 2579 + "PlayTrack", 2580 + )); 2989 2581 self.inner.unary(req, path, codec).await 2990 2582 } 2991 2583 pub async fn play_liked_tracks( 2992 2584 &mut self, 2993 2585 request: impl tonic::IntoRequest<super::PlayLikedTracksRequest>, 2994 - ) -> std::result::Result< 2995 - tonic::Response<super::PlayLikedTracksResponse>, 2996 - tonic::Status, 2997 - > { 2998 - self.inner 2999 - .ready() 3000 - .await 3001 - .map_err(|e| { 3002 - tonic::Status::unknown( 3003 - format!("Service was not ready: {}", e.into()), 3004 - ) 3005 - })?; 2586 + ) -> std::result::Result<tonic::Response<super::PlayLikedTracksResponse>, tonic::Status> 2587 + { 2588 + self.inner.ready().await.map_err(|e| { 2589 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2590 + })?; 3006 2591 let codec = tonic::codec::ProstCodec::default(); 3007 2592 let path = http::uri::PathAndQuery::from_static( 3008 2593 "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks", 3009 2594 ); 3010 2595 let mut req = request.into_request(); 3011 - req.extensions_mut() 3012 - .insert( 3013 - GrpcMethod::new( 3014 - "rockbox.v1alpha1.PlaybackService", 3015 - "PlayLikedTracks", 3016 - ), 3017 - ); 2596 + req.extensions_mut().insert(GrpcMethod::new( 2597 + "rockbox.v1alpha1.PlaybackService", 2598 + "PlayLikedTracks", 2599 + )); 3018 2600 self.inner.unary(req, path, codec).await 3019 2601 } 3020 2602 pub async fn play_all_tracks( 3021 2603 &mut self, 3022 2604 request: impl tonic::IntoRequest<super::PlayAllTracksRequest>, 3023 - ) -> std::result::Result< 3024 - tonic::Response<super::PlayAllTracksResponse>, 3025 - tonic::Status, 3026 - > { 3027 - self.inner 3028 - .ready() 3029 - .await 3030 - .map_err(|e| { 3031 - tonic::Status::unknown( 3032 - format!("Service was not ready: {}", e.into()), 3033 - ) 3034 - })?; 2605 + ) -> std::result::Result<tonic::Response<super::PlayAllTracksResponse>, tonic::Status> 2606 + { 2607 + self.inner.ready().await.map_err(|e| { 2608 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2609 + })?; 3035 2610 let codec = tonic::codec::ProstCodec::default(); 3036 2611 let path = http::uri::PathAndQuery::from_static( 3037 2612 "/rockbox.v1alpha1.PlaybackService/PlayAllTracks", 3038 2613 ); 3039 2614 let mut req = request.into_request(); 3040 - req.extensions_mut() 3041 - .insert( 3042 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "PlayAllTracks"), 3043 - ); 2615 + req.extensions_mut().insert(GrpcMethod::new( 2616 + "rockbox.v1alpha1.PlaybackService", 2617 + "PlayAllTracks", 2618 + )); 3044 2619 self.inner.unary(req, path, codec).await 3045 2620 } 3046 2621 pub async fn stream_current_track( ··· 3050 2625 tonic::Response<tonic::codec::Streaming<super::CurrentTrackResponse>>, 3051 2626 tonic::Status, 3052 2627 > { 3053 - self.inner 3054 - .ready() 3055 - .await 3056 - .map_err(|e| { 3057 - tonic::Status::unknown( 3058 - format!("Service was not ready: {}", e.into()), 3059 - ) 3060 - })?; 2628 + self.inner.ready().await.map_err(|e| { 2629 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2630 + })?; 3061 2631 let codec = tonic::codec::ProstCodec::default(); 3062 2632 let path = http::uri::PathAndQuery::from_static( 3063 2633 "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack", 3064 2634 ); 3065 2635 let mut req = request.into_request(); 3066 - req.extensions_mut() 3067 - .insert( 3068 - GrpcMethod::new( 3069 - "rockbox.v1alpha1.PlaybackService", 3070 - "StreamCurrentTrack", 3071 - ), 3072 - ); 2636 + req.extensions_mut().insert(GrpcMethod::new( 2637 + "rockbox.v1alpha1.PlaybackService", 2638 + "StreamCurrentTrack", 2639 + )); 3073 2640 self.inner.server_streaming(req, path, codec).await 3074 2641 } 3075 2642 pub async fn stream_status( ··· 3079 2646 tonic::Response<tonic::codec::Streaming<super::StatusResponse>>, 3080 2647 tonic::Status, 3081 2648 > { 3082 - self.inner 3083 - .ready() 3084 - .await 3085 - .map_err(|e| { 3086 - tonic::Status::unknown( 3087 - format!("Service was not ready: {}", e.into()), 3088 - ) 3089 - })?; 2649 + self.inner.ready().await.map_err(|e| { 2650 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2651 + })?; 3090 2652 let codec = tonic::codec::ProstCodec::default(); 3091 2653 let path = http::uri::PathAndQuery::from_static( 3092 2654 "/rockbox.v1alpha1.PlaybackService/StreamStatus", 3093 2655 ); 3094 2656 let mut req = request.into_request(); 3095 - req.extensions_mut() 3096 - .insert( 3097 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamStatus"), 3098 - ); 2657 + req.extensions_mut().insert(GrpcMethod::new( 2658 + "rockbox.v1alpha1.PlaybackService", 2659 + "StreamStatus", 2660 + )); 3099 2661 self.inner.server_streaming(req, path, codec).await 3100 2662 } 3101 2663 pub async fn stream_playlist( ··· 3105 2667 tonic::Response<tonic::codec::Streaming<super::PlaylistResponse>>, 3106 2668 tonic::Status, 3107 2669 > { 3108 - self.inner 3109 - .ready() 3110 - .await 3111 - .map_err(|e| { 3112 - tonic::Status::unknown( 3113 - format!("Service was not ready: {}", e.into()), 3114 - ) 3115 - })?; 2670 + self.inner.ready().await.map_err(|e| { 2671 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 2672 + })?; 3116 2673 let codec = tonic::codec::ProstCodec::default(); 3117 2674 let path = http::uri::PathAndQuery::from_static( 3118 2675 "/rockbox.v1alpha1.PlaybackService/StreamPlaylist", 3119 2676 ); 3120 2677 let mut req = request.into_request(); 3121 - req.extensions_mut() 3122 - .insert( 3123 - GrpcMethod::new("rockbox.v1alpha1.PlaybackService", "StreamPlaylist"), 3124 - ); 2678 + req.extensions_mut().insert(GrpcMethod::new( 2679 + "rockbox.v1alpha1.PlaybackService", 2680 + "StreamPlaylist", 2681 + )); 3125 2682 self.inner.server_streaming(req, path, codec).await 3126 2683 } 3127 2684 } ··· 3133 2690 dead_code, 3134 2691 missing_docs, 3135 2692 clippy::wildcard_imports, 3136 - clippy::let_unit_value, 2693 + clippy::let_unit_value 3137 2694 )] 3138 2695 use tonic::codegen::*; 3139 2696 /// Generated trait containing gRPC methods that should be implemented for use with PlaybackServiceServer. ··· 3150 2707 async fn play_or_pause( 3151 2708 &self, 3152 2709 request: tonic::Request<super::PlayOrPauseRequest>, 3153 - ) -> std::result::Result< 3154 - tonic::Response<super::PlayOrPauseResponse>, 3155 - tonic::Status, 3156 - >; 2710 + ) -> std::result::Result<tonic::Response<super::PlayOrPauseResponse>, tonic::Status>; 3157 2711 async fn resume( 3158 2712 &self, 3159 2713 request: tonic::Request<super::ResumeRequest>, ··· 3165 2719 async fn previous( 3166 2720 &self, 3167 2721 request: tonic::Request<super::PreviousRequest>, 3168 - ) -> std::result::Result< 3169 - tonic::Response<super::PreviousResponse>, 3170 - tonic::Status, 3171 - >; 2722 + ) -> std::result::Result<tonic::Response<super::PreviousResponse>, tonic::Status>; 3172 2723 async fn fast_forward_rewind( 3173 2724 &self, 3174 2725 request: tonic::Request<super::FastForwardRewindRequest>, 3175 - ) -> std::result::Result< 3176 - tonic::Response<super::FastForwardRewindResponse>, 3177 - tonic::Status, 3178 - >; 2726 + ) -> std::result::Result<tonic::Response<super::FastForwardRewindResponse>, tonic::Status>; 3179 2727 async fn status( 3180 2728 &self, 3181 2729 request: tonic::Request<super::StatusRequest>, ··· 3183 2731 async fn current_track( 3184 2732 &self, 3185 2733 request: tonic::Request<super::CurrentTrackRequest>, 3186 - ) -> std::result::Result< 3187 - tonic::Response<super::CurrentTrackResponse>, 3188 - tonic::Status, 3189 - >; 2734 + ) -> std::result::Result<tonic::Response<super::CurrentTrackResponse>, tonic::Status>; 3190 2735 async fn next_track( 3191 2736 &self, 3192 2737 request: tonic::Request<super::NextTrackRequest>, 3193 - ) -> std::result::Result< 3194 - tonic::Response<super::NextTrackResponse>, 3195 - tonic::Status, 3196 - >; 2738 + ) -> std::result::Result<tonic::Response<super::NextTrackResponse>, tonic::Status>; 3197 2739 async fn flush_and_reload_tracks( 3198 2740 &self, 3199 2741 request: tonic::Request<super::FlushAndReloadTracksRequest>, 3200 - ) -> std::result::Result< 3201 - tonic::Response<super::FlushAndReloadTracksResponse>, 3202 - tonic::Status, 3203 - >; 2742 + ) -> std::result::Result<tonic::Response<super::FlushAndReloadTracksResponse>, tonic::Status>; 3204 2743 async fn get_file_position( 3205 2744 &self, 3206 2745 request: tonic::Request<super::GetFilePositionRequest>, 3207 - ) -> std::result::Result< 3208 - tonic::Response<super::GetFilePositionResponse>, 3209 - tonic::Status, 3210 - >; 2746 + ) -> std::result::Result<tonic::Response<super::GetFilePositionResponse>, tonic::Status>; 3211 2747 async fn hard_stop( 3212 2748 &self, 3213 2749 request: tonic::Request<super::HardStopRequest>, 3214 - ) -> std::result::Result< 3215 - tonic::Response<super::HardStopResponse>, 3216 - tonic::Status, 3217 - >; 2750 + ) -> std::result::Result<tonic::Response<super::HardStopResponse>, tonic::Status>; 3218 2751 async fn play_album( 3219 2752 &self, 3220 2753 request: tonic::Request<super::PlayAlbumRequest>, 3221 - ) -> std::result::Result< 3222 - tonic::Response<super::PlayAlbumResponse>, 3223 - tonic::Status, 3224 - >; 2754 + ) -> std::result::Result<tonic::Response<super::PlayAlbumResponse>, tonic::Status>; 3225 2755 async fn play_artist_tracks( 3226 2756 &self, 3227 2757 request: tonic::Request<super::PlayArtistTracksRequest>, 3228 - ) -> std::result::Result< 3229 - tonic::Response<super::PlayArtistTracksResponse>, 3230 - tonic::Status, 3231 - >; 2758 + ) -> std::result::Result<tonic::Response<super::PlayArtistTracksResponse>, tonic::Status>; 3232 2759 async fn play_playlist( 3233 2760 &self, 3234 2761 request: tonic::Request<super::PlayPlaylistRequest>, 3235 - ) -> std::result::Result< 3236 - tonic::Response<super::PlayPlaylistResponse>, 3237 - tonic::Status, 3238 - >; 2762 + ) -> std::result::Result<tonic::Response<super::PlayPlaylistResponse>, tonic::Status>; 3239 2763 async fn play_directory( 3240 2764 &self, 3241 2765 request: tonic::Request<super::PlayDirectoryRequest>, 3242 - ) -> std::result::Result< 3243 - tonic::Response<super::PlayDirectoryResponse>, 3244 - tonic::Status, 3245 - >; 2766 + ) -> std::result::Result<tonic::Response<super::PlayDirectoryResponse>, tonic::Status>; 3246 2767 async fn play_music_directory( 3247 2768 &self, 3248 2769 request: tonic::Request<super::PlayMusicDirectoryRequest>, 3249 - ) -> std::result::Result< 3250 - tonic::Response<super::PlayMusicDirectoryResponse>, 3251 - tonic::Status, 3252 - >; 2770 + ) -> std::result::Result<tonic::Response<super::PlayMusicDirectoryResponse>, tonic::Status>; 3253 2771 async fn play_track( 3254 2772 &self, 3255 2773 request: tonic::Request<super::PlayTrackRequest>, 3256 - ) -> std::result::Result< 3257 - tonic::Response<super::PlayTrackResponse>, 3258 - tonic::Status, 3259 - >; 2774 + ) -> std::result::Result<tonic::Response<super::PlayTrackResponse>, tonic::Status>; 3260 2775 async fn play_liked_tracks( 3261 2776 &self, 3262 2777 request: tonic::Request<super::PlayLikedTracksRequest>, 3263 - ) -> std::result::Result< 3264 - tonic::Response<super::PlayLikedTracksResponse>, 3265 - tonic::Status, 3266 - >; 2778 + ) -> std::result::Result<tonic::Response<super::PlayLikedTracksResponse>, tonic::Status>; 3267 2779 async fn play_all_tracks( 3268 2780 &self, 3269 2781 request: tonic::Request<super::PlayAllTracksRequest>, 3270 - ) -> std::result::Result< 3271 - tonic::Response<super::PlayAllTracksResponse>, 3272 - tonic::Status, 3273 - >; 2782 + ) -> std::result::Result<tonic::Response<super::PlayAllTracksResponse>, tonic::Status>; 3274 2783 /// Server streaming response type for the StreamCurrentTrack method. 3275 2784 type StreamCurrentTrackStream: tonic::codegen::tokio_stream::Stream< 3276 2785 Item = std::result::Result<super::CurrentTrackResponse, tonic::Status>, 3277 - > 3278 - + std::marker::Send 2786 + > + std::marker::Send 3279 2787 + 'static; 3280 2788 async fn stream_current_track( 3281 2789 &self, 3282 2790 request: tonic::Request<super::StreamCurrentTrackRequest>, 3283 - ) -> std::result::Result< 3284 - tonic::Response<Self::StreamCurrentTrackStream>, 3285 - tonic::Status, 3286 - >; 2791 + ) -> std::result::Result<tonic::Response<Self::StreamCurrentTrackStream>, tonic::Status>; 3287 2792 /// Server streaming response type for the StreamStatus method. 3288 2793 type StreamStatusStream: tonic::codegen::tokio_stream::Stream< 3289 2794 Item = std::result::Result<super::StatusResponse, tonic::Status>, 3290 - > 3291 - + std::marker::Send 2795 + > + std::marker::Send 3292 2796 + 'static; 3293 2797 async fn stream_status( 3294 2798 &self, 3295 2799 request: tonic::Request<super::StreamStatusRequest>, 3296 - ) -> std::result::Result< 3297 - tonic::Response<Self::StreamStatusStream>, 3298 - tonic::Status, 3299 - >; 2800 + ) -> std::result::Result<tonic::Response<Self::StreamStatusStream>, tonic::Status>; 3300 2801 /// Server streaming response type for the StreamPlaylist method. 3301 2802 type StreamPlaylistStream: tonic::codegen::tokio_stream::Stream< 3302 2803 Item = std::result::Result<super::PlaylistResponse, tonic::Status>, 3303 - > 3304 - + std::marker::Send 2804 + > + std::marker::Send 3305 2805 + 'static; 3306 2806 async fn stream_playlist( 3307 2807 &self, 3308 2808 request: tonic::Request<super::StreamPlaylistRequest>, 3309 - ) -> std::result::Result< 3310 - tonic::Response<Self::StreamPlaylistStream>, 3311 - tonic::Status, 3312 - >; 2809 + ) -> std::result::Result<tonic::Response<Self::StreamPlaylistStream>, tonic::Status>; 3313 2810 } 3314 2811 #[derive(Debug)] 3315 2812 pub struct PlaybackServiceServer<T> { ··· 3332 2829 max_encoding_message_size: None, 3333 2830 } 3334 2831 } 3335 - pub fn with_interceptor<F>( 3336 - inner: T, 3337 - interceptor: F, 3338 - ) -> InterceptedService<Self, F> 2832 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 3339 2833 where 3340 2834 F: tonic::service::Interceptor, 3341 2835 { ··· 3390 2884 "/rockbox.v1alpha1.PlaybackService/Play" => { 3391 2885 #[allow(non_camel_case_types)] 3392 2886 struct PlaySvc<T: PlaybackService>(pub Arc<T>); 3393 - impl< 3394 - T: PlaybackService, 3395 - > tonic::server::UnaryService<super::PlayRequest> for PlaySvc<T> { 2887 + impl<T: PlaybackService> tonic::server::UnaryService<super::PlayRequest> for PlaySvc<T> { 3396 2888 type Response = super::PlayResponse; 3397 - type Future = BoxFuture< 3398 - tonic::Response<Self::Response>, 3399 - tonic::Status, 3400 - >; 2889 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3401 2890 fn call( 3402 2891 &mut self, 3403 2892 request: tonic::Request<super::PlayRequest>, 3404 2893 ) -> Self::Future { 3405 2894 let inner = Arc::clone(&self.0); 3406 - let fut = async move { 3407 - <T as PlaybackService>::play(&inner, request).await 3408 - }; 2895 + let fut = 2896 + async move { <T as PlaybackService>::play(&inner, request).await }; 3409 2897 Box::pin(fut) 3410 2898 } 3411 2899 } ··· 3434 2922 "/rockbox.v1alpha1.PlaybackService/Pause" => { 3435 2923 #[allow(non_camel_case_types)] 3436 2924 struct PauseSvc<T: PlaybackService>(pub Arc<T>); 3437 - impl< 3438 - T: PlaybackService, 3439 - > tonic::server::UnaryService<super::PauseRequest> for PauseSvc<T> { 2925 + impl<T: PlaybackService> tonic::server::UnaryService<super::PauseRequest> for PauseSvc<T> { 3440 2926 type Response = super::PauseResponse; 3441 - type Future = BoxFuture< 3442 - tonic::Response<Self::Response>, 3443 - tonic::Status, 3444 - >; 2927 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3445 2928 fn call( 3446 2929 &mut self, 3447 2930 request: tonic::Request<super::PauseRequest>, 3448 2931 ) -> Self::Future { 3449 2932 let inner = Arc::clone(&self.0); 3450 - let fut = async move { 3451 - <T as PlaybackService>::pause(&inner, request).await 3452 - }; 2933 + let fut = 2934 + async move { <T as PlaybackService>::pause(&inner, request).await }; 3453 2935 Box::pin(fut) 3454 2936 } 3455 2937 } ··· 3478 2960 "/rockbox.v1alpha1.PlaybackService/PlayOrPause" => { 3479 2961 #[allow(non_camel_case_types)] 3480 2962 struct PlayOrPauseSvc<T: PlaybackService>(pub Arc<T>); 3481 - impl< 3482 - T: PlaybackService, 3483 - > tonic::server::UnaryService<super::PlayOrPauseRequest> 3484 - for PlayOrPauseSvc<T> { 2963 + impl<T: PlaybackService> tonic::server::UnaryService<super::PlayOrPauseRequest> 2964 + for PlayOrPauseSvc<T> 2965 + { 3485 2966 type Response = super::PlayOrPauseResponse; 3486 - type Future = BoxFuture< 3487 - tonic::Response<Self::Response>, 3488 - tonic::Status, 3489 - >; 2967 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3490 2968 fn call( 3491 2969 &mut self, 3492 2970 request: tonic::Request<super::PlayOrPauseRequest>, ··· 3523 3001 "/rockbox.v1alpha1.PlaybackService/Resume" => { 3524 3002 #[allow(non_camel_case_types)] 3525 3003 struct ResumeSvc<T: PlaybackService>(pub Arc<T>); 3526 - impl< 3527 - T: PlaybackService, 3528 - > tonic::server::UnaryService<super::ResumeRequest> 3529 - for ResumeSvc<T> { 3004 + impl<T: PlaybackService> tonic::server::UnaryService<super::ResumeRequest> for ResumeSvc<T> { 3530 3005 type Response = super::ResumeResponse; 3531 - type Future = BoxFuture< 3532 - tonic::Response<Self::Response>, 3533 - tonic::Status, 3534 - >; 3006 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3535 3007 fn call( 3536 3008 &mut self, 3537 3009 request: tonic::Request<super::ResumeRequest>, ··· 3568 3040 "/rockbox.v1alpha1.PlaybackService/Next" => { 3569 3041 #[allow(non_camel_case_types)] 3570 3042 struct NextSvc<T: PlaybackService>(pub Arc<T>); 3571 - impl< 3572 - T: PlaybackService, 3573 - > tonic::server::UnaryService<super::NextRequest> for NextSvc<T> { 3043 + impl<T: PlaybackService> tonic::server::UnaryService<super::NextRequest> for NextSvc<T> { 3574 3044 type Response = super::NextResponse; 3575 - type Future = BoxFuture< 3576 - tonic::Response<Self::Response>, 3577 - tonic::Status, 3578 - >; 3045 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3579 3046 fn call( 3580 3047 &mut self, 3581 3048 request: tonic::Request<super::NextRequest>, 3582 3049 ) -> Self::Future { 3583 3050 let inner = Arc::clone(&self.0); 3584 - let fut = async move { 3585 - <T as PlaybackService>::next(&inner, request).await 3586 - }; 3051 + let fut = 3052 + async move { <T as PlaybackService>::next(&inner, request).await }; 3587 3053 Box::pin(fut) 3588 3054 } 3589 3055 } ··· 3612 3078 "/rockbox.v1alpha1.PlaybackService/Previous" => { 3613 3079 #[allow(non_camel_case_types)] 3614 3080 struct PreviousSvc<T: PlaybackService>(pub Arc<T>); 3615 - impl< 3616 - T: PlaybackService, 3617 - > tonic::server::UnaryService<super::PreviousRequest> 3618 - for PreviousSvc<T> { 3081 + impl<T: PlaybackService> tonic::server::UnaryService<super::PreviousRequest> for PreviousSvc<T> { 3619 3082 type Response = super::PreviousResponse; 3620 - type Future = BoxFuture< 3621 - tonic::Response<Self::Response>, 3622 - tonic::Status, 3623 - >; 3083 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3624 3084 fn call( 3625 3085 &mut self, 3626 3086 request: tonic::Request<super::PreviousRequest>, ··· 3657 3117 "/rockbox.v1alpha1.PlaybackService/FastForwardRewind" => { 3658 3118 #[allow(non_camel_case_types)] 3659 3119 struct FastForwardRewindSvc<T: PlaybackService>(pub Arc<T>); 3660 - impl< 3661 - T: PlaybackService, 3662 - > tonic::server::UnaryService<super::FastForwardRewindRequest> 3663 - for FastForwardRewindSvc<T> { 3120 + impl<T: PlaybackService> 3121 + tonic::server::UnaryService<super::FastForwardRewindRequest> 3122 + for FastForwardRewindSvc<T> 3123 + { 3664 3124 type Response = super::FastForwardRewindResponse; 3665 - type Future = BoxFuture< 3666 - tonic::Response<Self::Response>, 3667 - tonic::Status, 3668 - >; 3125 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3669 3126 fn call( 3670 3127 &mut self, 3671 3128 request: tonic::Request<super::FastForwardRewindRequest>, 3672 3129 ) -> Self::Future { 3673 3130 let inner = Arc::clone(&self.0); 3674 3131 let fut = async move { 3675 - <T as PlaybackService>::fast_forward_rewind(&inner, request) 3676 - .await 3132 + <T as PlaybackService>::fast_forward_rewind(&inner, request).await 3677 3133 }; 3678 3134 Box::pin(fut) 3679 3135 } ··· 3703 3159 "/rockbox.v1alpha1.PlaybackService/Status" => { 3704 3160 #[allow(non_camel_case_types)] 3705 3161 struct StatusSvc<T: PlaybackService>(pub Arc<T>); 3706 - impl< 3707 - T: PlaybackService, 3708 - > tonic::server::UnaryService<super::StatusRequest> 3709 - for StatusSvc<T> { 3162 + impl<T: PlaybackService> tonic::server::UnaryService<super::StatusRequest> for StatusSvc<T> { 3710 3163 type Response = super::StatusResponse; 3711 - type Future = BoxFuture< 3712 - tonic::Response<Self::Response>, 3713 - tonic::Status, 3714 - >; 3164 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3715 3165 fn call( 3716 3166 &mut self, 3717 3167 request: tonic::Request<super::StatusRequest>, ··· 3748 3198 "/rockbox.v1alpha1.PlaybackService/CurrentTrack" => { 3749 3199 #[allow(non_camel_case_types)] 3750 3200 struct CurrentTrackSvc<T: PlaybackService>(pub Arc<T>); 3751 - impl< 3752 - T: PlaybackService, 3753 - > tonic::server::UnaryService<super::CurrentTrackRequest> 3754 - for CurrentTrackSvc<T> { 3201 + impl<T: PlaybackService> tonic::server::UnaryService<super::CurrentTrackRequest> 3202 + for CurrentTrackSvc<T> 3203 + { 3755 3204 type Response = super::CurrentTrackResponse; 3756 - type Future = BoxFuture< 3757 - tonic::Response<Self::Response>, 3758 - tonic::Status, 3759 - >; 3205 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3760 3206 fn call( 3761 3207 &mut self, 3762 3208 request: tonic::Request<super::CurrentTrackRequest>, ··· 3793 3239 "/rockbox.v1alpha1.PlaybackService/NextTrack" => { 3794 3240 #[allow(non_camel_case_types)] 3795 3241 struct NextTrackSvc<T: PlaybackService>(pub Arc<T>); 3796 - impl< 3797 - T: PlaybackService, 3798 - > tonic::server::UnaryService<super::NextTrackRequest> 3799 - for NextTrackSvc<T> { 3242 + impl<T: PlaybackService> tonic::server::UnaryService<super::NextTrackRequest> for NextTrackSvc<T> { 3800 3243 type Response = super::NextTrackResponse; 3801 - type Future = BoxFuture< 3802 - tonic::Response<Self::Response>, 3803 - tonic::Status, 3804 - >; 3244 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3805 3245 fn call( 3806 3246 &mut self, 3807 3247 request: tonic::Request<super::NextTrackRequest>, ··· 3838 3278 "/rockbox.v1alpha1.PlaybackService/FlushAndReloadTracks" => { 3839 3279 #[allow(non_camel_case_types)] 3840 3280 struct FlushAndReloadTracksSvc<T: PlaybackService>(pub Arc<T>); 3841 - impl< 3842 - T: PlaybackService, 3843 - > tonic::server::UnaryService<super::FlushAndReloadTracksRequest> 3844 - for FlushAndReloadTracksSvc<T> { 3281 + impl<T: PlaybackService> 3282 + tonic::server::UnaryService<super::FlushAndReloadTracksRequest> 3283 + for FlushAndReloadTracksSvc<T> 3284 + { 3845 3285 type Response = super::FlushAndReloadTracksResponse; 3846 - type Future = BoxFuture< 3847 - tonic::Response<Self::Response>, 3848 - tonic::Status, 3849 - >; 3286 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3850 3287 fn call( 3851 3288 &mut self, 3852 3289 request: tonic::Request<super::FlushAndReloadTracksRequest>, 3853 3290 ) -> Self::Future { 3854 3291 let inner = Arc::clone(&self.0); 3855 3292 let fut = async move { 3856 - <T as PlaybackService>::flush_and_reload_tracks( 3857 - &inner, 3858 - request, 3859 - ) 3293 + <T as PlaybackService>::flush_and_reload_tracks(&inner, request) 3860 3294 .await 3861 3295 }; 3862 3296 Box::pin(fut) ··· 3887 3321 "/rockbox.v1alpha1.PlaybackService/GetFilePosition" => { 3888 3322 #[allow(non_camel_case_types)] 3889 3323 struct GetFilePositionSvc<T: PlaybackService>(pub Arc<T>); 3890 - impl< 3891 - T: PlaybackService, 3892 - > tonic::server::UnaryService<super::GetFilePositionRequest> 3893 - for GetFilePositionSvc<T> { 3324 + impl<T: PlaybackService> 3325 + tonic::server::UnaryService<super::GetFilePositionRequest> 3326 + for GetFilePositionSvc<T> 3327 + { 3894 3328 type Response = super::GetFilePositionResponse; 3895 - type Future = BoxFuture< 3896 - tonic::Response<Self::Response>, 3897 - tonic::Status, 3898 - >; 3329 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3899 3330 fn call( 3900 3331 &mut self, 3901 3332 request: tonic::Request<super::GetFilePositionRequest>, 3902 3333 ) -> Self::Future { 3903 3334 let inner = Arc::clone(&self.0); 3904 3335 let fut = async move { 3905 - <T as PlaybackService>::get_file_position(&inner, request) 3906 - .await 3336 + <T as PlaybackService>::get_file_position(&inner, request).await 3907 3337 }; 3908 3338 Box::pin(fut) 3909 3339 } ··· 3933 3363 "/rockbox.v1alpha1.PlaybackService/HardStop" => { 3934 3364 #[allow(non_camel_case_types)] 3935 3365 struct HardStopSvc<T: PlaybackService>(pub Arc<T>); 3936 - impl< 3937 - T: PlaybackService, 3938 - > tonic::server::UnaryService<super::HardStopRequest> 3939 - for HardStopSvc<T> { 3366 + impl<T: PlaybackService> tonic::server::UnaryService<super::HardStopRequest> for HardStopSvc<T> { 3940 3367 type Response = super::HardStopResponse; 3941 - type Future = BoxFuture< 3942 - tonic::Response<Self::Response>, 3943 - tonic::Status, 3944 - >; 3368 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3945 3369 fn call( 3946 3370 &mut self, 3947 3371 request: tonic::Request<super::HardStopRequest>, ··· 3978 3402 "/rockbox.v1alpha1.PlaybackService/PlayAlbum" => { 3979 3403 #[allow(non_camel_case_types)] 3980 3404 struct PlayAlbumSvc<T: PlaybackService>(pub Arc<T>); 3981 - impl< 3982 - T: PlaybackService, 3983 - > tonic::server::UnaryService<super::PlayAlbumRequest> 3984 - for PlayAlbumSvc<T> { 3405 + impl<T: PlaybackService> tonic::server::UnaryService<super::PlayAlbumRequest> for PlayAlbumSvc<T> { 3985 3406 type Response = super::PlayAlbumResponse; 3986 - type Future = BoxFuture< 3987 - tonic::Response<Self::Response>, 3988 - tonic::Status, 3989 - >; 3407 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 3990 3408 fn call( 3991 3409 &mut self, 3992 3410 request: tonic::Request<super::PlayAlbumRequest>, ··· 4023 3441 "/rockbox.v1alpha1.PlaybackService/PlayArtistTracks" => { 4024 3442 #[allow(non_camel_case_types)] 4025 3443 struct PlayArtistTracksSvc<T: PlaybackService>(pub Arc<T>); 4026 - impl< 4027 - T: PlaybackService, 4028 - > tonic::server::UnaryService<super::PlayArtistTracksRequest> 4029 - for PlayArtistTracksSvc<T> { 3444 + impl<T: PlaybackService> 3445 + tonic::server::UnaryService<super::PlayArtistTracksRequest> 3446 + for PlayArtistTracksSvc<T> 3447 + { 4030 3448 type Response = super::PlayArtistTracksResponse; 4031 - type Future = BoxFuture< 4032 - tonic::Response<Self::Response>, 4033 - tonic::Status, 4034 - >; 3449 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4035 3450 fn call( 4036 3451 &mut self, 4037 3452 request: tonic::Request<super::PlayArtistTracksRequest>, 4038 3453 ) -> Self::Future { 4039 3454 let inner = Arc::clone(&self.0); 4040 3455 let fut = async move { 4041 - <T as PlaybackService>::play_artist_tracks(&inner, request) 4042 - .await 3456 + <T as PlaybackService>::play_artist_tracks(&inner, request).await 4043 3457 }; 4044 3458 Box::pin(fut) 4045 3459 } ··· 4069 3483 "/rockbox.v1alpha1.PlaybackService/PlayPlaylist" => { 4070 3484 #[allow(non_camel_case_types)] 4071 3485 struct PlayPlaylistSvc<T: PlaybackService>(pub Arc<T>); 4072 - impl< 4073 - T: PlaybackService, 4074 - > tonic::server::UnaryService<super::PlayPlaylistRequest> 4075 - for PlayPlaylistSvc<T> { 3486 + impl<T: PlaybackService> tonic::server::UnaryService<super::PlayPlaylistRequest> 3487 + for PlayPlaylistSvc<T> 3488 + { 4076 3489 type Response = super::PlayPlaylistResponse; 4077 - type Future = BoxFuture< 4078 - tonic::Response<Self::Response>, 4079 - tonic::Status, 4080 - >; 3490 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4081 3491 fn call( 4082 3492 &mut self, 4083 3493 request: tonic::Request<super::PlayPlaylistRequest>, ··· 4114 3524 "/rockbox.v1alpha1.PlaybackService/PlayDirectory" => { 4115 3525 #[allow(non_camel_case_types)] 4116 3526 struct PlayDirectorySvc<T: PlaybackService>(pub Arc<T>); 4117 - impl< 4118 - T: PlaybackService, 4119 - > tonic::server::UnaryService<super::PlayDirectoryRequest> 4120 - for PlayDirectorySvc<T> { 3527 + impl<T: PlaybackService> 3528 + tonic::server::UnaryService<super::PlayDirectoryRequest> 3529 + for PlayDirectorySvc<T> 3530 + { 4121 3531 type Response = super::PlayDirectoryResponse; 4122 - type Future = BoxFuture< 4123 - tonic::Response<Self::Response>, 4124 - tonic::Status, 4125 - >; 3532 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4126 3533 fn call( 4127 3534 &mut self, 4128 3535 request: tonic::Request<super::PlayDirectoryRequest>, 4129 3536 ) -> Self::Future { 4130 3537 let inner = Arc::clone(&self.0); 4131 3538 let fut = async move { 4132 - <T as PlaybackService>::play_directory(&inner, request) 4133 - .await 3539 + <T as PlaybackService>::play_directory(&inner, request).await 4134 3540 }; 4135 3541 Box::pin(fut) 4136 3542 } ··· 4160 3566 "/rockbox.v1alpha1.PlaybackService/PlayMusicDirectory" => { 4161 3567 #[allow(non_camel_case_types)] 4162 3568 struct PlayMusicDirectorySvc<T: PlaybackService>(pub Arc<T>); 4163 - impl< 4164 - T: PlaybackService, 4165 - > tonic::server::UnaryService<super::PlayMusicDirectoryRequest> 4166 - for PlayMusicDirectorySvc<T> { 3569 + impl<T: PlaybackService> 3570 + tonic::server::UnaryService<super::PlayMusicDirectoryRequest> 3571 + for PlayMusicDirectorySvc<T> 3572 + { 4167 3573 type Response = super::PlayMusicDirectoryResponse; 4168 - type Future = BoxFuture< 4169 - tonic::Response<Self::Response>, 4170 - tonic::Status, 4171 - >; 3574 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4172 3575 fn call( 4173 3576 &mut self, 4174 3577 request: tonic::Request<super::PlayMusicDirectoryRequest>, 4175 3578 ) -> Self::Future { 4176 3579 let inner = Arc::clone(&self.0); 4177 3580 let fut = async move { 4178 - <T as PlaybackService>::play_music_directory( 4179 - &inner, 4180 - request, 4181 - ) 4182 - .await 3581 + <T as PlaybackService>::play_music_directory(&inner, request).await 4183 3582 }; 4184 3583 Box::pin(fut) 4185 3584 } ··· 4209 3608 "/rockbox.v1alpha1.PlaybackService/PlayTrack" => { 4210 3609 #[allow(non_camel_case_types)] 4211 3610 struct PlayTrackSvc<T: PlaybackService>(pub Arc<T>); 4212 - impl< 4213 - T: PlaybackService, 4214 - > tonic::server::UnaryService<super::PlayTrackRequest> 4215 - for PlayTrackSvc<T> { 3611 + impl<T: PlaybackService> tonic::server::UnaryService<super::PlayTrackRequest> for PlayTrackSvc<T> { 4216 3612 type Response = super::PlayTrackResponse; 4217 - type Future = BoxFuture< 4218 - tonic::Response<Self::Response>, 4219 - tonic::Status, 4220 - >; 3613 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4221 3614 fn call( 4222 3615 &mut self, 4223 3616 request: tonic::Request<super::PlayTrackRequest>, ··· 4254 3647 "/rockbox.v1alpha1.PlaybackService/PlayLikedTracks" => { 4255 3648 #[allow(non_camel_case_types)] 4256 3649 struct PlayLikedTracksSvc<T: PlaybackService>(pub Arc<T>); 4257 - impl< 4258 - T: PlaybackService, 4259 - > tonic::server::UnaryService<super::PlayLikedTracksRequest> 4260 - for PlayLikedTracksSvc<T> { 3650 + impl<T: PlaybackService> 3651 + tonic::server::UnaryService<super::PlayLikedTracksRequest> 3652 + for PlayLikedTracksSvc<T> 3653 + { 4261 3654 type Response = super::PlayLikedTracksResponse; 4262 - type Future = BoxFuture< 4263 - tonic::Response<Self::Response>, 4264 - tonic::Status, 4265 - >; 3655 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4266 3656 fn call( 4267 3657 &mut self, 4268 3658 request: tonic::Request<super::PlayLikedTracksRequest>, 4269 3659 ) -> Self::Future { 4270 3660 let inner = Arc::clone(&self.0); 4271 3661 let fut = async move { 4272 - <T as PlaybackService>::play_liked_tracks(&inner, request) 4273 - .await 3662 + <T as PlaybackService>::play_liked_tracks(&inner, request).await 4274 3663 }; 4275 3664 Box::pin(fut) 4276 3665 } ··· 4300 3689 "/rockbox.v1alpha1.PlaybackService/PlayAllTracks" => { 4301 3690 #[allow(non_camel_case_types)] 4302 3691 struct PlayAllTracksSvc<T: PlaybackService>(pub Arc<T>); 4303 - impl< 4304 - T: PlaybackService, 4305 - > tonic::server::UnaryService<super::PlayAllTracksRequest> 4306 - for PlayAllTracksSvc<T> { 3692 + impl<T: PlaybackService> 3693 + tonic::server::UnaryService<super::PlayAllTracksRequest> 3694 + for PlayAllTracksSvc<T> 3695 + { 4307 3696 type Response = super::PlayAllTracksResponse; 4308 - type Future = BoxFuture< 4309 - tonic::Response<Self::Response>, 4310 - tonic::Status, 4311 - >; 3697 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 4312 3698 fn call( 4313 3699 &mut self, 4314 3700 request: tonic::Request<super::PlayAllTracksRequest>, 4315 3701 ) -> Self::Future { 4316 3702 let inner = Arc::clone(&self.0); 4317 3703 let fut = async move { 4318 - <T as PlaybackService>::play_all_tracks(&inner, request) 4319 - .await 3704 + <T as PlaybackService>::play_all_tracks(&inner, request).await 4320 3705 }; 4321 3706 Box::pin(fut) 4322 3707 } ··· 4346 3731 "/rockbox.v1alpha1.PlaybackService/StreamCurrentTrack" => { 4347 3732 #[allow(non_camel_case_types)] 4348 3733 struct StreamCurrentTrackSvc<T: PlaybackService>(pub Arc<T>); 4349 - impl< 4350 - T: PlaybackService, 4351 - > tonic::server::ServerStreamingService< 4352 - super::StreamCurrentTrackRequest, 4353 - > for StreamCurrentTrackSvc<T> { 3734 + impl<T: PlaybackService> 3735 + tonic::server::ServerStreamingService<super::StreamCurrentTrackRequest> 3736 + for StreamCurrentTrackSvc<T> 3737 + { 4354 3738 type Response = super::CurrentTrackResponse; 4355 3739 type ResponseStream = T::StreamCurrentTrackStream; 4356 - type Future = BoxFuture< 4357 - tonic::Response<Self::ResponseStream>, 4358 - tonic::Status, 4359 - >; 3740 + type Future = 3741 + BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>; 4360 3742 fn call( 4361 3743 &mut self, 4362 3744 request: tonic::Request<super::StreamCurrentTrackRequest>, 4363 3745 ) -> Self::Future { 4364 3746 let inner = Arc::clone(&self.0); 4365 3747 let fut = async move { 4366 - <T as PlaybackService>::stream_current_track( 4367 - &inner, 4368 - request, 4369 - ) 4370 - .await 3748 + <T as PlaybackService>::stream_current_track(&inner, request).await 4371 3749 }; 4372 3750 Box::pin(fut) 4373 3751 } ··· 4397 3775 "/rockbox.v1alpha1.PlaybackService/StreamStatus" => { 4398 3776 #[allow(non_camel_case_types)] 4399 3777 struct StreamStatusSvc<T: PlaybackService>(pub Arc<T>); 4400 - impl< 4401 - T: PlaybackService, 4402 - > tonic::server::ServerStreamingService<super::StreamStatusRequest> 4403 - for StreamStatusSvc<T> { 3778 + impl<T: PlaybackService> 3779 + tonic::server::ServerStreamingService<super::StreamStatusRequest> 3780 + for StreamStatusSvc<T> 3781 + { 4404 3782 type Response = super::StatusResponse; 4405 3783 type ResponseStream = T::StreamStatusStream; 4406 - type Future = BoxFuture< 4407 - tonic::Response<Self::ResponseStream>, 4408 - tonic::Status, 4409 - >; 3784 + type Future = 3785 + BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>; 4410 3786 fn call( 4411 3787 &mut self, 4412 3788 request: tonic::Request<super::StreamStatusRequest>, ··· 4443 3819 "/rockbox.v1alpha1.PlaybackService/StreamPlaylist" => { 4444 3820 #[allow(non_camel_case_types)] 4445 3821 struct StreamPlaylistSvc<T: PlaybackService>(pub Arc<T>); 4446 - impl< 4447 - T: PlaybackService, 4448 - > tonic::server::ServerStreamingService<super::StreamPlaylistRequest> 4449 - for StreamPlaylistSvc<T> { 3822 + impl<T: PlaybackService> 3823 + tonic::server::ServerStreamingService<super::StreamPlaylistRequest> 3824 + for StreamPlaylistSvc<T> 3825 + { 4450 3826 type Response = super::PlaylistResponse; 4451 3827 type ResponseStream = T::StreamPlaylistStream; 4452 - type Future = BoxFuture< 4453 - tonic::Response<Self::ResponseStream>, 4454 - tonic::Status, 4455 - >; 3828 + type Future = 3829 + BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>; 4456 3830 fn call( 4457 3831 &mut self, 4458 3832 request: tonic::Request<super::StreamPlaylistRequest>, 4459 3833 ) -> Self::Future { 4460 3834 let inner = Arc::clone(&self.0); 4461 3835 let fut = async move { 4462 - <T as PlaybackService>::stream_playlist(&inner, request) 4463 - .await 3836 + <T as PlaybackService>::stream_playlist(&inner, request).await 4464 3837 }; 4465 3838 Box::pin(fut) 4466 3839 } ··· 4487 3860 }; 4488 3861 Box::pin(fut) 4489 3862 } 4490 - _ => { 4491 - Box::pin(async move { 4492 - let mut response = http::Response::new(empty_body()); 4493 - let headers = response.headers_mut(); 4494 - headers 4495 - .insert( 4496 - tonic::Status::GRPC_STATUS, 4497 - (tonic::Code::Unimplemented as i32).into(), 4498 - ); 4499 - headers 4500 - .insert( 4501 - http::header::CONTENT_TYPE, 4502 - tonic::metadata::GRPC_CONTENT_TYPE, 4503 - ); 4504 - Ok(response) 4505 - }) 4506 - } 3863 + _ => Box::pin(async move { 3864 + let mut response = http::Response::new(empty_body()); 3865 + let headers = response.headers_mut(); 3866 + headers.insert( 3867 + tonic::Status::GRPC_STATUS, 3868 + (tonic::Code::Unimplemented as i32).into(), 3869 + ); 3870 + headers.insert( 3871 + http::header::CONTENT_TYPE, 3872 + tonic::metadata::GRPC_CONTENT_TYPE, 3873 + ); 3874 + Ok(response) 3875 + }), 4507 3876 } 4508 3877 } 4509 3878 } ··· 4710 4079 dead_code, 4711 4080 missing_docs, 4712 4081 clippy::wildcard_imports, 4713 - clippy::let_unit_value, 4082 + clippy::let_unit_value 4714 4083 )] 4715 - use tonic::codegen::*; 4716 4084 use tonic::codegen::http::Uri; 4085 + use tonic::codegen::*; 4717 4086 #[derive(Debug, Clone)] 4718 4087 pub struct PlaylistServiceClient<T> { 4719 4088 inner: tonic::client::Grpc<T>, ··· 4757 4126 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 4758 4127 >, 4759 4128 >, 4760 - <T as tonic::codegen::Service< 4761 - http::Request<tonic::body::BoxBody>, 4762 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 4129 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 4130 + Into<StdError> + std::marker::Send + std::marker::Sync, 4763 4131 { 4764 4132 PlaylistServiceClient::new(InterceptedService::new(inner, interceptor)) 4765 4133 } ··· 4797 4165 pub async fn get_current( 4798 4166 &mut self, 4799 4167 request: impl tonic::IntoRequest<super::GetCurrentRequest>, 4800 - ) -> std::result::Result< 4801 - tonic::Response<super::GetCurrentResponse>, 4802 - tonic::Status, 4803 - > { 4804 - self.inner 4805 - .ready() 4806 - .await 4807 - .map_err(|e| { 4808 - tonic::Status::unknown( 4809 - format!("Service was not ready: {}", e.into()), 4810 - ) 4811 - })?; 4168 + ) -> std::result::Result<tonic::Response<super::GetCurrentResponse>, tonic::Status> 4169 + { 4170 + self.inner.ready().await.map_err(|e| { 4171 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4172 + })?; 4812 4173 let codec = tonic::codec::ProstCodec::default(); 4813 4174 let path = http::uri::PathAndQuery::from_static( 4814 4175 "/rockbox.v1alpha1.PlaylistService/GetCurrent", 4815 4176 ); 4816 4177 let mut req = request.into_request(); 4817 - req.extensions_mut() 4818 - .insert( 4819 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetCurrent"), 4820 - ); 4178 + req.extensions_mut().insert(GrpcMethod::new( 4179 + "rockbox.v1alpha1.PlaylistService", 4180 + "GetCurrent", 4181 + )); 4821 4182 self.inner.unary(req, path, codec).await 4822 4183 } 4823 4184 pub async fn get_resume_info( 4824 4185 &mut self, 4825 4186 request: impl tonic::IntoRequest<super::GetResumeInfoRequest>, 4826 - ) -> std::result::Result< 4827 - tonic::Response<super::GetResumeInfoResponse>, 4828 - tonic::Status, 4829 - > { 4830 - self.inner 4831 - .ready() 4832 - .await 4833 - .map_err(|e| { 4834 - tonic::Status::unknown( 4835 - format!("Service was not ready: {}", e.into()), 4836 - ) 4837 - })?; 4187 + ) -> std::result::Result<tonic::Response<super::GetResumeInfoResponse>, tonic::Status> 4188 + { 4189 + self.inner.ready().await.map_err(|e| { 4190 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4191 + })?; 4838 4192 let codec = tonic::codec::ProstCodec::default(); 4839 4193 let path = http::uri::PathAndQuery::from_static( 4840 4194 "/rockbox.v1alpha1.PlaylistService/GetResumeInfo", 4841 4195 ); 4842 4196 let mut req = request.into_request(); 4843 - req.extensions_mut() 4844 - .insert( 4845 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetResumeInfo"), 4846 - ); 4197 + req.extensions_mut().insert(GrpcMethod::new( 4198 + "rockbox.v1alpha1.PlaylistService", 4199 + "GetResumeInfo", 4200 + )); 4847 4201 self.inner.unary(req, path, codec).await 4848 4202 } 4849 4203 pub async fn get_track_info( 4850 4204 &mut self, 4851 4205 request: impl tonic::IntoRequest<super::GetTrackInfoRequest>, 4852 - ) -> std::result::Result< 4853 - tonic::Response<super::GetTrackInfoResponse>, 4854 - tonic::Status, 4855 - > { 4856 - self.inner 4857 - .ready() 4858 - .await 4859 - .map_err(|e| { 4860 - tonic::Status::unknown( 4861 - format!("Service was not ready: {}", e.into()), 4862 - ) 4863 - })?; 4206 + ) -> std::result::Result<tonic::Response<super::GetTrackInfoResponse>, tonic::Status> 4207 + { 4208 + self.inner.ready().await.map_err(|e| { 4209 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4210 + })?; 4864 4211 let codec = tonic::codec::ProstCodec::default(); 4865 4212 let path = http::uri::PathAndQuery::from_static( 4866 4213 "/rockbox.v1alpha1.PlaylistService/GetTrackInfo", 4867 4214 ); 4868 4215 let mut req = request.into_request(); 4869 - req.extensions_mut() 4870 - .insert( 4871 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetTrackInfo"), 4872 - ); 4216 + req.extensions_mut().insert(GrpcMethod::new( 4217 + "rockbox.v1alpha1.PlaylistService", 4218 + "GetTrackInfo", 4219 + )); 4873 4220 self.inner.unary(req, path, codec).await 4874 4221 } 4875 4222 pub async fn get_first_index( 4876 4223 &mut self, 4877 4224 request: impl tonic::IntoRequest<super::GetFirstIndexRequest>, 4878 - ) -> std::result::Result< 4879 - tonic::Response<super::GetFirstIndexResponse>, 4880 - tonic::Status, 4881 - > { 4882 - self.inner 4883 - .ready() 4884 - .await 4885 - .map_err(|e| { 4886 - tonic::Status::unknown( 4887 - format!("Service was not ready: {}", e.into()), 4888 - ) 4889 - })?; 4225 + ) -> std::result::Result<tonic::Response<super::GetFirstIndexResponse>, tonic::Status> 4226 + { 4227 + self.inner.ready().await.map_err(|e| { 4228 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4229 + })?; 4890 4230 let codec = tonic::codec::ProstCodec::default(); 4891 4231 let path = http::uri::PathAndQuery::from_static( 4892 4232 "/rockbox.v1alpha1.PlaylistService/GetFirstIndex", 4893 4233 ); 4894 4234 let mut req = request.into_request(); 4895 - req.extensions_mut() 4896 - .insert( 4897 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "GetFirstIndex"), 4898 - ); 4235 + req.extensions_mut().insert(GrpcMethod::new( 4236 + "rockbox.v1alpha1.PlaylistService", 4237 + "GetFirstIndex", 4238 + )); 4899 4239 self.inner.unary(req, path, codec).await 4900 4240 } 4901 4241 pub async fn get_display_index( 4902 4242 &mut self, 4903 4243 request: impl tonic::IntoRequest<super::GetDisplayIndexRequest>, 4904 - ) -> std::result::Result< 4905 - tonic::Response<super::GetDisplayIndexResponse>, 4906 - tonic::Status, 4907 - > { 4908 - self.inner 4909 - .ready() 4910 - .await 4911 - .map_err(|e| { 4912 - tonic::Status::unknown( 4913 - format!("Service was not ready: {}", e.into()), 4914 - ) 4915 - })?; 4244 + ) -> std::result::Result<tonic::Response<super::GetDisplayIndexResponse>, tonic::Status> 4245 + { 4246 + self.inner.ready().await.map_err(|e| { 4247 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4248 + })?; 4916 4249 let codec = tonic::codec::ProstCodec::default(); 4917 4250 let path = http::uri::PathAndQuery::from_static( 4918 4251 "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex", 4919 4252 ); 4920 4253 let mut req = request.into_request(); 4921 - req.extensions_mut() 4922 - .insert( 4923 - GrpcMethod::new( 4924 - "rockbox.v1alpha1.PlaylistService", 4925 - "GetDisplayIndex", 4926 - ), 4927 - ); 4254 + req.extensions_mut().insert(GrpcMethod::new( 4255 + "rockbox.v1alpha1.PlaylistService", 4256 + "GetDisplayIndex", 4257 + )); 4928 4258 self.inner.unary(req, path, codec).await 4929 4259 } 4930 4260 pub async fn amount( 4931 4261 &mut self, 4932 4262 request: impl tonic::IntoRequest<super::AmountRequest>, 4933 4263 ) -> std::result::Result<tonic::Response<super::AmountResponse>, tonic::Status> { 4934 - self.inner 4935 - .ready() 4936 - .await 4937 - .map_err(|e| { 4938 - tonic::Status::unknown( 4939 - format!("Service was not ready: {}", e.into()), 4940 - ) 4941 - })?; 4264 + self.inner.ready().await.map_err(|e| { 4265 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4266 + })?; 4942 4267 let codec = tonic::codec::ProstCodec::default(); 4943 - let path = http::uri::PathAndQuery::from_static( 4944 - "/rockbox.v1alpha1.PlaylistService/Amount", 4945 - ); 4268 + let path = 4269 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Amount"); 4946 4270 let mut req = request.into_request(); 4947 - req.extensions_mut() 4948 - .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Amount")); 4271 + req.extensions_mut().insert(GrpcMethod::new( 4272 + "rockbox.v1alpha1.PlaylistService", 4273 + "Amount", 4274 + )); 4949 4275 self.inner.unary(req, path, codec).await 4950 4276 } 4951 4277 pub async fn playlist_resume( 4952 4278 &mut self, 4953 4279 request: impl tonic::IntoRequest<super::PlaylistResumeRequest>, 4954 - ) -> std::result::Result< 4955 - tonic::Response<super::PlaylistResumeResponse>, 4956 - tonic::Status, 4957 - > { 4958 - self.inner 4959 - .ready() 4960 - .await 4961 - .map_err(|e| { 4962 - tonic::Status::unknown( 4963 - format!("Service was not ready: {}", e.into()), 4964 - ) 4965 - })?; 4280 + ) -> std::result::Result<tonic::Response<super::PlaylistResumeResponse>, tonic::Status> 4281 + { 4282 + self.inner.ready().await.map_err(|e| { 4283 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4284 + })?; 4966 4285 let codec = tonic::codec::ProstCodec::default(); 4967 4286 let path = http::uri::PathAndQuery::from_static( 4968 4287 "/rockbox.v1alpha1.PlaylistService/PlaylistResume", 4969 4288 ); 4970 4289 let mut req = request.into_request(); 4971 - req.extensions_mut() 4972 - .insert( 4973 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "PlaylistResume"), 4974 - ); 4290 + req.extensions_mut().insert(GrpcMethod::new( 4291 + "rockbox.v1alpha1.PlaylistService", 4292 + "PlaylistResume", 4293 + )); 4975 4294 self.inner.unary(req, path, codec).await 4976 4295 } 4977 4296 pub async fn resume_track( 4978 4297 &mut self, 4979 4298 request: impl tonic::IntoRequest<super::ResumeTrackRequest>, 4980 - ) -> std::result::Result< 4981 - tonic::Response<super::ResumeTrackResponse>, 4982 - tonic::Status, 4983 - > { 4984 - self.inner 4985 - .ready() 4986 - .await 4987 - .map_err(|e| { 4988 - tonic::Status::unknown( 4989 - format!("Service was not ready: {}", e.into()), 4990 - ) 4991 - })?; 4299 + ) -> std::result::Result<tonic::Response<super::ResumeTrackResponse>, tonic::Status> 4300 + { 4301 + self.inner.ready().await.map_err(|e| { 4302 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4303 + })?; 4992 4304 let codec = tonic::codec::ProstCodec::default(); 4993 4305 let path = http::uri::PathAndQuery::from_static( 4994 4306 "/rockbox.v1alpha1.PlaylistService/ResumeTrack", 4995 4307 ); 4996 4308 let mut req = request.into_request(); 4997 - req.extensions_mut() 4998 - .insert( 4999 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "ResumeTrack"), 5000 - ); 4309 + req.extensions_mut().insert(GrpcMethod::new( 4310 + "rockbox.v1alpha1.PlaylistService", 4311 + "ResumeTrack", 4312 + )); 5001 4313 self.inner.unary(req, path, codec).await 5002 4314 } 5003 4315 pub async fn set_modified( 5004 4316 &mut self, 5005 4317 request: impl tonic::IntoRequest<super::SetModifiedRequest>, 5006 - ) -> std::result::Result< 5007 - tonic::Response<super::SetModifiedResponse>, 5008 - tonic::Status, 5009 - > { 5010 - self.inner 5011 - .ready() 5012 - .await 5013 - .map_err(|e| { 5014 - tonic::Status::unknown( 5015 - format!("Service was not ready: {}", e.into()), 5016 - ) 5017 - })?; 4318 + ) -> std::result::Result<tonic::Response<super::SetModifiedResponse>, tonic::Status> 4319 + { 4320 + self.inner.ready().await.map_err(|e| { 4321 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4322 + })?; 5018 4323 let codec = tonic::codec::ProstCodec::default(); 5019 4324 let path = http::uri::PathAndQuery::from_static( 5020 4325 "/rockbox.v1alpha1.PlaylistService/SetModified", 5021 4326 ); 5022 4327 let mut req = request.into_request(); 5023 - req.extensions_mut() 5024 - .insert( 5025 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "SetModified"), 5026 - ); 4328 + req.extensions_mut().insert(GrpcMethod::new( 4329 + "rockbox.v1alpha1.PlaylistService", 4330 + "SetModified", 4331 + )); 5027 4332 self.inner.unary(req, path, codec).await 5028 4333 } 5029 4334 pub async fn start( 5030 4335 &mut self, 5031 4336 request: impl tonic::IntoRequest<super::StartRequest>, 5032 4337 ) -> std::result::Result<tonic::Response<super::StartResponse>, tonic::Status> { 5033 - self.inner 5034 - .ready() 5035 - .await 5036 - .map_err(|e| { 5037 - tonic::Status::unknown( 5038 - format!("Service was not ready: {}", e.into()), 5039 - ) 5040 - })?; 4338 + self.inner.ready().await.map_err(|e| { 4339 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4340 + })?; 5041 4341 let codec = tonic::codec::ProstCodec::default(); 5042 - let path = http::uri::PathAndQuery::from_static( 5043 - "/rockbox.v1alpha1.PlaylistService/Start", 5044 - ); 4342 + let path = 4343 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Start"); 5045 4344 let mut req = request.into_request(); 5046 4345 req.extensions_mut() 5047 4346 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Start")); ··· 5051 4350 &mut self, 5052 4351 request: impl tonic::IntoRequest<super::SyncRequest>, 5053 4352 ) -> std::result::Result<tonic::Response<super::SyncResponse>, tonic::Status> { 5054 - self.inner 5055 - .ready() 5056 - .await 5057 - .map_err(|e| { 5058 - tonic::Status::unknown( 5059 - format!("Service was not ready: {}", e.into()), 5060 - ) 5061 - })?; 4353 + self.inner.ready().await.map_err(|e| { 4354 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4355 + })?; 5062 4356 let codec = tonic::codec::ProstCodec::default(); 5063 - let path = http::uri::PathAndQuery::from_static( 5064 - "/rockbox.v1alpha1.PlaylistService/Sync", 5065 - ); 4357 + let path = 4358 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.PlaylistService/Sync"); 5066 4359 let mut req = request.into_request(); 5067 4360 req.extensions_mut() 5068 4361 .insert(GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "Sync")); ··· 5071 4364 pub async fn remove_all_tracks( 5072 4365 &mut self, 5073 4366 request: impl tonic::IntoRequest<super::RemoveAllTracksRequest>, 5074 - ) -> std::result::Result< 5075 - tonic::Response<super::RemoveAllTracksResponse>, 5076 - tonic::Status, 5077 - > { 5078 - self.inner 5079 - .ready() 5080 - .await 5081 - .map_err(|e| { 5082 - tonic::Status::unknown( 5083 - format!("Service was not ready: {}", e.into()), 5084 - ) 5085 - })?; 4367 + ) -> std::result::Result<tonic::Response<super::RemoveAllTracksResponse>, tonic::Status> 4368 + { 4369 + self.inner.ready().await.map_err(|e| { 4370 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4371 + })?; 5086 4372 let codec = tonic::codec::ProstCodec::default(); 5087 4373 let path = http::uri::PathAndQuery::from_static( 5088 4374 "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks", 5089 4375 ); 5090 4376 let mut req = request.into_request(); 5091 - req.extensions_mut() 5092 - .insert( 5093 - GrpcMethod::new( 5094 - "rockbox.v1alpha1.PlaylistService", 5095 - "RemoveAllTracks", 5096 - ), 5097 - ); 4377 + req.extensions_mut().insert(GrpcMethod::new( 4378 + "rockbox.v1alpha1.PlaylistService", 4379 + "RemoveAllTracks", 4380 + )); 5098 4381 self.inner.unary(req, path, codec).await 5099 4382 } 5100 4383 pub async fn remove_tracks( 5101 4384 &mut self, 5102 4385 request: impl tonic::IntoRequest<super::RemoveTracksRequest>, 5103 - ) -> std::result::Result< 5104 - tonic::Response<super::RemoveTracksResponse>, 5105 - tonic::Status, 5106 - > { 5107 - self.inner 5108 - .ready() 5109 - .await 5110 - .map_err(|e| { 5111 - tonic::Status::unknown( 5112 - format!("Service was not ready: {}", e.into()), 5113 - ) 5114 - })?; 4386 + ) -> std::result::Result<tonic::Response<super::RemoveTracksResponse>, tonic::Status> 4387 + { 4388 + self.inner.ready().await.map_err(|e| { 4389 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4390 + })?; 5115 4391 let codec = tonic::codec::ProstCodec::default(); 5116 4392 let path = http::uri::PathAndQuery::from_static( 5117 4393 "/rockbox.v1alpha1.PlaylistService/RemoveTracks", 5118 4394 ); 5119 4395 let mut req = request.into_request(); 5120 - req.extensions_mut() 5121 - .insert( 5122 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "RemoveTracks"), 5123 - ); 4396 + req.extensions_mut().insert(GrpcMethod::new( 4397 + "rockbox.v1alpha1.PlaylistService", 4398 + "RemoveTracks", 4399 + )); 5124 4400 self.inner.unary(req, path, codec).await 5125 4401 } 5126 4402 pub async fn create_playlist( 5127 4403 &mut self, 5128 4404 request: impl tonic::IntoRequest<super::CreatePlaylistRequest>, 5129 - ) -> std::result::Result< 5130 - tonic::Response<super::CreatePlaylistResponse>, 5131 - tonic::Status, 5132 - > { 5133 - self.inner 5134 - .ready() 5135 - .await 5136 - .map_err(|e| { 5137 - tonic::Status::unknown( 5138 - format!("Service was not ready: {}", e.into()), 5139 - ) 5140 - })?; 4405 + ) -> std::result::Result<tonic::Response<super::CreatePlaylistResponse>, tonic::Status> 4406 + { 4407 + self.inner.ready().await.map_err(|e| { 4408 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4409 + })?; 5141 4410 let codec = tonic::codec::ProstCodec::default(); 5142 4411 let path = http::uri::PathAndQuery::from_static( 5143 4412 "/rockbox.v1alpha1.PlaylistService/CreatePlaylist", 5144 4413 ); 5145 4414 let mut req = request.into_request(); 5146 - req.extensions_mut() 5147 - .insert( 5148 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "CreatePlaylist"), 5149 - ); 4415 + req.extensions_mut().insert(GrpcMethod::new( 4416 + "rockbox.v1alpha1.PlaylistService", 4417 + "CreatePlaylist", 4418 + )); 5150 4419 self.inner.unary(req, path, codec).await 5151 4420 } 5152 4421 pub async fn insert_tracks( 5153 4422 &mut self, 5154 4423 request: impl tonic::IntoRequest<super::InsertTracksRequest>, 5155 - ) -> std::result::Result< 5156 - tonic::Response<super::InsertTracksResponse>, 5157 - tonic::Status, 5158 - > { 5159 - self.inner 5160 - .ready() 5161 - .await 5162 - .map_err(|e| { 5163 - tonic::Status::unknown( 5164 - format!("Service was not ready: {}", e.into()), 5165 - ) 5166 - })?; 4424 + ) -> std::result::Result<tonic::Response<super::InsertTracksResponse>, tonic::Status> 4425 + { 4426 + self.inner.ready().await.map_err(|e| { 4427 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4428 + })?; 5167 4429 let codec = tonic::codec::ProstCodec::default(); 5168 4430 let path = http::uri::PathAndQuery::from_static( 5169 4431 "/rockbox.v1alpha1.PlaylistService/InsertTracks", 5170 4432 ); 5171 4433 let mut req = request.into_request(); 5172 - req.extensions_mut() 5173 - .insert( 5174 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertTracks"), 5175 - ); 4434 + req.extensions_mut().insert(GrpcMethod::new( 4435 + "rockbox.v1alpha1.PlaylistService", 4436 + "InsertTracks", 4437 + )); 5176 4438 self.inner.unary(req, path, codec).await 5177 4439 } 5178 4440 pub async fn insert_directory( 5179 4441 &mut self, 5180 4442 request: impl tonic::IntoRequest<super::InsertDirectoryRequest>, 5181 - ) -> std::result::Result< 5182 - tonic::Response<super::InsertDirectoryResponse>, 5183 - tonic::Status, 5184 - > { 5185 - self.inner 5186 - .ready() 5187 - .await 5188 - .map_err(|e| { 5189 - tonic::Status::unknown( 5190 - format!("Service was not ready: {}", e.into()), 5191 - ) 5192 - })?; 4443 + ) -> std::result::Result<tonic::Response<super::InsertDirectoryResponse>, tonic::Status> 4444 + { 4445 + self.inner.ready().await.map_err(|e| { 4446 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4447 + })?; 5193 4448 let codec = tonic::codec::ProstCodec::default(); 5194 4449 let path = http::uri::PathAndQuery::from_static( 5195 4450 "/rockbox.v1alpha1.PlaylistService/InsertDirectory", 5196 4451 ); 5197 4452 let mut req = request.into_request(); 5198 - req.extensions_mut() 5199 - .insert( 5200 - GrpcMethod::new( 5201 - "rockbox.v1alpha1.PlaylistService", 5202 - "InsertDirectory", 5203 - ), 5204 - ); 4453 + req.extensions_mut().insert(GrpcMethod::new( 4454 + "rockbox.v1alpha1.PlaylistService", 4455 + "InsertDirectory", 4456 + )); 5205 4457 self.inner.unary(req, path, codec).await 5206 4458 } 5207 4459 pub async fn insert_playlist( 5208 4460 &mut self, 5209 4461 request: impl tonic::IntoRequest<super::InsertPlaylistRequest>, 5210 - ) -> std::result::Result< 5211 - tonic::Response<super::InsertPlaylistResponse>, 5212 - tonic::Status, 5213 - > { 5214 - self.inner 5215 - .ready() 5216 - .await 5217 - .map_err(|e| { 5218 - tonic::Status::unknown( 5219 - format!("Service was not ready: {}", e.into()), 5220 - ) 5221 - })?; 4462 + ) -> std::result::Result<tonic::Response<super::InsertPlaylistResponse>, tonic::Status> 4463 + { 4464 + self.inner.ready().await.map_err(|e| { 4465 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4466 + })?; 5222 4467 let codec = tonic::codec::ProstCodec::default(); 5223 4468 let path = http::uri::PathAndQuery::from_static( 5224 4469 "/rockbox.v1alpha1.PlaylistService/InsertPlaylist", 5225 4470 ); 5226 4471 let mut req = request.into_request(); 5227 - req.extensions_mut() 5228 - .insert( 5229 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertPlaylist"), 5230 - ); 4472 + req.extensions_mut().insert(GrpcMethod::new( 4473 + "rockbox.v1alpha1.PlaylistService", 4474 + "InsertPlaylist", 4475 + )); 5231 4476 self.inner.unary(req, path, codec).await 5232 4477 } 5233 4478 pub async fn insert_album( 5234 4479 &mut self, 5235 4480 request: impl tonic::IntoRequest<super::InsertAlbumRequest>, 5236 - ) -> std::result::Result< 5237 - tonic::Response<super::InsertAlbumResponse>, 5238 - tonic::Status, 5239 - > { 5240 - self.inner 5241 - .ready() 5242 - .await 5243 - .map_err(|e| { 5244 - tonic::Status::unknown( 5245 - format!("Service was not ready: {}", e.into()), 5246 - ) 5247 - })?; 4481 + ) -> std::result::Result<tonic::Response<super::InsertAlbumResponse>, tonic::Status> 4482 + { 4483 + self.inner.ready().await.map_err(|e| { 4484 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4485 + })?; 5248 4486 let codec = tonic::codec::ProstCodec::default(); 5249 4487 let path = http::uri::PathAndQuery::from_static( 5250 4488 "/rockbox.v1alpha1.PlaylistService/InsertAlbum", 5251 4489 ); 5252 4490 let mut req = request.into_request(); 5253 - req.extensions_mut() 5254 - .insert( 5255 - GrpcMethod::new("rockbox.v1alpha1.PlaylistService", "InsertAlbum"), 5256 - ); 4491 + req.extensions_mut().insert(GrpcMethod::new( 4492 + "rockbox.v1alpha1.PlaylistService", 4493 + "InsertAlbum", 4494 + )); 5257 4495 self.inner.unary(req, path, codec).await 5258 4496 } 5259 4497 pub async fn insert_artist_tracks( 5260 4498 &mut self, 5261 4499 request: impl tonic::IntoRequest<super::InsertArtistTracksRequest>, 5262 - ) -> std::result::Result< 5263 - tonic::Response<super::InsertArtistTracksResponse>, 5264 - tonic::Status, 5265 - > { 5266 - self.inner 5267 - .ready() 5268 - .await 5269 - .map_err(|e| { 5270 - tonic::Status::unknown( 5271 - format!("Service was not ready: {}", e.into()), 5272 - ) 5273 - })?; 4500 + ) -> std::result::Result<tonic::Response<super::InsertArtistTracksResponse>, tonic::Status> 4501 + { 4502 + self.inner.ready().await.map_err(|e| { 4503 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4504 + })?; 5274 4505 let codec = tonic::codec::ProstCodec::default(); 5275 4506 let path = http::uri::PathAndQuery::from_static( 5276 4507 "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks", 5277 4508 ); 5278 4509 let mut req = request.into_request(); 5279 - req.extensions_mut() 5280 - .insert( 5281 - GrpcMethod::new( 5282 - "rockbox.v1alpha1.PlaylistService", 5283 - "InsertArtistTracks", 5284 - ), 5285 - ); 4510 + req.extensions_mut().insert(GrpcMethod::new( 4511 + "rockbox.v1alpha1.PlaylistService", 4512 + "InsertArtistTracks", 4513 + )); 5286 4514 self.inner.unary(req, path, codec).await 5287 4515 } 5288 4516 pub async fn shuffle_playlist( 5289 4517 &mut self, 5290 4518 request: impl tonic::IntoRequest<super::ShufflePlaylistRequest>, 5291 - ) -> std::result::Result< 5292 - tonic::Response<super::ShufflePlaylistResponse>, 5293 - tonic::Status, 5294 - > { 5295 - self.inner 5296 - .ready() 5297 - .await 5298 - .map_err(|e| { 5299 - tonic::Status::unknown( 5300 - format!("Service was not ready: {}", e.into()), 5301 - ) 5302 - })?; 4519 + ) -> std::result::Result<tonic::Response<super::ShufflePlaylistResponse>, tonic::Status> 4520 + { 4521 + self.inner.ready().await.map_err(|e| { 4522 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 4523 + })?; 5303 4524 let codec = tonic::codec::ProstCodec::default(); 5304 4525 let path = http::uri::PathAndQuery::from_static( 5305 4526 "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist", 5306 4527 ); 5307 4528 let mut req = request.into_request(); 5308 - req.extensions_mut() 5309 - .insert( 5310 - GrpcMethod::new( 5311 - "rockbox.v1alpha1.PlaylistService", 5312 - "ShufflePlaylist", 5313 - ), 5314 - ); 4529 + req.extensions_mut().insert(GrpcMethod::new( 4530 + "rockbox.v1alpha1.PlaylistService", 4531 + "ShufflePlaylist", 4532 + )); 5315 4533 self.inner.unary(req, path, codec).await 5316 4534 } 5317 4535 } ··· 5323 4541 dead_code, 5324 4542 missing_docs, 5325 4543 clippy::wildcard_imports, 5326 - clippy::let_unit_value, 4544 + clippy::let_unit_value 5327 4545 )] 5328 4546 use tonic::codegen::*; 5329 4547 /// Generated trait containing gRPC methods that should be implemented for use with PlaylistServiceServer. ··· 5332 4550 async fn get_current( 5333 4551 &self, 5334 4552 request: tonic::Request<super::GetCurrentRequest>, 5335 - ) -> std::result::Result< 5336 - tonic::Response<super::GetCurrentResponse>, 5337 - tonic::Status, 5338 - >; 4553 + ) -> std::result::Result<tonic::Response<super::GetCurrentResponse>, tonic::Status>; 5339 4554 async fn get_resume_info( 5340 4555 &self, 5341 4556 request: tonic::Request<super::GetResumeInfoRequest>, 5342 - ) -> std::result::Result< 5343 - tonic::Response<super::GetResumeInfoResponse>, 5344 - tonic::Status, 5345 - >; 4557 + ) -> std::result::Result<tonic::Response<super::GetResumeInfoResponse>, tonic::Status>; 5346 4558 async fn get_track_info( 5347 4559 &self, 5348 4560 request: tonic::Request<super::GetTrackInfoRequest>, 5349 - ) -> std::result::Result< 5350 - tonic::Response<super::GetTrackInfoResponse>, 5351 - tonic::Status, 5352 - >; 4561 + ) -> std::result::Result<tonic::Response<super::GetTrackInfoResponse>, tonic::Status>; 5353 4562 async fn get_first_index( 5354 4563 &self, 5355 4564 request: tonic::Request<super::GetFirstIndexRequest>, 5356 - ) -> std::result::Result< 5357 - tonic::Response<super::GetFirstIndexResponse>, 5358 - tonic::Status, 5359 - >; 4565 + ) -> std::result::Result<tonic::Response<super::GetFirstIndexResponse>, tonic::Status>; 5360 4566 async fn get_display_index( 5361 4567 &self, 5362 4568 request: tonic::Request<super::GetDisplayIndexRequest>, 5363 - ) -> std::result::Result< 5364 - tonic::Response<super::GetDisplayIndexResponse>, 5365 - tonic::Status, 5366 - >; 4569 + ) -> std::result::Result<tonic::Response<super::GetDisplayIndexResponse>, tonic::Status>; 5367 4570 async fn amount( 5368 4571 &self, 5369 4572 request: tonic::Request<super::AmountRequest>, ··· 5371 4574 async fn playlist_resume( 5372 4575 &self, 5373 4576 request: tonic::Request<super::PlaylistResumeRequest>, 5374 - ) -> std::result::Result< 5375 - tonic::Response<super::PlaylistResumeResponse>, 5376 - tonic::Status, 5377 - >; 4577 + ) -> std::result::Result<tonic::Response<super::PlaylistResumeResponse>, tonic::Status>; 5378 4578 async fn resume_track( 5379 4579 &self, 5380 4580 request: tonic::Request<super::ResumeTrackRequest>, 5381 - ) -> std::result::Result< 5382 - tonic::Response<super::ResumeTrackResponse>, 5383 - tonic::Status, 5384 - >; 4581 + ) -> std::result::Result<tonic::Response<super::ResumeTrackResponse>, tonic::Status>; 5385 4582 async fn set_modified( 5386 4583 &self, 5387 4584 request: tonic::Request<super::SetModifiedRequest>, 5388 - ) -> std::result::Result< 5389 - tonic::Response<super::SetModifiedResponse>, 5390 - tonic::Status, 5391 - >; 4585 + ) -> std::result::Result<tonic::Response<super::SetModifiedResponse>, tonic::Status>; 5392 4586 async fn start( 5393 4587 &self, 5394 4588 request: tonic::Request<super::StartRequest>, ··· 5400 4594 async fn remove_all_tracks( 5401 4595 &self, 5402 4596 request: tonic::Request<super::RemoveAllTracksRequest>, 5403 - ) -> std::result::Result< 5404 - tonic::Response<super::RemoveAllTracksResponse>, 5405 - tonic::Status, 5406 - >; 4597 + ) -> std::result::Result<tonic::Response<super::RemoveAllTracksResponse>, tonic::Status>; 5407 4598 async fn remove_tracks( 5408 4599 &self, 5409 4600 request: tonic::Request<super::RemoveTracksRequest>, 5410 - ) -> std::result::Result< 5411 - tonic::Response<super::RemoveTracksResponse>, 5412 - tonic::Status, 5413 - >; 4601 + ) -> std::result::Result<tonic::Response<super::RemoveTracksResponse>, tonic::Status>; 5414 4602 async fn create_playlist( 5415 4603 &self, 5416 4604 request: tonic::Request<super::CreatePlaylistRequest>, 5417 - ) -> std::result::Result< 5418 - tonic::Response<super::CreatePlaylistResponse>, 5419 - tonic::Status, 5420 - >; 4605 + ) -> std::result::Result<tonic::Response<super::CreatePlaylistResponse>, tonic::Status>; 5421 4606 async fn insert_tracks( 5422 4607 &self, 5423 4608 request: tonic::Request<super::InsertTracksRequest>, 5424 - ) -> std::result::Result< 5425 - tonic::Response<super::InsertTracksResponse>, 5426 - tonic::Status, 5427 - >; 4609 + ) -> std::result::Result<tonic::Response<super::InsertTracksResponse>, tonic::Status>; 5428 4610 async fn insert_directory( 5429 4611 &self, 5430 4612 request: tonic::Request<super::InsertDirectoryRequest>, 5431 - ) -> std::result::Result< 5432 - tonic::Response<super::InsertDirectoryResponse>, 5433 - tonic::Status, 5434 - >; 4613 + ) -> std::result::Result<tonic::Response<super::InsertDirectoryResponse>, tonic::Status>; 5435 4614 async fn insert_playlist( 5436 4615 &self, 5437 4616 request: tonic::Request<super::InsertPlaylistRequest>, 5438 - ) -> std::result::Result< 5439 - tonic::Response<super::InsertPlaylistResponse>, 5440 - tonic::Status, 5441 - >; 4617 + ) -> std::result::Result<tonic::Response<super::InsertPlaylistResponse>, tonic::Status>; 5442 4618 async fn insert_album( 5443 4619 &self, 5444 4620 request: tonic::Request<super::InsertAlbumRequest>, 5445 - ) -> std::result::Result< 5446 - tonic::Response<super::InsertAlbumResponse>, 5447 - tonic::Status, 5448 - >; 4621 + ) -> std::result::Result<tonic::Response<super::InsertAlbumResponse>, tonic::Status>; 5449 4622 async fn insert_artist_tracks( 5450 4623 &self, 5451 4624 request: tonic::Request<super::InsertArtistTracksRequest>, 5452 - ) -> std::result::Result< 5453 - tonic::Response<super::InsertArtistTracksResponse>, 5454 - tonic::Status, 5455 - >; 4625 + ) -> std::result::Result<tonic::Response<super::InsertArtistTracksResponse>, tonic::Status>; 5456 4626 async fn shuffle_playlist( 5457 4627 &self, 5458 4628 request: tonic::Request<super::ShufflePlaylistRequest>, 5459 - ) -> std::result::Result< 5460 - tonic::Response<super::ShufflePlaylistResponse>, 5461 - tonic::Status, 5462 - >; 4629 + ) -> std::result::Result<tonic::Response<super::ShufflePlaylistResponse>, tonic::Status>; 5463 4630 } 5464 4631 #[derive(Debug)] 5465 4632 pub struct PlaylistServiceServer<T> { ··· 5482 4649 max_encoding_message_size: None, 5483 4650 } 5484 4651 } 5485 - pub fn with_interceptor<F>( 5486 - inner: T, 5487 - interceptor: F, 5488 - ) -> InterceptedService<Self, F> 4652 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 5489 4653 where 5490 4654 F: tonic::service::Interceptor, 5491 4655 { ··· 5540 4704 "/rockbox.v1alpha1.PlaylistService/GetCurrent" => { 5541 4705 #[allow(non_camel_case_types)] 5542 4706 struct GetCurrentSvc<T: PlaylistService>(pub Arc<T>); 5543 - impl< 5544 - T: PlaylistService, 5545 - > tonic::server::UnaryService<super::GetCurrentRequest> 5546 - for GetCurrentSvc<T> { 4707 + impl<T: PlaylistService> tonic::server::UnaryService<super::GetCurrentRequest> 4708 + for GetCurrentSvc<T> 4709 + { 5547 4710 type Response = super::GetCurrentResponse; 5548 - type Future = BoxFuture< 5549 - tonic::Response<Self::Response>, 5550 - tonic::Status, 5551 - >; 4711 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5552 4712 fn call( 5553 4713 &mut self, 5554 4714 request: tonic::Request<super::GetCurrentRequest>, ··· 5585 4745 "/rockbox.v1alpha1.PlaylistService/GetResumeInfo" => { 5586 4746 #[allow(non_camel_case_types)] 5587 4747 struct GetResumeInfoSvc<T: PlaylistService>(pub Arc<T>); 5588 - impl< 5589 - T: PlaylistService, 5590 - > tonic::server::UnaryService<super::GetResumeInfoRequest> 5591 - for GetResumeInfoSvc<T> { 4748 + impl<T: PlaylistService> 4749 + tonic::server::UnaryService<super::GetResumeInfoRequest> 4750 + for GetResumeInfoSvc<T> 4751 + { 5592 4752 type Response = super::GetResumeInfoResponse; 5593 - type Future = BoxFuture< 5594 - tonic::Response<Self::Response>, 5595 - tonic::Status, 5596 - >; 4753 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5597 4754 fn call( 5598 4755 &mut self, 5599 4756 request: tonic::Request<super::GetResumeInfoRequest>, 5600 4757 ) -> Self::Future { 5601 4758 let inner = Arc::clone(&self.0); 5602 4759 let fut = async move { 5603 - <T as PlaylistService>::get_resume_info(&inner, request) 5604 - .await 4760 + <T as PlaylistService>::get_resume_info(&inner, request).await 5605 4761 }; 5606 4762 Box::pin(fut) 5607 4763 } ··· 5631 4787 "/rockbox.v1alpha1.PlaylistService/GetTrackInfo" => { 5632 4788 #[allow(non_camel_case_types)] 5633 4789 struct GetTrackInfoSvc<T: PlaylistService>(pub Arc<T>); 5634 - impl< 5635 - T: PlaylistService, 5636 - > tonic::server::UnaryService<super::GetTrackInfoRequest> 5637 - for GetTrackInfoSvc<T> { 4790 + impl<T: PlaylistService> tonic::server::UnaryService<super::GetTrackInfoRequest> 4791 + for GetTrackInfoSvc<T> 4792 + { 5638 4793 type Response = super::GetTrackInfoResponse; 5639 - type Future = BoxFuture< 5640 - tonic::Response<Self::Response>, 5641 - tonic::Status, 5642 - >; 4794 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5643 4795 fn call( 5644 4796 &mut self, 5645 4797 request: tonic::Request<super::GetTrackInfoRequest>, 5646 4798 ) -> Self::Future { 5647 4799 let inner = Arc::clone(&self.0); 5648 4800 let fut = async move { 5649 - <T as PlaylistService>::get_track_info(&inner, request) 5650 - .await 4801 + <T as PlaylistService>::get_track_info(&inner, request).await 5651 4802 }; 5652 4803 Box::pin(fut) 5653 4804 } ··· 5677 4828 "/rockbox.v1alpha1.PlaylistService/GetFirstIndex" => { 5678 4829 #[allow(non_camel_case_types)] 5679 4830 struct GetFirstIndexSvc<T: PlaylistService>(pub Arc<T>); 5680 - impl< 5681 - T: PlaylistService, 5682 - > tonic::server::UnaryService<super::GetFirstIndexRequest> 5683 - for GetFirstIndexSvc<T> { 4831 + impl<T: PlaylistService> 4832 + tonic::server::UnaryService<super::GetFirstIndexRequest> 4833 + for GetFirstIndexSvc<T> 4834 + { 5684 4835 type Response = super::GetFirstIndexResponse; 5685 - type Future = BoxFuture< 5686 - tonic::Response<Self::Response>, 5687 - tonic::Status, 5688 - >; 4836 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5689 4837 fn call( 5690 4838 &mut self, 5691 4839 request: tonic::Request<super::GetFirstIndexRequest>, 5692 4840 ) -> Self::Future { 5693 4841 let inner = Arc::clone(&self.0); 5694 4842 let fut = async move { 5695 - <T as PlaylistService>::get_first_index(&inner, request) 5696 - .await 4843 + <T as PlaylistService>::get_first_index(&inner, request).await 5697 4844 }; 5698 4845 Box::pin(fut) 5699 4846 } ··· 5723 4870 "/rockbox.v1alpha1.PlaylistService/GetDisplayIndex" => { 5724 4871 #[allow(non_camel_case_types)] 5725 4872 struct GetDisplayIndexSvc<T: PlaylistService>(pub Arc<T>); 5726 - impl< 5727 - T: PlaylistService, 5728 - > tonic::server::UnaryService<super::GetDisplayIndexRequest> 5729 - for GetDisplayIndexSvc<T> { 4873 + impl<T: PlaylistService> 4874 + tonic::server::UnaryService<super::GetDisplayIndexRequest> 4875 + for GetDisplayIndexSvc<T> 4876 + { 5730 4877 type Response = super::GetDisplayIndexResponse; 5731 - type Future = BoxFuture< 5732 - tonic::Response<Self::Response>, 5733 - tonic::Status, 5734 - >; 4878 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5735 4879 fn call( 5736 4880 &mut self, 5737 4881 request: tonic::Request<super::GetDisplayIndexRequest>, 5738 4882 ) -> Self::Future { 5739 4883 let inner = Arc::clone(&self.0); 5740 4884 let fut = async move { 5741 - <T as PlaylistService>::get_display_index(&inner, request) 5742 - .await 4885 + <T as PlaylistService>::get_display_index(&inner, request).await 5743 4886 }; 5744 4887 Box::pin(fut) 5745 4888 } ··· 5769 4912 "/rockbox.v1alpha1.PlaylistService/Amount" => { 5770 4913 #[allow(non_camel_case_types)] 5771 4914 struct AmountSvc<T: PlaylistService>(pub Arc<T>); 5772 - impl< 5773 - T: PlaylistService, 5774 - > tonic::server::UnaryService<super::AmountRequest> 5775 - for AmountSvc<T> { 4915 + impl<T: PlaylistService> tonic::server::UnaryService<super::AmountRequest> for AmountSvc<T> { 5776 4916 type Response = super::AmountResponse; 5777 - type Future = BoxFuture< 5778 - tonic::Response<Self::Response>, 5779 - tonic::Status, 5780 - >; 4917 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5781 4918 fn call( 5782 4919 &mut self, 5783 4920 request: tonic::Request<super::AmountRequest>, ··· 5814 4951 "/rockbox.v1alpha1.PlaylistService/PlaylistResume" => { 5815 4952 #[allow(non_camel_case_types)] 5816 4953 struct PlaylistResumeSvc<T: PlaylistService>(pub Arc<T>); 5817 - impl< 5818 - T: PlaylistService, 5819 - > tonic::server::UnaryService<super::PlaylistResumeRequest> 5820 - for PlaylistResumeSvc<T> { 4954 + impl<T: PlaylistService> 4955 + tonic::server::UnaryService<super::PlaylistResumeRequest> 4956 + for PlaylistResumeSvc<T> 4957 + { 5821 4958 type Response = super::PlaylistResumeResponse; 5822 - type Future = BoxFuture< 5823 - tonic::Response<Self::Response>, 5824 - tonic::Status, 5825 - >; 4959 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5826 4960 fn call( 5827 4961 &mut self, 5828 4962 request: tonic::Request<super::PlaylistResumeRequest>, 5829 4963 ) -> Self::Future { 5830 4964 let inner = Arc::clone(&self.0); 5831 4965 let fut = async move { 5832 - <T as PlaylistService>::playlist_resume(&inner, request) 5833 - .await 4966 + <T as PlaylistService>::playlist_resume(&inner, request).await 5834 4967 }; 5835 4968 Box::pin(fut) 5836 4969 } ··· 5860 4993 "/rockbox.v1alpha1.PlaylistService/ResumeTrack" => { 5861 4994 #[allow(non_camel_case_types)] 5862 4995 struct ResumeTrackSvc<T: PlaylistService>(pub Arc<T>); 5863 - impl< 5864 - T: PlaylistService, 5865 - > tonic::server::UnaryService<super::ResumeTrackRequest> 5866 - for ResumeTrackSvc<T> { 4996 + impl<T: PlaylistService> tonic::server::UnaryService<super::ResumeTrackRequest> 4997 + for ResumeTrackSvc<T> 4998 + { 5867 4999 type Response = super::ResumeTrackResponse; 5868 - type Future = BoxFuture< 5869 - tonic::Response<Self::Response>, 5870 - tonic::Status, 5871 - >; 5000 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5872 5001 fn call( 5873 5002 &mut self, 5874 5003 request: tonic::Request<super::ResumeTrackRequest>, ··· 5905 5034 "/rockbox.v1alpha1.PlaylistService/SetModified" => { 5906 5035 #[allow(non_camel_case_types)] 5907 5036 struct SetModifiedSvc<T: PlaylistService>(pub Arc<T>); 5908 - impl< 5909 - T: PlaylistService, 5910 - > tonic::server::UnaryService<super::SetModifiedRequest> 5911 - for SetModifiedSvc<T> { 5037 + impl<T: PlaylistService> tonic::server::UnaryService<super::SetModifiedRequest> 5038 + for SetModifiedSvc<T> 5039 + { 5912 5040 type Response = super::SetModifiedResponse; 5913 - type Future = BoxFuture< 5914 - tonic::Response<Self::Response>, 5915 - tonic::Status, 5916 - >; 5041 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5917 5042 fn call( 5918 5043 &mut self, 5919 5044 request: tonic::Request<super::SetModifiedRequest>, ··· 5950 5075 "/rockbox.v1alpha1.PlaylistService/Start" => { 5951 5076 #[allow(non_camel_case_types)] 5952 5077 struct StartSvc<T: PlaylistService>(pub Arc<T>); 5953 - impl< 5954 - T: PlaylistService, 5955 - > tonic::server::UnaryService<super::StartRequest> for StartSvc<T> { 5078 + impl<T: PlaylistService> tonic::server::UnaryService<super::StartRequest> for StartSvc<T> { 5956 5079 type Response = super::StartResponse; 5957 - type Future = BoxFuture< 5958 - tonic::Response<Self::Response>, 5959 - tonic::Status, 5960 - >; 5080 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 5961 5081 fn call( 5962 5082 &mut self, 5963 5083 request: tonic::Request<super::StartRequest>, 5964 5084 ) -> Self::Future { 5965 5085 let inner = Arc::clone(&self.0); 5966 - let fut = async move { 5967 - <T as PlaylistService>::start(&inner, request).await 5968 - }; 5086 + let fut = 5087 + async move { <T as PlaylistService>::start(&inner, request).await }; 5969 5088 Box::pin(fut) 5970 5089 } 5971 5090 } ··· 5994 5113 "/rockbox.v1alpha1.PlaylistService/Sync" => { 5995 5114 #[allow(non_camel_case_types)] 5996 5115 struct SyncSvc<T: PlaylistService>(pub Arc<T>); 5997 - impl< 5998 - T: PlaylistService, 5999 - > tonic::server::UnaryService<super::SyncRequest> for SyncSvc<T> { 5116 + impl<T: PlaylistService> tonic::server::UnaryService<super::SyncRequest> for SyncSvc<T> { 6000 5117 type Response = super::SyncResponse; 6001 - type Future = BoxFuture< 6002 - tonic::Response<Self::Response>, 6003 - tonic::Status, 6004 - >; 5118 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6005 5119 fn call( 6006 5120 &mut self, 6007 5121 request: tonic::Request<super::SyncRequest>, 6008 5122 ) -> Self::Future { 6009 5123 let inner = Arc::clone(&self.0); 6010 - let fut = async move { 6011 - <T as PlaylistService>::sync(&inner, request).await 6012 - }; 5124 + let fut = 5125 + async move { <T as PlaylistService>::sync(&inner, request).await }; 6013 5126 Box::pin(fut) 6014 5127 } 6015 5128 } ··· 6038 5151 "/rockbox.v1alpha1.PlaylistService/RemoveAllTracks" => { 6039 5152 #[allow(non_camel_case_types)] 6040 5153 struct RemoveAllTracksSvc<T: PlaylistService>(pub Arc<T>); 6041 - impl< 6042 - T: PlaylistService, 6043 - > tonic::server::UnaryService<super::RemoveAllTracksRequest> 6044 - for RemoveAllTracksSvc<T> { 5154 + impl<T: PlaylistService> 5155 + tonic::server::UnaryService<super::RemoveAllTracksRequest> 5156 + for RemoveAllTracksSvc<T> 5157 + { 6045 5158 type Response = super::RemoveAllTracksResponse; 6046 - type Future = BoxFuture< 6047 - tonic::Response<Self::Response>, 6048 - tonic::Status, 6049 - >; 5159 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6050 5160 fn call( 6051 5161 &mut self, 6052 5162 request: tonic::Request<super::RemoveAllTracksRequest>, 6053 5163 ) -> Self::Future { 6054 5164 let inner = Arc::clone(&self.0); 6055 5165 let fut = async move { 6056 - <T as PlaylistService>::remove_all_tracks(&inner, request) 6057 - .await 5166 + <T as PlaylistService>::remove_all_tracks(&inner, request).await 6058 5167 }; 6059 5168 Box::pin(fut) 6060 5169 } ··· 6084 5193 "/rockbox.v1alpha1.PlaylistService/RemoveTracks" => { 6085 5194 #[allow(non_camel_case_types)] 6086 5195 struct RemoveTracksSvc<T: PlaylistService>(pub Arc<T>); 6087 - impl< 6088 - T: PlaylistService, 6089 - > tonic::server::UnaryService<super::RemoveTracksRequest> 6090 - for RemoveTracksSvc<T> { 5196 + impl<T: PlaylistService> tonic::server::UnaryService<super::RemoveTracksRequest> 5197 + for RemoveTracksSvc<T> 5198 + { 6091 5199 type Response = super::RemoveTracksResponse; 6092 - type Future = BoxFuture< 6093 - tonic::Response<Self::Response>, 6094 - tonic::Status, 6095 - >; 5200 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6096 5201 fn call( 6097 5202 &mut self, 6098 5203 request: tonic::Request<super::RemoveTracksRequest>, ··· 6129 5234 "/rockbox.v1alpha1.PlaylistService/CreatePlaylist" => { 6130 5235 #[allow(non_camel_case_types)] 6131 5236 struct CreatePlaylistSvc<T: PlaylistService>(pub Arc<T>); 6132 - impl< 6133 - T: PlaylistService, 6134 - > tonic::server::UnaryService<super::CreatePlaylistRequest> 6135 - for CreatePlaylistSvc<T> { 5237 + impl<T: PlaylistService> 5238 + tonic::server::UnaryService<super::CreatePlaylistRequest> 5239 + for CreatePlaylistSvc<T> 5240 + { 6136 5241 type Response = super::CreatePlaylistResponse; 6137 - type Future = BoxFuture< 6138 - tonic::Response<Self::Response>, 6139 - tonic::Status, 6140 - >; 5242 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6141 5243 fn call( 6142 5244 &mut self, 6143 5245 request: tonic::Request<super::CreatePlaylistRequest>, 6144 5246 ) -> Self::Future { 6145 5247 let inner = Arc::clone(&self.0); 6146 5248 let fut = async move { 6147 - <T as PlaylistService>::create_playlist(&inner, request) 6148 - .await 5249 + <T as PlaylistService>::create_playlist(&inner, request).await 6149 5250 }; 6150 5251 Box::pin(fut) 6151 5252 } ··· 6175 5276 "/rockbox.v1alpha1.PlaylistService/InsertTracks" => { 6176 5277 #[allow(non_camel_case_types)] 6177 5278 struct InsertTracksSvc<T: PlaylistService>(pub Arc<T>); 6178 - impl< 6179 - T: PlaylistService, 6180 - > tonic::server::UnaryService<super::InsertTracksRequest> 6181 - for InsertTracksSvc<T> { 5279 + impl<T: PlaylistService> tonic::server::UnaryService<super::InsertTracksRequest> 5280 + for InsertTracksSvc<T> 5281 + { 6182 5282 type Response = super::InsertTracksResponse; 6183 - type Future = BoxFuture< 6184 - tonic::Response<Self::Response>, 6185 - tonic::Status, 6186 - >; 5283 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6187 5284 fn call( 6188 5285 &mut self, 6189 5286 request: tonic::Request<super::InsertTracksRequest>, ··· 6220 5317 "/rockbox.v1alpha1.PlaylistService/InsertDirectory" => { 6221 5318 #[allow(non_camel_case_types)] 6222 5319 struct InsertDirectorySvc<T: PlaylistService>(pub Arc<T>); 6223 - impl< 6224 - T: PlaylistService, 6225 - > tonic::server::UnaryService<super::InsertDirectoryRequest> 6226 - for InsertDirectorySvc<T> { 5320 + impl<T: PlaylistService> 5321 + tonic::server::UnaryService<super::InsertDirectoryRequest> 5322 + for InsertDirectorySvc<T> 5323 + { 6227 5324 type Response = super::InsertDirectoryResponse; 6228 - type Future = BoxFuture< 6229 - tonic::Response<Self::Response>, 6230 - tonic::Status, 6231 - >; 5325 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6232 5326 fn call( 6233 5327 &mut self, 6234 5328 request: tonic::Request<super::InsertDirectoryRequest>, 6235 5329 ) -> Self::Future { 6236 5330 let inner = Arc::clone(&self.0); 6237 5331 let fut = async move { 6238 - <T as PlaylistService>::insert_directory(&inner, request) 6239 - .await 5332 + <T as PlaylistService>::insert_directory(&inner, request).await 6240 5333 }; 6241 5334 Box::pin(fut) 6242 5335 } ··· 6266 5359 "/rockbox.v1alpha1.PlaylistService/InsertPlaylist" => { 6267 5360 #[allow(non_camel_case_types)] 6268 5361 struct InsertPlaylistSvc<T: PlaylistService>(pub Arc<T>); 6269 - impl< 6270 - T: PlaylistService, 6271 - > tonic::server::UnaryService<super::InsertPlaylistRequest> 6272 - for InsertPlaylistSvc<T> { 5362 + impl<T: PlaylistService> 5363 + tonic::server::UnaryService<super::InsertPlaylistRequest> 5364 + for InsertPlaylistSvc<T> 5365 + { 6273 5366 type Response = super::InsertPlaylistResponse; 6274 - type Future = BoxFuture< 6275 - tonic::Response<Self::Response>, 6276 - tonic::Status, 6277 - >; 5367 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6278 5368 fn call( 6279 5369 &mut self, 6280 5370 request: tonic::Request<super::InsertPlaylistRequest>, 6281 5371 ) -> Self::Future { 6282 5372 let inner = Arc::clone(&self.0); 6283 5373 let fut = async move { 6284 - <T as PlaylistService>::insert_playlist(&inner, request) 6285 - .await 5374 + <T as PlaylistService>::insert_playlist(&inner, request).await 6286 5375 }; 6287 5376 Box::pin(fut) 6288 5377 } ··· 6312 5401 "/rockbox.v1alpha1.PlaylistService/InsertAlbum" => { 6313 5402 #[allow(non_camel_case_types)] 6314 5403 struct InsertAlbumSvc<T: PlaylistService>(pub Arc<T>); 6315 - impl< 6316 - T: PlaylistService, 6317 - > tonic::server::UnaryService<super::InsertAlbumRequest> 6318 - for InsertAlbumSvc<T> { 5404 + impl<T: PlaylistService> tonic::server::UnaryService<super::InsertAlbumRequest> 5405 + for InsertAlbumSvc<T> 5406 + { 6319 5407 type Response = super::InsertAlbumResponse; 6320 - type Future = BoxFuture< 6321 - tonic::Response<Self::Response>, 6322 - tonic::Status, 6323 - >; 5408 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6324 5409 fn call( 6325 5410 &mut self, 6326 5411 request: tonic::Request<super::InsertAlbumRequest>, ··· 6357 5442 "/rockbox.v1alpha1.PlaylistService/InsertArtistTracks" => { 6358 5443 #[allow(non_camel_case_types)] 6359 5444 struct InsertArtistTracksSvc<T: PlaylistService>(pub Arc<T>); 6360 - impl< 6361 - T: PlaylistService, 6362 - > tonic::server::UnaryService<super::InsertArtistTracksRequest> 6363 - for InsertArtistTracksSvc<T> { 5445 + impl<T: PlaylistService> 5446 + tonic::server::UnaryService<super::InsertArtistTracksRequest> 5447 + for InsertArtistTracksSvc<T> 5448 + { 6364 5449 type Response = super::InsertArtistTracksResponse; 6365 - type Future = BoxFuture< 6366 - tonic::Response<Self::Response>, 6367 - tonic::Status, 6368 - >; 5450 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6369 5451 fn call( 6370 5452 &mut self, 6371 5453 request: tonic::Request<super::InsertArtistTracksRequest>, 6372 5454 ) -> Self::Future { 6373 5455 let inner = Arc::clone(&self.0); 6374 5456 let fut = async move { 6375 - <T as PlaylistService>::insert_artist_tracks( 6376 - &inner, 6377 - request, 6378 - ) 6379 - .await 5457 + <T as PlaylistService>::insert_artist_tracks(&inner, request).await 6380 5458 }; 6381 5459 Box::pin(fut) 6382 5460 } ··· 6406 5484 "/rockbox.v1alpha1.PlaylistService/ShufflePlaylist" => { 6407 5485 #[allow(non_camel_case_types)] 6408 5486 struct ShufflePlaylistSvc<T: PlaylistService>(pub Arc<T>); 6409 - impl< 6410 - T: PlaylistService, 6411 - > tonic::server::UnaryService<super::ShufflePlaylistRequest> 6412 - for ShufflePlaylistSvc<T> { 5487 + impl<T: PlaylistService> 5488 + tonic::server::UnaryService<super::ShufflePlaylistRequest> 5489 + for ShufflePlaylistSvc<T> 5490 + { 6413 5491 type Response = super::ShufflePlaylistResponse; 6414 - type Future = BoxFuture< 6415 - tonic::Response<Self::Response>, 6416 - tonic::Status, 6417 - >; 5492 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 6418 5493 fn call( 6419 5494 &mut self, 6420 5495 request: tonic::Request<super::ShufflePlaylistRequest>, 6421 5496 ) -> Self::Future { 6422 5497 let inner = Arc::clone(&self.0); 6423 5498 let fut = async move { 6424 - <T as PlaylistService>::shuffle_playlist(&inner, request) 6425 - .await 5499 + <T as PlaylistService>::shuffle_playlist(&inner, request).await 6426 5500 }; 6427 5501 Box::pin(fut) 6428 5502 } ··· 6449 5523 }; 6450 5524 Box::pin(fut) 6451 5525 } 6452 - _ => { 6453 - Box::pin(async move { 6454 - let mut response = http::Response::new(empty_body()); 6455 - let headers = response.headers_mut(); 6456 - headers 6457 - .insert( 6458 - tonic::Status::GRPC_STATUS, 6459 - (tonic::Code::Unimplemented as i32).into(), 6460 - ); 6461 - headers 6462 - .insert( 6463 - http::header::CONTENT_TYPE, 6464 - tonic::metadata::GRPC_CONTENT_TYPE, 6465 - ); 6466 - Ok(response) 6467 - }) 6468 - } 5526 + _ => Box::pin(async move { 5527 + let mut response = http::Response::new(empty_body()); 5528 + let headers = response.headers_mut(); 5529 + headers.insert( 5530 + tonic::Status::GRPC_STATUS, 5531 + (tonic::Code::Unimplemented as i32).into(), 5532 + ); 5533 + headers.insert( 5534 + http::header::CONTENT_TYPE, 5535 + tonic::metadata::GRPC_CONTENT_TYPE, 5536 + ); 5537 + Ok(response) 5538 + }), 6469 5539 } 6470 5540 } 6471 5541 } ··· 6975 6045 dead_code, 6976 6046 missing_docs, 6977 6047 clippy::wildcard_imports, 6978 - clippy::let_unit_value, 6048 + clippy::let_unit_value 6979 6049 )] 6980 - use tonic::codegen::*; 6981 6050 use tonic::codegen::http::Uri; 6051 + use tonic::codegen::*; 6982 6052 #[derive(Debug, Clone)] 6983 6053 pub struct SettingsServiceClient<T> { 6984 6054 inner: tonic::client::Grpc<T>, ··· 7022 6092 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 7023 6093 >, 7024 6094 >, 7025 - <T as tonic::codegen::Service< 7026 - http::Request<tonic::body::BoxBody>, 7027 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 6095 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 6096 + Into<StdError> + std::marker::Send + std::marker::Sync, 7028 6097 { 7029 6098 SettingsServiceClient::new(InterceptedService::new(inner, interceptor)) 7030 6099 } ··· 7062 6131 pub async fn get_settings_list( 7063 6132 &mut self, 7064 6133 request: impl tonic::IntoRequest<super::GetSettingsListRequest>, 7065 - ) -> std::result::Result< 7066 - tonic::Response<super::GetSettingsListResponse>, 7067 - tonic::Status, 7068 - > { 7069 - self.inner 7070 - .ready() 7071 - .await 7072 - .map_err(|e| { 7073 - tonic::Status::unknown( 7074 - format!("Service was not ready: {}", e.into()), 7075 - ) 7076 - })?; 6134 + ) -> std::result::Result<tonic::Response<super::GetSettingsListResponse>, tonic::Status> 6135 + { 6136 + self.inner.ready().await.map_err(|e| { 6137 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6138 + })?; 7077 6139 let codec = tonic::codec::ProstCodec::default(); 7078 6140 let path = http::uri::PathAndQuery::from_static( 7079 6141 "/rockbox.v1alpha1.SettingsService/GetSettingsList", 7080 6142 ); 7081 6143 let mut req = request.into_request(); 7082 - req.extensions_mut() 7083 - .insert( 7084 - GrpcMethod::new( 7085 - "rockbox.v1alpha1.SettingsService", 7086 - "GetSettingsList", 7087 - ), 7088 - ); 6144 + req.extensions_mut().insert(GrpcMethod::new( 6145 + "rockbox.v1alpha1.SettingsService", 6146 + "GetSettingsList", 6147 + )); 7089 6148 self.inner.unary(req, path, codec).await 7090 6149 } 7091 6150 pub async fn get_global_settings( 7092 6151 &mut self, 7093 6152 request: impl tonic::IntoRequest<super::GetGlobalSettingsRequest>, 7094 - ) -> std::result::Result< 7095 - tonic::Response<super::GetGlobalSettingsResponse>, 7096 - tonic::Status, 7097 - > { 7098 - self.inner 7099 - .ready() 7100 - .await 7101 - .map_err(|e| { 7102 - tonic::Status::unknown( 7103 - format!("Service was not ready: {}", e.into()), 7104 - ) 7105 - })?; 6153 + ) -> std::result::Result<tonic::Response<super::GetGlobalSettingsResponse>, tonic::Status> 6154 + { 6155 + self.inner.ready().await.map_err(|e| { 6156 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6157 + })?; 7106 6158 let codec = tonic::codec::ProstCodec::default(); 7107 6159 let path = http::uri::PathAndQuery::from_static( 7108 6160 "/rockbox.v1alpha1.SettingsService/GetGlobalSettings", 7109 6161 ); 7110 6162 let mut req = request.into_request(); 7111 - req.extensions_mut() 7112 - .insert( 7113 - GrpcMethod::new( 7114 - "rockbox.v1alpha1.SettingsService", 7115 - "GetGlobalSettings", 7116 - ), 7117 - ); 6163 + req.extensions_mut().insert(GrpcMethod::new( 6164 + "rockbox.v1alpha1.SettingsService", 6165 + "GetGlobalSettings", 6166 + )); 7118 6167 self.inner.unary(req, path, codec).await 7119 6168 } 7120 6169 pub async fn save_settings( 7121 6170 &mut self, 7122 6171 request: impl tonic::IntoRequest<super::SaveSettingsRequest>, 7123 - ) -> std::result::Result< 7124 - tonic::Response<super::SaveSettingsResponse>, 7125 - tonic::Status, 7126 - > { 7127 - self.inner 7128 - .ready() 7129 - .await 7130 - .map_err(|e| { 7131 - tonic::Status::unknown( 7132 - format!("Service was not ready: {}", e.into()), 7133 - ) 7134 - })?; 6172 + ) -> std::result::Result<tonic::Response<super::SaveSettingsResponse>, tonic::Status> 6173 + { 6174 + self.inner.ready().await.map_err(|e| { 6175 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6176 + })?; 7135 6177 let codec = tonic::codec::ProstCodec::default(); 7136 6178 let path = http::uri::PathAndQuery::from_static( 7137 6179 "/rockbox.v1alpha1.SettingsService/SaveSettings", 7138 6180 ); 7139 6181 let mut req = request.into_request(); 7140 - req.extensions_mut() 7141 - .insert( 7142 - GrpcMethod::new("rockbox.v1alpha1.SettingsService", "SaveSettings"), 7143 - ); 6182 + req.extensions_mut().insert(GrpcMethod::new( 6183 + "rockbox.v1alpha1.SettingsService", 6184 + "SaveSettings", 6185 + )); 7144 6186 self.inner.unary(req, path, codec).await 7145 6187 } 7146 6188 } ··· 7152 6194 dead_code, 7153 6195 missing_docs, 7154 6196 clippy::wildcard_imports, 7155 - clippy::let_unit_value, 6197 + clippy::let_unit_value 7156 6198 )] 7157 6199 use tonic::codegen::*; 7158 6200 /// Generated trait containing gRPC methods that should be implemented for use with SettingsServiceServer. ··· 7161 6203 async fn get_settings_list( 7162 6204 &self, 7163 6205 request: tonic::Request<super::GetSettingsListRequest>, 7164 - ) -> std::result::Result< 7165 - tonic::Response<super::GetSettingsListResponse>, 7166 - tonic::Status, 7167 - >; 6206 + ) -> std::result::Result<tonic::Response<super::GetSettingsListResponse>, tonic::Status>; 7168 6207 async fn get_global_settings( 7169 6208 &self, 7170 6209 request: tonic::Request<super::GetGlobalSettingsRequest>, 7171 - ) -> std::result::Result< 7172 - tonic::Response<super::GetGlobalSettingsResponse>, 7173 - tonic::Status, 7174 - >; 6210 + ) -> std::result::Result<tonic::Response<super::GetGlobalSettingsResponse>, tonic::Status>; 7175 6211 async fn save_settings( 7176 6212 &self, 7177 6213 request: tonic::Request<super::SaveSettingsRequest>, 7178 - ) -> std::result::Result< 7179 - tonic::Response<super::SaveSettingsResponse>, 7180 - tonic::Status, 7181 - >; 6214 + ) -> std::result::Result<tonic::Response<super::SaveSettingsResponse>, tonic::Status>; 7182 6215 } 7183 6216 #[derive(Debug)] 7184 6217 pub struct SettingsServiceServer<T> { ··· 7201 6234 max_encoding_message_size: None, 7202 6235 } 7203 6236 } 7204 - pub fn with_interceptor<F>( 7205 - inner: T, 7206 - interceptor: F, 7207 - ) -> InterceptedService<Self, F> 6237 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 7208 6238 where 7209 6239 F: tonic::service::Interceptor, 7210 6240 { ··· 7259 6289 "/rockbox.v1alpha1.SettingsService/GetSettingsList" => { 7260 6290 #[allow(non_camel_case_types)] 7261 6291 struct GetSettingsListSvc<T: SettingsService>(pub Arc<T>); 7262 - impl< 7263 - T: SettingsService, 7264 - > tonic::server::UnaryService<super::GetSettingsListRequest> 7265 - for GetSettingsListSvc<T> { 6292 + impl<T: SettingsService> 6293 + tonic::server::UnaryService<super::GetSettingsListRequest> 6294 + for GetSettingsListSvc<T> 6295 + { 7266 6296 type Response = super::GetSettingsListResponse; 7267 - type Future = BoxFuture< 7268 - tonic::Response<Self::Response>, 7269 - tonic::Status, 7270 - >; 6297 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 7271 6298 fn call( 7272 6299 &mut self, 7273 6300 request: tonic::Request<super::GetSettingsListRequest>, 7274 6301 ) -> Self::Future { 7275 6302 let inner = Arc::clone(&self.0); 7276 6303 let fut = async move { 7277 - <T as SettingsService>::get_settings_list(&inner, request) 7278 - .await 6304 + <T as SettingsService>::get_settings_list(&inner, request).await 7279 6305 }; 7280 6306 Box::pin(fut) 7281 6307 } ··· 7305 6331 "/rockbox.v1alpha1.SettingsService/GetGlobalSettings" => { 7306 6332 #[allow(non_camel_case_types)] 7307 6333 struct GetGlobalSettingsSvc<T: SettingsService>(pub Arc<T>); 7308 - impl< 7309 - T: SettingsService, 7310 - > tonic::server::UnaryService<super::GetGlobalSettingsRequest> 7311 - for GetGlobalSettingsSvc<T> { 6334 + impl<T: SettingsService> 6335 + tonic::server::UnaryService<super::GetGlobalSettingsRequest> 6336 + for GetGlobalSettingsSvc<T> 6337 + { 7312 6338 type Response = super::GetGlobalSettingsResponse; 7313 - type Future = BoxFuture< 7314 - tonic::Response<Self::Response>, 7315 - tonic::Status, 7316 - >; 6339 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 7317 6340 fn call( 7318 6341 &mut self, 7319 6342 request: tonic::Request<super::GetGlobalSettingsRequest>, 7320 6343 ) -> Self::Future { 7321 6344 let inner = Arc::clone(&self.0); 7322 6345 let fut = async move { 7323 - <T as SettingsService>::get_global_settings(&inner, request) 7324 - .await 6346 + <T as SettingsService>::get_global_settings(&inner, request).await 7325 6347 }; 7326 6348 Box::pin(fut) 7327 6349 } ··· 7351 6373 "/rockbox.v1alpha1.SettingsService/SaveSettings" => { 7352 6374 #[allow(non_camel_case_types)] 7353 6375 struct SaveSettingsSvc<T: SettingsService>(pub Arc<T>); 7354 - impl< 7355 - T: SettingsService, 7356 - > tonic::server::UnaryService<super::SaveSettingsRequest> 7357 - for SaveSettingsSvc<T> { 6376 + impl<T: SettingsService> tonic::server::UnaryService<super::SaveSettingsRequest> 6377 + for SaveSettingsSvc<T> 6378 + { 7358 6379 type Response = super::SaveSettingsResponse; 7359 - type Future = BoxFuture< 7360 - tonic::Response<Self::Response>, 7361 - tonic::Status, 7362 - >; 6380 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 7363 6381 fn call( 7364 6382 &mut self, 7365 6383 request: tonic::Request<super::SaveSettingsRequest>, ··· 7393 6411 }; 7394 6412 Box::pin(fut) 7395 6413 } 7396 - _ => { 7397 - Box::pin(async move { 7398 - let mut response = http::Response::new(empty_body()); 7399 - let headers = response.headers_mut(); 7400 - headers 7401 - .insert( 7402 - tonic::Status::GRPC_STATUS, 7403 - (tonic::Code::Unimplemented as i32).into(), 7404 - ); 7405 - headers 7406 - .insert( 7407 - http::header::CONTENT_TYPE, 7408 - tonic::metadata::GRPC_CONTENT_TYPE, 7409 - ); 7410 - Ok(response) 7411 - }) 7412 - } 6414 + _ => Box::pin(async move { 6415 + let mut response = http::Response::new(empty_body()); 6416 + let headers = response.headers_mut(); 6417 + headers.insert( 6418 + tonic::Status::GRPC_STATUS, 6419 + (tonic::Code::Unimplemented as i32).into(), 6420 + ); 6421 + headers.insert( 6422 + http::header::CONTENT_TYPE, 6423 + tonic::metadata::GRPC_CONTENT_TYPE, 6424 + ); 6425 + Ok(response) 6426 + }), 7413 6427 } 7414 6428 } 7415 6429 } ··· 7567 6581 dead_code, 7568 6582 missing_docs, 7569 6583 clippy::wildcard_imports, 7570 - clippy::let_unit_value, 6584 + clippy::let_unit_value 7571 6585 )] 7572 - use tonic::codegen::*; 7573 6586 use tonic::codegen::http::Uri; 6587 + use tonic::codegen::*; 7574 6588 #[derive(Debug, Clone)] 7575 6589 pub struct SoundServiceClient<T> { 7576 6590 inner: tonic::client::Grpc<T>, ··· 7614 6628 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 7615 6629 >, 7616 6630 >, 7617 - <T as tonic::codegen::Service< 7618 - http::Request<tonic::body::BoxBody>, 7619 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 6631 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 6632 + Into<StdError> + std::marker::Send + std::marker::Sync, 7620 6633 { 7621 6634 SoundServiceClient::new(InterceptedService::new(inner, interceptor)) 7622 6635 } ··· 7654 6667 pub async fn adjust_volume( 7655 6668 &mut self, 7656 6669 request: impl tonic::IntoRequest<super::AdjustVolumeRequest>, 7657 - ) -> std::result::Result< 7658 - tonic::Response<super::AdjustVolumeResponse>, 7659 - tonic::Status, 7660 - > { 7661 - self.inner 7662 - .ready() 7663 - .await 7664 - .map_err(|e| { 7665 - tonic::Status::unknown( 7666 - format!("Service was not ready: {}", e.into()), 7667 - ) 7668 - })?; 6670 + ) -> std::result::Result<tonic::Response<super::AdjustVolumeResponse>, tonic::Status> 6671 + { 6672 + self.inner.ready().await.map_err(|e| { 6673 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6674 + })?; 7669 6675 let codec = tonic::codec::ProstCodec::default(); 7670 - let path = http::uri::PathAndQuery::from_static( 7671 - "/rockbox.v1alpha1.SoundService/AdjustVolume", 7672 - ); 6676 + let path = 6677 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/AdjustVolume"); 7673 6678 let mut req = request.into_request(); 7674 - req.extensions_mut() 7675 - .insert( 7676 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "AdjustVolume"), 7677 - ); 6679 + req.extensions_mut().insert(GrpcMethod::new( 6680 + "rockbox.v1alpha1.SoundService", 6681 + "AdjustVolume", 6682 + )); 7678 6683 self.inner.unary(req, path, codec).await 7679 6684 } 7680 6685 pub async fn sound_set( 7681 6686 &mut self, 7682 6687 request: impl tonic::IntoRequest<super::SoundSetRequest>, 7683 - ) -> std::result::Result< 7684 - tonic::Response<super::SoundSetResponse>, 7685 - tonic::Status, 7686 - > { 7687 - self.inner 7688 - .ready() 7689 - .await 7690 - .map_err(|e| { 7691 - tonic::Status::unknown( 7692 - format!("Service was not ready: {}", e.into()), 7693 - ) 7694 - })?; 6688 + ) -> std::result::Result<tonic::Response<super::SoundSetResponse>, tonic::Status> { 6689 + self.inner.ready().await.map_err(|e| { 6690 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6691 + })?; 7695 6692 let codec = tonic::codec::ProstCodec::default(); 7696 - let path = http::uri::PathAndQuery::from_static( 7697 - "/rockbox.v1alpha1.SoundService/SoundSet", 7698 - ); 6693 + let path = 6694 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundSet"); 7699 6695 let mut req = request.into_request(); 7700 6696 req.extensions_mut() 7701 6697 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundSet")); ··· 7704 6700 pub async fn sound_current( 7705 6701 &mut self, 7706 6702 request: impl tonic::IntoRequest<super::SoundCurrentRequest>, 7707 - ) -> std::result::Result< 7708 - tonic::Response<super::SoundCurrentResponse>, 7709 - tonic::Status, 7710 - > { 7711 - self.inner 7712 - .ready() 7713 - .await 7714 - .map_err(|e| { 7715 - tonic::Status::unknown( 7716 - format!("Service was not ready: {}", e.into()), 7717 - ) 7718 - })?; 6703 + ) -> std::result::Result<tonic::Response<super::SoundCurrentResponse>, tonic::Status> 6704 + { 6705 + self.inner.ready().await.map_err(|e| { 6706 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6707 + })?; 7719 6708 let codec = tonic::codec::ProstCodec::default(); 7720 - let path = http::uri::PathAndQuery::from_static( 7721 - "/rockbox.v1alpha1.SoundService/SoundCurrent", 7722 - ); 6709 + let path = 6710 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundCurrent"); 7723 6711 let mut req = request.into_request(); 7724 - req.extensions_mut() 7725 - .insert( 7726 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundCurrent"), 7727 - ); 6712 + req.extensions_mut().insert(GrpcMethod::new( 6713 + "rockbox.v1alpha1.SoundService", 6714 + "SoundCurrent", 6715 + )); 7728 6716 self.inner.unary(req, path, codec).await 7729 6717 } 7730 6718 pub async fn sound_default( 7731 6719 &mut self, 7732 6720 request: impl tonic::IntoRequest<super::SoundDefaultRequest>, 7733 - ) -> std::result::Result< 7734 - tonic::Response<super::SoundDefaultResponse>, 7735 - tonic::Status, 7736 - > { 7737 - self.inner 7738 - .ready() 7739 - .await 7740 - .map_err(|e| { 7741 - tonic::Status::unknown( 7742 - format!("Service was not ready: {}", e.into()), 7743 - ) 7744 - })?; 6721 + ) -> std::result::Result<tonic::Response<super::SoundDefaultResponse>, tonic::Status> 6722 + { 6723 + self.inner.ready().await.map_err(|e| { 6724 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6725 + })?; 7745 6726 let codec = tonic::codec::ProstCodec::default(); 7746 - let path = http::uri::PathAndQuery::from_static( 7747 - "/rockbox.v1alpha1.SoundService/SoundDefault", 7748 - ); 6727 + let path = 6728 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundDefault"); 7749 6729 let mut req = request.into_request(); 7750 - req.extensions_mut() 7751 - .insert( 7752 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundDefault"), 7753 - ); 6730 + req.extensions_mut().insert(GrpcMethod::new( 6731 + "rockbox.v1alpha1.SoundService", 6732 + "SoundDefault", 6733 + )); 7754 6734 self.inner.unary(req, path, codec).await 7755 6735 } 7756 6736 pub async fn sound_min( 7757 6737 &mut self, 7758 6738 request: impl tonic::IntoRequest<super::SoundMinRequest>, 7759 - ) -> std::result::Result< 7760 - tonic::Response<super::SoundMinResponse>, 7761 - tonic::Status, 7762 - > { 7763 - self.inner 7764 - .ready() 7765 - .await 7766 - .map_err(|e| { 7767 - tonic::Status::unknown( 7768 - format!("Service was not ready: {}", e.into()), 7769 - ) 7770 - })?; 6739 + ) -> std::result::Result<tonic::Response<super::SoundMinResponse>, tonic::Status> { 6740 + self.inner.ready().await.map_err(|e| { 6741 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6742 + })?; 7771 6743 let codec = tonic::codec::ProstCodec::default(); 7772 - let path = http::uri::PathAndQuery::from_static( 7773 - "/rockbox.v1alpha1.SoundService/SoundMin", 7774 - ); 6744 + let path = 6745 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMin"); 7775 6746 let mut req = request.into_request(); 7776 6747 req.extensions_mut() 7777 6748 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMin")); ··· 7780 6751 pub async fn sound_max( 7781 6752 &mut self, 7782 6753 request: impl tonic::IntoRequest<super::SoundMaxRequest>, 7783 - ) -> std::result::Result< 7784 - tonic::Response<super::SoundMaxResponse>, 7785 - tonic::Status, 7786 - > { 7787 - self.inner 7788 - .ready() 7789 - .await 7790 - .map_err(|e| { 7791 - tonic::Status::unknown( 7792 - format!("Service was not ready: {}", e.into()), 7793 - ) 7794 - })?; 6754 + ) -> std::result::Result<tonic::Response<super::SoundMaxResponse>, tonic::Status> { 6755 + self.inner.ready().await.map_err(|e| { 6756 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6757 + })?; 7795 6758 let codec = tonic::codec::ProstCodec::default(); 7796 - let path = http::uri::PathAndQuery::from_static( 7797 - "/rockbox.v1alpha1.SoundService/SoundMax", 7798 - ); 6759 + let path = 6760 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundMax"); 7799 6761 let mut req = request.into_request(); 7800 6762 req.extensions_mut() 7801 6763 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundMax")); ··· 7804 6766 pub async fn sound_unit( 7805 6767 &mut self, 7806 6768 request: impl tonic::IntoRequest<super::SoundUnitRequest>, 7807 - ) -> std::result::Result< 7808 - tonic::Response<super::SoundUnitResponse>, 7809 - tonic::Status, 7810 - > { 7811 - self.inner 7812 - .ready() 7813 - .await 7814 - .map_err(|e| { 7815 - tonic::Status::unknown( 7816 - format!("Service was not ready: {}", e.into()), 7817 - ) 7818 - })?; 6769 + ) -> std::result::Result<tonic::Response<super::SoundUnitResponse>, tonic::Status> { 6770 + self.inner.ready().await.map_err(|e| { 6771 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6772 + })?; 7819 6773 let codec = tonic::codec::ProstCodec::default(); 7820 - let path = http::uri::PathAndQuery::from_static( 7821 - "/rockbox.v1alpha1.SoundService/SoundUnit", 7822 - ); 6774 + let path = 6775 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SoundUnit"); 7823 6776 let mut req = request.into_request(); 7824 - req.extensions_mut() 7825 - .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundUnit")); 6777 + req.extensions_mut().insert(GrpcMethod::new( 6778 + "rockbox.v1alpha1.SoundService", 6779 + "SoundUnit", 6780 + )); 7826 6781 self.inner.unary(req, path, codec).await 7827 6782 } 7828 6783 pub async fn sound_val2_phys( 7829 6784 &mut self, 7830 6785 request: impl tonic::IntoRequest<super::SoundVal2PhysRequest>, 7831 - ) -> std::result::Result< 7832 - tonic::Response<super::SoundVal2PhysResponse>, 7833 - tonic::Status, 7834 - > { 7835 - self.inner 7836 - .ready() 7837 - .await 7838 - .map_err(|e| { 7839 - tonic::Status::unknown( 7840 - format!("Service was not ready: {}", e.into()), 7841 - ) 7842 - })?; 6786 + ) -> std::result::Result<tonic::Response<super::SoundVal2PhysResponse>, tonic::Status> 6787 + { 6788 + self.inner.ready().await.map_err(|e| { 6789 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6790 + })?; 7843 6791 let codec = tonic::codec::ProstCodec::default(); 7844 6792 let path = http::uri::PathAndQuery::from_static( 7845 6793 "/rockbox.v1alpha1.SoundService/SoundVal2Phys", 7846 6794 ); 7847 6795 let mut req = request.into_request(); 7848 - req.extensions_mut() 7849 - .insert( 7850 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SoundVal2Phys"), 7851 - ); 6796 + req.extensions_mut().insert(GrpcMethod::new( 6797 + "rockbox.v1alpha1.SoundService", 6798 + "SoundVal2Phys", 6799 + )); 7852 6800 self.inner.unary(req, path, codec).await 7853 6801 } 7854 6802 pub async fn get_pitch( 7855 6803 &mut self, 7856 6804 request: impl tonic::IntoRequest<super::GetPitchRequest>, 7857 - ) -> std::result::Result< 7858 - tonic::Response<super::GetPitchResponse>, 7859 - tonic::Status, 7860 - > { 7861 - self.inner 7862 - .ready() 7863 - .await 7864 - .map_err(|e| { 7865 - tonic::Status::unknown( 7866 - format!("Service was not ready: {}", e.into()), 7867 - ) 7868 - })?; 6805 + ) -> std::result::Result<tonic::Response<super::GetPitchResponse>, tonic::Status> { 6806 + self.inner.ready().await.map_err(|e| { 6807 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6808 + })?; 7869 6809 let codec = tonic::codec::ProstCodec::default(); 7870 - let path = http::uri::PathAndQuery::from_static( 7871 - "/rockbox.v1alpha1.SoundService/GetPitch", 7872 - ); 6810 + let path = 6811 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/GetPitch"); 7873 6812 let mut req = request.into_request(); 7874 6813 req.extensions_mut() 7875 6814 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "GetPitch")); ··· 7878 6817 pub async fn set_pitch( 7879 6818 &mut self, 7880 6819 request: impl tonic::IntoRequest<super::SetPitchRequest>, 7881 - ) -> std::result::Result< 7882 - tonic::Response<super::SetPitchResponse>, 7883 - tonic::Status, 7884 - > { 7885 - self.inner 7886 - .ready() 7887 - .await 7888 - .map_err(|e| { 7889 - tonic::Status::unknown( 7890 - format!("Service was not ready: {}", e.into()), 7891 - ) 7892 - })?; 6820 + ) -> std::result::Result<tonic::Response<super::SetPitchResponse>, tonic::Status> { 6821 + self.inner.ready().await.map_err(|e| { 6822 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6823 + })?; 7893 6824 let codec = tonic::codec::ProstCodec::default(); 7894 - let path = http::uri::PathAndQuery::from_static( 7895 - "/rockbox.v1alpha1.SoundService/SetPitch", 7896 - ); 6825 + let path = 6826 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/SetPitch"); 7897 6827 let mut req = request.into_request(); 7898 6828 req.extensions_mut() 7899 6829 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "SetPitch")); ··· 7902 6832 pub async fn beep_play( 7903 6833 &mut self, 7904 6834 request: impl tonic::IntoRequest<super::BeepPlayRequest>, 7905 - ) -> std::result::Result< 7906 - tonic::Response<super::BeepPlayResponse>, 7907 - tonic::Status, 7908 - > { 7909 - self.inner 7910 - .ready() 7911 - .await 7912 - .map_err(|e| { 7913 - tonic::Status::unknown( 7914 - format!("Service was not ready: {}", e.into()), 7915 - ) 7916 - })?; 6835 + ) -> std::result::Result<tonic::Response<super::BeepPlayResponse>, tonic::Status> { 6836 + self.inner.ready().await.map_err(|e| { 6837 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6838 + })?; 7917 6839 let codec = tonic::codec::ProstCodec::default(); 7918 - let path = http::uri::PathAndQuery::from_static( 7919 - "/rockbox.v1alpha1.SoundService/BeepPlay", 7920 - ); 6840 + let path = 6841 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/BeepPlay"); 7921 6842 let mut req = request.into_request(); 7922 6843 req.extensions_mut() 7923 6844 .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "BeepPlay")); ··· 7926 6847 pub async fn pcmbuf_fade( 7927 6848 &mut self, 7928 6849 request: impl tonic::IntoRequest<super::PcmbufFadeRequest>, 7929 - ) -> std::result::Result< 7930 - tonic::Response<super::PcmbufFadeResponse>, 7931 - tonic::Status, 7932 - > { 7933 - self.inner 7934 - .ready() 7935 - .await 7936 - .map_err(|e| { 7937 - tonic::Status::unknown( 7938 - format!("Service was not ready: {}", e.into()), 7939 - ) 7940 - })?; 6850 + ) -> std::result::Result<tonic::Response<super::PcmbufFadeResponse>, tonic::Status> 6851 + { 6852 + self.inner.ready().await.map_err(|e| { 6853 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6854 + })?; 7941 6855 let codec = tonic::codec::ProstCodec::default(); 7942 - let path = http::uri::PathAndQuery::from_static( 7943 - "/rockbox.v1alpha1.SoundService/PcmbufFade", 7944 - ); 6856 + let path = 6857 + http::uri::PathAndQuery::from_static("/rockbox.v1alpha1.SoundService/PcmbufFade"); 7945 6858 let mut req = request.into_request(); 7946 - req.extensions_mut() 7947 - .insert(GrpcMethod::new("rockbox.v1alpha1.SoundService", "PcmbufFade")); 6859 + req.extensions_mut().insert(GrpcMethod::new( 6860 + "rockbox.v1alpha1.SoundService", 6861 + "PcmbufFade", 6862 + )); 7948 6863 self.inner.unary(req, path, codec).await 7949 6864 } 7950 6865 pub async fn pcmbuf_set_low_latency( 7951 6866 &mut self, 7952 6867 request: impl tonic::IntoRequest<super::PcmbufSetLowLatencyRequest>, 7953 - ) -> std::result::Result< 7954 - tonic::Response<super::PcmbufSetLowLatencyResponse>, 7955 - tonic::Status, 7956 - > { 7957 - self.inner 7958 - .ready() 7959 - .await 7960 - .map_err(|e| { 7961 - tonic::Status::unknown( 7962 - format!("Service was not ready: {}", e.into()), 7963 - ) 7964 - })?; 6868 + ) -> std::result::Result<tonic::Response<super::PcmbufSetLowLatencyResponse>, tonic::Status> 6869 + { 6870 + self.inner.ready().await.map_err(|e| { 6871 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6872 + })?; 7965 6873 let codec = tonic::codec::ProstCodec::default(); 7966 6874 let path = http::uri::PathAndQuery::from_static( 7967 6875 "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency", 7968 6876 ); 7969 6877 let mut req = request.into_request(); 7970 - req.extensions_mut() 7971 - .insert( 7972 - GrpcMethod::new( 7973 - "rockbox.v1alpha1.SoundService", 7974 - "PcmbufSetLowLatency", 7975 - ), 7976 - ); 6878 + req.extensions_mut().insert(GrpcMethod::new( 6879 + "rockbox.v1alpha1.SoundService", 6880 + "PcmbufSetLowLatency", 6881 + )); 7977 6882 self.inner.unary(req, path, codec).await 7978 6883 } 7979 6884 pub async fn system_sound_play( 7980 6885 &mut self, 7981 6886 request: impl tonic::IntoRequest<super::SystemSoundPlayRequest>, 7982 - ) -> std::result::Result< 7983 - tonic::Response<super::SystemSoundPlayResponse>, 7984 - tonic::Status, 7985 - > { 7986 - self.inner 7987 - .ready() 7988 - .await 7989 - .map_err(|e| { 7990 - tonic::Status::unknown( 7991 - format!("Service was not ready: {}", e.into()), 7992 - ) 7993 - })?; 6887 + ) -> std::result::Result<tonic::Response<super::SystemSoundPlayResponse>, tonic::Status> 6888 + { 6889 + self.inner.ready().await.map_err(|e| { 6890 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6891 + })?; 7994 6892 let codec = tonic::codec::ProstCodec::default(); 7995 6893 let path = http::uri::PathAndQuery::from_static( 7996 6894 "/rockbox.v1alpha1.SoundService/SystemSoundPlay", 7997 6895 ); 7998 6896 let mut req = request.into_request(); 7999 - req.extensions_mut() 8000 - .insert( 8001 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "SystemSoundPlay"), 8002 - ); 6897 + req.extensions_mut().insert(GrpcMethod::new( 6898 + "rockbox.v1alpha1.SoundService", 6899 + "SystemSoundPlay", 6900 + )); 8003 6901 self.inner.unary(req, path, codec).await 8004 6902 } 8005 6903 pub async fn keyclick_click( 8006 6904 &mut self, 8007 6905 request: impl tonic::IntoRequest<super::KeyclickClickRequest>, 8008 - ) -> std::result::Result< 8009 - tonic::Response<super::KeyclickClickResponse>, 8010 - tonic::Status, 8011 - > { 8012 - self.inner 8013 - .ready() 8014 - .await 8015 - .map_err(|e| { 8016 - tonic::Status::unknown( 8017 - format!("Service was not ready: {}", e.into()), 8018 - ) 8019 - })?; 6906 + ) -> std::result::Result<tonic::Response<super::KeyclickClickResponse>, tonic::Status> 6907 + { 6908 + self.inner.ready().await.map_err(|e| { 6909 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 6910 + })?; 8020 6911 let codec = tonic::codec::ProstCodec::default(); 8021 6912 let path = http::uri::PathAndQuery::from_static( 8022 6913 "/rockbox.v1alpha1.SoundService/KeyclickClick", 8023 6914 ); 8024 6915 let mut req = request.into_request(); 8025 - req.extensions_mut() 8026 - .insert( 8027 - GrpcMethod::new("rockbox.v1alpha1.SoundService", "KeyclickClick"), 8028 - ); 6916 + req.extensions_mut().insert(GrpcMethod::new( 6917 + "rockbox.v1alpha1.SoundService", 6918 + "KeyclickClick", 6919 + )); 8029 6920 self.inner.unary(req, path, codec).await 8030 6921 } 8031 6922 } ··· 8037 6928 dead_code, 8038 6929 missing_docs, 8039 6930 clippy::wildcard_imports, 8040 - clippy::let_unit_value, 6931 + clippy::let_unit_value 8041 6932 )] 8042 6933 use tonic::codegen::*; 8043 6934 /// Generated trait containing gRPC methods that should be implemented for use with SoundServiceServer. ··· 8046 6937 async fn adjust_volume( 8047 6938 &self, 8048 6939 request: tonic::Request<super::AdjustVolumeRequest>, 8049 - ) -> std::result::Result< 8050 - tonic::Response<super::AdjustVolumeResponse>, 8051 - tonic::Status, 8052 - >; 6940 + ) -> std::result::Result<tonic::Response<super::AdjustVolumeResponse>, tonic::Status>; 8053 6941 async fn sound_set( 8054 6942 &self, 8055 6943 request: tonic::Request<super::SoundSetRequest>, 8056 - ) -> std::result::Result< 8057 - tonic::Response<super::SoundSetResponse>, 8058 - tonic::Status, 8059 - >; 6944 + ) -> std::result::Result<tonic::Response<super::SoundSetResponse>, tonic::Status>; 8060 6945 async fn sound_current( 8061 6946 &self, 8062 6947 request: tonic::Request<super::SoundCurrentRequest>, 8063 - ) -> std::result::Result< 8064 - tonic::Response<super::SoundCurrentResponse>, 8065 - tonic::Status, 8066 - >; 6948 + ) -> std::result::Result<tonic::Response<super::SoundCurrentResponse>, tonic::Status>; 8067 6949 async fn sound_default( 8068 6950 &self, 8069 6951 request: tonic::Request<super::SoundDefaultRequest>, 8070 - ) -> std::result::Result< 8071 - tonic::Response<super::SoundDefaultResponse>, 8072 - tonic::Status, 8073 - >; 6952 + ) -> std::result::Result<tonic::Response<super::SoundDefaultResponse>, tonic::Status>; 8074 6953 async fn sound_min( 8075 6954 &self, 8076 6955 request: tonic::Request<super::SoundMinRequest>, 8077 - ) -> std::result::Result< 8078 - tonic::Response<super::SoundMinResponse>, 8079 - tonic::Status, 8080 - >; 6956 + ) -> std::result::Result<tonic::Response<super::SoundMinResponse>, tonic::Status>; 8081 6957 async fn sound_max( 8082 6958 &self, 8083 6959 request: tonic::Request<super::SoundMaxRequest>, 8084 - ) -> std::result::Result< 8085 - tonic::Response<super::SoundMaxResponse>, 8086 - tonic::Status, 8087 - >; 6960 + ) -> std::result::Result<tonic::Response<super::SoundMaxResponse>, tonic::Status>; 8088 6961 async fn sound_unit( 8089 6962 &self, 8090 6963 request: tonic::Request<super::SoundUnitRequest>, 8091 - ) -> std::result::Result< 8092 - tonic::Response<super::SoundUnitResponse>, 8093 - tonic::Status, 8094 - >; 6964 + ) -> std::result::Result<tonic::Response<super::SoundUnitResponse>, tonic::Status>; 8095 6965 async fn sound_val2_phys( 8096 6966 &self, 8097 6967 request: tonic::Request<super::SoundVal2PhysRequest>, 8098 - ) -> std::result::Result< 8099 - tonic::Response<super::SoundVal2PhysResponse>, 8100 - tonic::Status, 8101 - >; 6968 + ) -> std::result::Result<tonic::Response<super::SoundVal2PhysResponse>, tonic::Status>; 8102 6969 async fn get_pitch( 8103 6970 &self, 8104 6971 request: tonic::Request<super::GetPitchRequest>, 8105 - ) -> std::result::Result< 8106 - tonic::Response<super::GetPitchResponse>, 8107 - tonic::Status, 8108 - >; 6972 + ) -> std::result::Result<tonic::Response<super::GetPitchResponse>, tonic::Status>; 8109 6973 async fn set_pitch( 8110 6974 &self, 8111 6975 request: tonic::Request<super::SetPitchRequest>, 8112 - ) -> std::result::Result< 8113 - tonic::Response<super::SetPitchResponse>, 8114 - tonic::Status, 8115 - >; 6976 + ) -> std::result::Result<tonic::Response<super::SetPitchResponse>, tonic::Status>; 8116 6977 async fn beep_play( 8117 6978 &self, 8118 6979 request: tonic::Request<super::BeepPlayRequest>, 8119 - ) -> std::result::Result< 8120 - tonic::Response<super::BeepPlayResponse>, 8121 - tonic::Status, 8122 - >; 6980 + ) -> std::result::Result<tonic::Response<super::BeepPlayResponse>, tonic::Status>; 8123 6981 async fn pcmbuf_fade( 8124 6982 &self, 8125 6983 request: tonic::Request<super::PcmbufFadeRequest>, 8126 - ) -> std::result::Result< 8127 - tonic::Response<super::PcmbufFadeResponse>, 8128 - tonic::Status, 8129 - >; 6984 + ) -> std::result::Result<tonic::Response<super::PcmbufFadeResponse>, tonic::Status>; 8130 6985 async fn pcmbuf_set_low_latency( 8131 6986 &self, 8132 6987 request: tonic::Request<super::PcmbufSetLowLatencyRequest>, 8133 - ) -> std::result::Result< 8134 - tonic::Response<super::PcmbufSetLowLatencyResponse>, 8135 - tonic::Status, 8136 - >; 6988 + ) -> std::result::Result<tonic::Response<super::PcmbufSetLowLatencyResponse>, tonic::Status>; 8137 6989 async fn system_sound_play( 8138 6990 &self, 8139 6991 request: tonic::Request<super::SystemSoundPlayRequest>, 8140 - ) -> std::result::Result< 8141 - tonic::Response<super::SystemSoundPlayResponse>, 8142 - tonic::Status, 8143 - >; 6992 + ) -> std::result::Result<tonic::Response<super::SystemSoundPlayResponse>, tonic::Status>; 8144 6993 async fn keyclick_click( 8145 6994 &self, 8146 6995 request: tonic::Request<super::KeyclickClickRequest>, 8147 - ) -> std::result::Result< 8148 - tonic::Response<super::KeyclickClickResponse>, 8149 - tonic::Status, 8150 - >; 6996 + ) -> std::result::Result<tonic::Response<super::KeyclickClickResponse>, tonic::Status>; 8151 6997 } 8152 6998 #[derive(Debug)] 8153 6999 pub struct SoundServiceServer<T> { ··· 8170 7016 max_encoding_message_size: None, 8171 7017 } 8172 7018 } 8173 - pub fn with_interceptor<F>( 8174 - inner: T, 8175 - interceptor: F, 8176 - ) -> InterceptedService<Self, F> 7019 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 8177 7020 where 8178 7021 F: tonic::service::Interceptor, 8179 7022 { ··· 8228 7071 "/rockbox.v1alpha1.SoundService/AdjustVolume" => { 8229 7072 #[allow(non_camel_case_types)] 8230 7073 struct AdjustVolumeSvc<T: SoundService>(pub Arc<T>); 8231 - impl< 8232 - T: SoundService, 8233 - > tonic::server::UnaryService<super::AdjustVolumeRequest> 8234 - for AdjustVolumeSvc<T> { 7074 + impl<T: SoundService> tonic::server::UnaryService<super::AdjustVolumeRequest> 7075 + for AdjustVolumeSvc<T> 7076 + { 8235 7077 type Response = super::AdjustVolumeResponse; 8236 - type Future = BoxFuture< 8237 - tonic::Response<Self::Response>, 8238 - tonic::Status, 8239 - >; 7078 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8240 7079 fn call( 8241 7080 &mut self, 8242 7081 request: tonic::Request<super::AdjustVolumeRequest>, ··· 8273 7112 "/rockbox.v1alpha1.SoundService/SoundSet" => { 8274 7113 #[allow(non_camel_case_types)] 8275 7114 struct SoundSetSvc<T: SoundService>(pub Arc<T>); 8276 - impl< 8277 - T: SoundService, 8278 - > tonic::server::UnaryService<super::SoundSetRequest> 8279 - for SoundSetSvc<T> { 7115 + impl<T: SoundService> tonic::server::UnaryService<super::SoundSetRequest> for SoundSetSvc<T> { 8280 7116 type Response = super::SoundSetResponse; 8281 - type Future = BoxFuture< 8282 - tonic::Response<Self::Response>, 8283 - tonic::Status, 8284 - >; 7117 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8285 7118 fn call( 8286 7119 &mut self, 8287 7120 request: tonic::Request<super::SoundSetRequest>, ··· 8318 7151 "/rockbox.v1alpha1.SoundService/SoundCurrent" => { 8319 7152 #[allow(non_camel_case_types)] 8320 7153 struct SoundCurrentSvc<T: SoundService>(pub Arc<T>); 8321 - impl< 8322 - T: SoundService, 8323 - > tonic::server::UnaryService<super::SoundCurrentRequest> 8324 - for SoundCurrentSvc<T> { 7154 + impl<T: SoundService> tonic::server::UnaryService<super::SoundCurrentRequest> 7155 + for SoundCurrentSvc<T> 7156 + { 8325 7157 type Response = super::SoundCurrentResponse; 8326 - type Future = BoxFuture< 8327 - tonic::Response<Self::Response>, 8328 - tonic::Status, 8329 - >; 7158 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8330 7159 fn call( 8331 7160 &mut self, 8332 7161 request: tonic::Request<super::SoundCurrentRequest>, ··· 8363 7192 "/rockbox.v1alpha1.SoundService/SoundDefault" => { 8364 7193 #[allow(non_camel_case_types)] 8365 7194 struct SoundDefaultSvc<T: SoundService>(pub Arc<T>); 8366 - impl< 8367 - T: SoundService, 8368 - > tonic::server::UnaryService<super::SoundDefaultRequest> 8369 - for SoundDefaultSvc<T> { 7195 + impl<T: SoundService> tonic::server::UnaryService<super::SoundDefaultRequest> 7196 + for SoundDefaultSvc<T> 7197 + { 8370 7198 type Response = super::SoundDefaultResponse; 8371 - type Future = BoxFuture< 8372 - tonic::Response<Self::Response>, 8373 - tonic::Status, 8374 - >; 7199 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8375 7200 fn call( 8376 7201 &mut self, 8377 7202 request: tonic::Request<super::SoundDefaultRequest>, ··· 8408 7233 "/rockbox.v1alpha1.SoundService/SoundMin" => { 8409 7234 #[allow(non_camel_case_types)] 8410 7235 struct SoundMinSvc<T: SoundService>(pub Arc<T>); 8411 - impl< 8412 - T: SoundService, 8413 - > tonic::server::UnaryService<super::SoundMinRequest> 8414 - for SoundMinSvc<T> { 7236 + impl<T: SoundService> tonic::server::UnaryService<super::SoundMinRequest> for SoundMinSvc<T> { 8415 7237 type Response = super::SoundMinResponse; 8416 - type Future = BoxFuture< 8417 - tonic::Response<Self::Response>, 8418 - tonic::Status, 8419 - >; 7238 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8420 7239 fn call( 8421 7240 &mut self, 8422 7241 request: tonic::Request<super::SoundMinRequest>, ··· 8453 7272 "/rockbox.v1alpha1.SoundService/SoundMax" => { 8454 7273 #[allow(non_camel_case_types)] 8455 7274 struct SoundMaxSvc<T: SoundService>(pub Arc<T>); 8456 - impl< 8457 - T: SoundService, 8458 - > tonic::server::UnaryService<super::SoundMaxRequest> 8459 - for SoundMaxSvc<T> { 7275 + impl<T: SoundService> tonic::server::UnaryService<super::SoundMaxRequest> for SoundMaxSvc<T> { 8460 7276 type Response = super::SoundMaxResponse; 8461 - type Future = BoxFuture< 8462 - tonic::Response<Self::Response>, 8463 - tonic::Status, 8464 - >; 7277 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8465 7278 fn call( 8466 7279 &mut self, 8467 7280 request: tonic::Request<super::SoundMaxRequest>, ··· 8498 7311 "/rockbox.v1alpha1.SoundService/SoundUnit" => { 8499 7312 #[allow(non_camel_case_types)] 8500 7313 struct SoundUnitSvc<T: SoundService>(pub Arc<T>); 8501 - impl< 8502 - T: SoundService, 8503 - > tonic::server::UnaryService<super::SoundUnitRequest> 8504 - for SoundUnitSvc<T> { 7314 + impl<T: SoundService> tonic::server::UnaryService<super::SoundUnitRequest> for SoundUnitSvc<T> { 8505 7315 type Response = super::SoundUnitResponse; 8506 - type Future = BoxFuture< 8507 - tonic::Response<Self::Response>, 8508 - tonic::Status, 8509 - >; 7316 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8510 7317 fn call( 8511 7318 &mut self, 8512 7319 request: tonic::Request<super::SoundUnitRequest>, ··· 8543 7350 "/rockbox.v1alpha1.SoundService/SoundVal2Phys" => { 8544 7351 #[allow(non_camel_case_types)] 8545 7352 struct SoundVal2PhysSvc<T: SoundService>(pub Arc<T>); 8546 - impl< 8547 - T: SoundService, 8548 - > tonic::server::UnaryService<super::SoundVal2PhysRequest> 8549 - for SoundVal2PhysSvc<T> { 7353 + impl<T: SoundService> tonic::server::UnaryService<super::SoundVal2PhysRequest> 7354 + for SoundVal2PhysSvc<T> 7355 + { 8550 7356 type Response = super::SoundVal2PhysResponse; 8551 - type Future = BoxFuture< 8552 - tonic::Response<Self::Response>, 8553 - tonic::Status, 8554 - >; 7357 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8555 7358 fn call( 8556 7359 &mut self, 8557 7360 request: tonic::Request<super::SoundVal2PhysRequest>, ··· 8588 7391 "/rockbox.v1alpha1.SoundService/GetPitch" => { 8589 7392 #[allow(non_camel_case_types)] 8590 7393 struct GetPitchSvc<T: SoundService>(pub Arc<T>); 8591 - impl< 8592 - T: SoundService, 8593 - > tonic::server::UnaryService<super::GetPitchRequest> 8594 - for GetPitchSvc<T> { 7394 + impl<T: SoundService> tonic::server::UnaryService<super::GetPitchRequest> for GetPitchSvc<T> { 8595 7395 type Response = super::GetPitchResponse; 8596 - type Future = BoxFuture< 8597 - tonic::Response<Self::Response>, 8598 - tonic::Status, 8599 - >; 7396 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8600 7397 fn call( 8601 7398 &mut self, 8602 7399 request: tonic::Request<super::GetPitchRequest>, ··· 8633 7430 "/rockbox.v1alpha1.SoundService/SetPitch" => { 8634 7431 #[allow(non_camel_case_types)] 8635 7432 struct SetPitchSvc<T: SoundService>(pub Arc<T>); 8636 - impl< 8637 - T: SoundService, 8638 - > tonic::server::UnaryService<super::SetPitchRequest> 8639 - for SetPitchSvc<T> { 7433 + impl<T: SoundService> tonic::server::UnaryService<super::SetPitchRequest> for SetPitchSvc<T> { 8640 7434 type Response = super::SetPitchResponse; 8641 - type Future = BoxFuture< 8642 - tonic::Response<Self::Response>, 8643 - tonic::Status, 8644 - >; 7435 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8645 7436 fn call( 8646 7437 &mut self, 8647 7438 request: tonic::Request<super::SetPitchRequest>, ··· 8678 7469 "/rockbox.v1alpha1.SoundService/BeepPlay" => { 8679 7470 #[allow(non_camel_case_types)] 8680 7471 struct BeepPlaySvc<T: SoundService>(pub Arc<T>); 8681 - impl< 8682 - T: SoundService, 8683 - > tonic::server::UnaryService<super::BeepPlayRequest> 8684 - for BeepPlaySvc<T> { 7472 + impl<T: SoundService> tonic::server::UnaryService<super::BeepPlayRequest> for BeepPlaySvc<T> { 8685 7473 type Response = super::BeepPlayResponse; 8686 - type Future = BoxFuture< 8687 - tonic::Response<Self::Response>, 8688 - tonic::Status, 8689 - >; 7474 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8690 7475 fn call( 8691 7476 &mut self, 8692 7477 request: tonic::Request<super::BeepPlayRequest>, ··· 8723 7508 "/rockbox.v1alpha1.SoundService/PcmbufFade" => { 8724 7509 #[allow(non_camel_case_types)] 8725 7510 struct PcmbufFadeSvc<T: SoundService>(pub Arc<T>); 8726 - impl< 8727 - T: SoundService, 8728 - > tonic::server::UnaryService<super::PcmbufFadeRequest> 8729 - for PcmbufFadeSvc<T> { 7511 + impl<T: SoundService> tonic::server::UnaryService<super::PcmbufFadeRequest> for PcmbufFadeSvc<T> { 8730 7512 type Response = super::PcmbufFadeResponse; 8731 - type Future = BoxFuture< 8732 - tonic::Response<Self::Response>, 8733 - tonic::Status, 8734 - >; 7513 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8735 7514 fn call( 8736 7515 &mut self, 8737 7516 request: tonic::Request<super::PcmbufFadeRequest>, ··· 8768 7547 "/rockbox.v1alpha1.SoundService/PcmbufSetLowLatency" => { 8769 7548 #[allow(non_camel_case_types)] 8770 7549 struct PcmbufSetLowLatencySvc<T: SoundService>(pub Arc<T>); 8771 - impl< 8772 - T: SoundService, 8773 - > tonic::server::UnaryService<super::PcmbufSetLowLatencyRequest> 8774 - for PcmbufSetLowLatencySvc<T> { 7550 + impl<T: SoundService> 7551 + tonic::server::UnaryService<super::PcmbufSetLowLatencyRequest> 7552 + for PcmbufSetLowLatencySvc<T> 7553 + { 8775 7554 type Response = super::PcmbufSetLowLatencyResponse; 8776 - type Future = BoxFuture< 8777 - tonic::Response<Self::Response>, 8778 - tonic::Status, 8779 - >; 7555 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8780 7556 fn call( 8781 7557 &mut self, 8782 7558 request: tonic::Request<super::PcmbufSetLowLatencyRequest>, 8783 7559 ) -> Self::Future { 8784 7560 let inner = Arc::clone(&self.0); 8785 7561 let fut = async move { 8786 - <T as SoundService>::pcmbuf_set_low_latency(&inner, request) 8787 - .await 7562 + <T as SoundService>::pcmbuf_set_low_latency(&inner, request).await 8788 7563 }; 8789 7564 Box::pin(fut) 8790 7565 } ··· 8814 7589 "/rockbox.v1alpha1.SoundService/SystemSoundPlay" => { 8815 7590 #[allow(non_camel_case_types)] 8816 7591 struct SystemSoundPlaySvc<T: SoundService>(pub Arc<T>); 8817 - impl< 8818 - T: SoundService, 8819 - > tonic::server::UnaryService<super::SystemSoundPlayRequest> 8820 - for SystemSoundPlaySvc<T> { 7592 + impl<T: SoundService> tonic::server::UnaryService<super::SystemSoundPlayRequest> 7593 + for SystemSoundPlaySvc<T> 7594 + { 8821 7595 type Response = super::SystemSoundPlayResponse; 8822 - type Future = BoxFuture< 8823 - tonic::Response<Self::Response>, 8824 - tonic::Status, 8825 - >; 7596 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8826 7597 fn call( 8827 7598 &mut self, 8828 7599 request: tonic::Request<super::SystemSoundPlayRequest>, 8829 7600 ) -> Self::Future { 8830 7601 let inner = Arc::clone(&self.0); 8831 7602 let fut = async move { 8832 - <T as SoundService>::system_sound_play(&inner, request) 8833 - .await 7603 + <T as SoundService>::system_sound_play(&inner, request).await 8834 7604 }; 8835 7605 Box::pin(fut) 8836 7606 } ··· 8860 7630 "/rockbox.v1alpha1.SoundService/KeyclickClick" => { 8861 7631 #[allow(non_camel_case_types)] 8862 7632 struct KeyclickClickSvc<T: SoundService>(pub Arc<T>); 8863 - impl< 8864 - T: SoundService, 8865 - > tonic::server::UnaryService<super::KeyclickClickRequest> 8866 - for KeyclickClickSvc<T> { 7633 + impl<T: SoundService> tonic::server::UnaryService<super::KeyclickClickRequest> 7634 + for KeyclickClickSvc<T> 7635 + { 8867 7636 type Response = super::KeyclickClickResponse; 8868 - type Future = BoxFuture< 8869 - tonic::Response<Self::Response>, 8870 - tonic::Status, 8871 - >; 7637 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 8872 7638 fn call( 8873 7639 &mut self, 8874 7640 request: tonic::Request<super::KeyclickClickRequest>, ··· 8902 7668 }; 8903 7669 Box::pin(fut) 8904 7670 } 8905 - _ => { 8906 - Box::pin(async move { 8907 - let mut response = http::Response::new(empty_body()); 8908 - let headers = response.headers_mut(); 8909 - headers 8910 - .insert( 8911 - tonic::Status::GRPC_STATUS, 8912 - (tonic::Code::Unimplemented as i32).into(), 8913 - ); 8914 - headers 8915 - .insert( 8916 - http::header::CONTENT_TYPE, 8917 - tonic::metadata::GRPC_CONTENT_TYPE, 8918 - ); 8919 - Ok(response) 8920 - }) 8921 - } 7671 + _ => Box::pin(async move { 7672 + let mut response = http::Response::new(empty_body()); 7673 + let headers = response.headers_mut(); 7674 + headers.insert( 7675 + tonic::Status::GRPC_STATUS, 7676 + (tonic::Code::Unimplemented as i32).into(), 7677 + ); 7678 + headers.insert( 7679 + http::header::CONTENT_TYPE, 7680 + tonic::metadata::GRPC_CONTENT_TYPE, 7681 + ); 7682 + Ok(response) 7683 + }), 8922 7684 } 8923 7685 } 8924 7686 } ··· 8979 7741 dead_code, 8980 7742 missing_docs, 8981 7743 clippy::wildcard_imports, 8982 - clippy::let_unit_value, 7744 + clippy::let_unit_value 8983 7745 )] 8984 - use tonic::codegen::*; 8985 7746 use tonic::codegen::http::Uri; 7747 + use tonic::codegen::*; 8986 7748 #[derive(Debug, Clone)] 8987 7749 pub struct SystemServiceClient<T> { 8988 7750 inner: tonic::client::Grpc<T>, ··· 9026 7788 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody, 9027 7789 >, 9028 7790 >, 9029 - <T as tonic::codegen::Service< 9030 - http::Request<tonic::body::BoxBody>, 9031 - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, 7791 + <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error: 7792 + Into<StdError> + std::marker::Send + std::marker::Sync, 9032 7793 { 9033 7794 SystemServiceClient::new(InterceptedService::new(inner, interceptor)) 9034 7795 } ··· 9066 7827 pub async fn get_rockbox_version( 9067 7828 &mut self, 9068 7829 request: impl tonic::IntoRequest<super::GetRockboxVersionRequest>, 9069 - ) -> std::result::Result< 9070 - tonic::Response<super::GetRockboxVersionResponse>, 9071 - tonic::Status, 9072 - > { 9073 - self.inner 9074 - .ready() 9075 - .await 9076 - .map_err(|e| { 9077 - tonic::Status::unknown( 9078 - format!("Service was not ready: {}", e.into()), 9079 - ) 9080 - })?; 7830 + ) -> std::result::Result<tonic::Response<super::GetRockboxVersionResponse>, tonic::Status> 7831 + { 7832 + self.inner.ready().await.map_err(|e| { 7833 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 7834 + })?; 9081 7835 let codec = tonic::codec::ProstCodec::default(); 9082 7836 let path = http::uri::PathAndQuery::from_static( 9083 7837 "/rockbox.v1alpha1.SystemService/GetRockboxVersion", 9084 7838 ); 9085 7839 let mut req = request.into_request(); 9086 - req.extensions_mut() 9087 - .insert( 9088 - GrpcMethod::new( 9089 - "rockbox.v1alpha1.SystemService", 9090 - "GetRockboxVersion", 9091 - ), 9092 - ); 7840 + req.extensions_mut().insert(GrpcMethod::new( 7841 + "rockbox.v1alpha1.SystemService", 7842 + "GetRockboxVersion", 7843 + )); 9093 7844 self.inner.unary(req, path, codec).await 9094 7845 } 9095 7846 pub async fn get_global_status( 9096 7847 &mut self, 9097 7848 request: impl tonic::IntoRequest<super::GetGlobalStatusRequest>, 9098 - ) -> std::result::Result< 9099 - tonic::Response<super::GetGlobalStatusResponse>, 9100 - tonic::Status, 9101 - > { 9102 - self.inner 9103 - .ready() 9104 - .await 9105 - .map_err(|e| { 9106 - tonic::Status::unknown( 9107 - format!("Service was not ready: {}", e.into()), 9108 - ) 9109 - })?; 7849 + ) -> std::result::Result<tonic::Response<super::GetGlobalStatusResponse>, tonic::Status> 7850 + { 7851 + self.inner.ready().await.map_err(|e| { 7852 + tonic::Status::unknown(format!("Service was not ready: {}", e.into())) 7853 + })?; 9110 7854 let codec = tonic::codec::ProstCodec::default(); 9111 7855 let path = http::uri::PathAndQuery::from_static( 9112 7856 "/rockbox.v1alpha1.SystemService/GetGlobalStatus", 9113 7857 ); 9114 7858 let mut req = request.into_request(); 9115 - req.extensions_mut() 9116 - .insert( 9117 - GrpcMethod::new("rockbox.v1alpha1.SystemService", "GetGlobalStatus"), 9118 - ); 7859 + req.extensions_mut().insert(GrpcMethod::new( 7860 + "rockbox.v1alpha1.SystemService", 7861 + "GetGlobalStatus", 7862 + )); 9119 7863 self.inner.unary(req, path, codec).await 9120 7864 } 9121 7865 } ··· 9127 7871 dead_code, 9128 7872 missing_docs, 9129 7873 clippy::wildcard_imports, 9130 - clippy::let_unit_value, 7874 + clippy::let_unit_value 9131 7875 )] 9132 7876 use tonic::codegen::*; 9133 7877 /// Generated trait containing gRPC methods that should be implemented for use with SystemServiceServer. ··· 9136 7880 async fn get_rockbox_version( 9137 7881 &self, 9138 7882 request: tonic::Request<super::GetRockboxVersionRequest>, 9139 - ) -> std::result::Result< 9140 - tonic::Response<super::GetRockboxVersionResponse>, 9141 - tonic::Status, 9142 - >; 7883 + ) -> std::result::Result<tonic::Response<super::GetRockboxVersionResponse>, tonic::Status>; 9143 7884 async fn get_global_status( 9144 7885 &self, 9145 7886 request: tonic::Request<super::GetGlobalStatusRequest>, 9146 - ) -> std::result::Result< 9147 - tonic::Response<super::GetGlobalStatusResponse>, 9148 - tonic::Status, 9149 - >; 7887 + ) -> std::result::Result<tonic::Response<super::GetGlobalStatusResponse>, tonic::Status>; 9150 7888 } 9151 7889 #[derive(Debug)] 9152 7890 pub struct SystemServiceServer<T> { ··· 9169 7907 max_encoding_message_size: None, 9170 7908 } 9171 7909 } 9172 - pub fn with_interceptor<F>( 9173 - inner: T, 9174 - interceptor: F, 9175 - ) -> InterceptedService<Self, F> 7910 + pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F> 9176 7911 where 9177 7912 F: tonic::service::Interceptor, 9178 7913 { ··· 9227 7962 "/rockbox.v1alpha1.SystemService/GetRockboxVersion" => { 9228 7963 #[allow(non_camel_case_types)] 9229 7964 struct GetRockboxVersionSvc<T: SystemService>(pub Arc<T>); 9230 - impl< 9231 - T: SystemService, 9232 - > tonic::server::UnaryService<super::GetRockboxVersionRequest> 9233 - for GetRockboxVersionSvc<T> { 7965 + impl<T: SystemService> 7966 + tonic::server::UnaryService<super::GetRockboxVersionRequest> 7967 + for GetRockboxVersionSvc<T> 7968 + { 9234 7969 type Response = super::GetRockboxVersionResponse; 9235 - type Future = BoxFuture< 9236 - tonic::Response<Self::Response>, 9237 - tonic::Status, 9238 - >; 7970 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 9239 7971 fn call( 9240 7972 &mut self, 9241 7973 request: tonic::Request<super::GetRockboxVersionRequest>, 9242 7974 ) -> Self::Future { 9243 7975 let inner = Arc::clone(&self.0); 9244 7976 let fut = async move { 9245 - <T as SystemService>::get_rockbox_version(&inner, request) 9246 - .await 7977 + <T as SystemService>::get_rockbox_version(&inner, request).await 9247 7978 }; 9248 7979 Box::pin(fut) 9249 7980 } ··· 9273 8004 "/rockbox.v1alpha1.SystemService/GetGlobalStatus" => { 9274 8005 #[allow(non_camel_case_types)] 9275 8006 struct GetGlobalStatusSvc<T: SystemService>(pub Arc<T>); 9276 - impl< 9277 - T: SystemService, 9278 - > tonic::server::UnaryService<super::GetGlobalStatusRequest> 9279 - for GetGlobalStatusSvc<T> { 8007 + impl<T: SystemService> 8008 + tonic::server::UnaryService<super::GetGlobalStatusRequest> 8009 + for GetGlobalStatusSvc<T> 8010 + { 9280 8011 type Response = super::GetGlobalStatusResponse; 9281 - type Future = BoxFuture< 9282 - tonic::Response<Self::Response>, 9283 - tonic::Status, 9284 - >; 8012 + type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>; 9285 8013 fn call( 9286 8014 &mut self, 9287 8015 request: tonic::Request<super::GetGlobalStatusRequest>, 9288 8016 ) -> Self::Future { 9289 8017 let inner = Arc::clone(&self.0); 9290 8018 let fut = async move { 9291 - <T as SystemService>::get_global_status(&inner, request) 9292 - .await 8019 + <T as SystemService>::get_global_status(&inner, request).await 9293 8020 }; 9294 8021 Box::pin(fut) 9295 8022 } ··· 9316 8043 }; 9317 8044 Box::pin(fut) 9318 8045 } 9319 - _ => { 9320 - Box::pin(async move { 9321 - let mut response = http::Response::new(empty_body()); 9322 - let headers = response.headers_mut(); 9323 - headers 9324 - .insert( 9325 - tonic::Status::GRPC_STATUS, 9326 - (tonic::Code::Unimplemented as i32).into(), 9327 - ); 9328 - headers 9329 - .insert( 9330 - http::header::CONTENT_TYPE, 9331 - tonic::metadata::GRPC_CONTENT_TYPE, 9332 - ); 9333 - Ok(response) 9334 - }) 9335 - } 8046 + _ => Box::pin(async move { 8047 + let mut response = http::Response::new(empty_body()); 8048 + let headers = response.headers_mut(); 8049 + headers.insert( 8050 + tonic::Status::GRPC_STATUS, 8051 + (tonic::Code::Unimplemented as i32).into(), 8052 + ); 8053 + headers.insert( 8054 + http::header::CONTENT_TYPE, 8055 + tonic::metadata::GRPC_CONTENT_TYPE, 8056 + ); 8057 + Ok(response) 8058 + }), 9336 8059 } 9337 8060 } 9338 8061 }
+1
gpui/Cargo.lock
··· 16 16 "reqwest", 17 17 "rust-embed", 18 18 "serde", 19 + "serde_json", 19 20 "souvlaki", 20 21 "tokio", 21 22 "tonic",
+1
gpui/Cargo.toml
··· 13 13 gpui = "0.2.2" 14 14 rust-embed = "8.0" 15 15 serde = { version = "1.0", features = ["derive"] } 16 + serde_json = "1.0" 16 17 env_logger = "0.11" 17 18 log = "0.4" 18 19 prost = "0.13.2"
+1
gpui/assets/icons/airplay.svg
··· 1 + <svg viewBox="0 0 512 512" height="30" width="30" aria-hidden="true" focusable="false" fill="currentColor" xmlns="http://www.w3.org/2000/svg" color="#fe099c" class="StyledIconBase-sc-ea9ulj-0 hQYLxw"><rect width="416" height="304" x="48" y="96" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" rx="32.14" ry="32.14"></rect><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M16 416h480"></path></svg>
+1
gpui/assets/icons/chromecast.svg
··· 1 + <svg viewBox="0 0 24 24" height="18" width="18" aria-hidden="true" focusable="false" fill="currentColor" xmlns="http://www.w3.org/2000/svg" color="#000" class="StyledIconBase-sc-ea9ulj-0 hQYLxw"><path d="M0 18.546v3.272h3.273A3.268 3.268 0 0 0 0 18.545zm0-4.364v2.182a5.456 5.456 0 0 1 5.455 5.454h2.181A7.63 7.63 0 0 0 0 14.182zm0-4.364V12c5.422 0 9.818 4.396 9.818 9.818H12c0-6.633-5.378-12-12-12zm21.818-7.636H2.182C.982 2.182 0 3.164 0 4.364v3.272h2.182V4.364h19.636v15.272h-7.636v2.182h7.636c1.2 0 2.182-.982 2.182-2.182V4.364c0-1.2-.982-2.182-2.182-2.182Z"></path></svg>
+1
gpui/assets/icons/device.svg
··· 1 + <svg viewBox="0 0 512 512" height="30" width="30" aria-hidden="true" focusable="false" fill="currentColor" xmlns="http://www.w3.org/2000/svg" color="#fe099c" class="StyledIconBase-sc-ea9ulj-0 hQYLxw"><rect width="416" height="304" x="48" y="96" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" rx="32.14" ry="32.14"></rect><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M16 416h480"></path></svg>
+3
gpui/assets/icons/speaker.svg
··· 1 + <svg viewBox="0 0 16 16" height="18" width="18" aria-hidden="true" focusable="false" fill="currentColor" xmlns="http://www.w3.org/2000/svg" color="#000" class="StyledIconBase-sc-ea9ulj-0 hQYLxw"> 2 + <path d="M12 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h8zM4 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H4z"></path><path d="M8 4.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5zM8 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 3a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zm-3.5 1.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"> 3 + </path></svg>
+31 -1
gpui/src/client.rs
··· 13 13 StreamLibraryRequest, StreamPlaylistRequest, StreamStatusRequest, TreeGetEntriesRequest, 14 14 UnlikeTrackRequest, 15 15 }; 16 - use crate::state::{SearchAlbum, SearchArtist, SearchPlaylist, SearchResults}; 16 + use crate::state::{DeviceItem, SearchAlbum, SearchArtist, SearchPlaylist, SearchResults}; 17 17 18 18 // Matches apps/playlist.h PLAYLIST_INSERT_* constants 19 19 pub const INSERT_FIRST: i32 = -4; // play next (after current) ··· 25 25 use tokio::sync::mpsc::Sender; 26 26 27 27 const URL: &str = "http://127.0.0.1:6061"; 28 + const HTTP_URL: &str = "http://127.0.0.1:6063"; 28 29 29 30 // ── Library ─────────────────────────────────────────────────────────────────── 30 31 ··· 913 914 .await?; 914 915 Ok(()) 915 916 } 917 + 918 + // ── Device output API ───────────────────────────────────────────────────────── 919 + 920 + pub async fn fetch_devices() -> Result<Vec<DeviceItem>> { 921 + let body = reqwest::get(format!("{HTTP_URL}/devices")) 922 + .await? 923 + .text() 924 + .await?; 925 + let items: Vec<DeviceItem> = serde_json::from_str(&body)?; 926 + Ok(items) 927 + } 928 + 929 + pub async fn connect_device(id: String) -> Result<()> { 930 + let client = reqwest::Client::new(); 931 + client 932 + .put(format!("{HTTP_URL}/devices/{id}/connect")) 933 + .send() 934 + .await?; 935 + Ok(()) 936 + } 937 + 938 + pub async fn disconnect_device(id: String) -> Result<()> { 939 + let client = reqwest::Client::new(); 940 + client 941 + .put(format!("{HTTP_URL}/devices/{id}/disconnect")) 942 + .send() 943 + .await?; 944 + Ok(()) 945 + }
+19
gpui/src/state.rs
··· 1 + #[derive(Clone, Debug, Default, serde::Deserialize)] 2 + pub struct DeviceItem { 3 + pub id: String, 4 + pub name: String, 5 + pub ip: String, 6 + pub port: u16, 7 + pub service: String, 8 + pub app: String, 9 + pub is_connected: bool, 10 + pub is_current_device: bool, 11 + } 12 + 13 + #[derive(Clone, Default)] 14 + pub struct DevicesState { 15 + pub devices: Vec<DeviceItem>, 16 + pub picker_open: bool, 17 + } 18 + impl gpui::Global for DevicesState {} 19 + 1 20 #[derive(Clone, Debug, Default)] 2 21 pub struct Track { 3 22 pub id: String,
+35 -30
gpui/src/ui/components/controlbar.rs
··· 1 1 use crate::controller::Controller; 2 - use crate::state::format_duration; 2 + use crate::state::{format_duration, DevicesState}; 3 + use crate::ui::components::device_picker::{device_icon, fetch_and_update_devices}; 3 4 use crate::ui::components::icons::{Icon, Icons}; 4 5 use crate::ui::components::seek_bar::SeekBar; 5 6 use crate::ui::theme::Theme; 6 - use gpui::{div, px, App, Context, IntoElement, ParentElement, Render, Styled, Window}; 7 + use gpui::{ 8 + div, px, App, Context, InteractiveElement, IntoElement, ParentElement, Render, 9 + StatefulInteractiveElement, Styled, Window, 10 + }; 7 11 8 12 pub struct ControlBar; 9 13 ··· 14 18 15 19 let duration = state.current_track().map(|t| t.duration).unwrap_or(0); 16 20 let position = state.position; 17 - let vol_fill = crate::state::volume_fraction(state.volume); 18 21 let fill_fraction = if duration > 0 { 19 22 (position as f32 / duration as f32).clamp(0.0, 1.0) 20 23 } else { 21 24 0.0 22 25 }; 23 - let vol_pct = (vol_fill * 100.0) as u32; 26 + let current_device_icon = cx 27 + .global::<DevicesState>() 28 + .devices 29 + .iter() 30 + .find(|d| d.is_current_device) 31 + .map(|d| device_icon(d)) 32 + .unwrap_or(Icons::Speaker); 24 33 25 34 div() 26 35 .w_full() ··· 30 39 .gap_x_4() 31 40 .px_6() 32 41 .py_3() 33 - // Left spacer — mirrors volume width for symmetry 42 + // Left spacer — mirrors device button width for symmetry 34 43 .child(div().w(px(160.0))) 35 - // Elapsed + progress + duration 44 + // Elapsed + progress + duration — center 36 45 .child( 37 46 div() 38 47 .flex_1() ··· 67 76 .child(format_duration(duration)), 68 77 ), 69 78 ) 70 - // Volume — fixed width to match left spacer 79 + // Device picker — right 71 80 .child( 72 81 div() 73 82 .w(px(160.0)) 74 83 .flex() 75 84 .items_center() 76 85 .justify_end() 77 - .gap_x_2() 78 86 .child( 79 87 div() 80 - .text_color(theme.volume_icon) 81 - .child(Icon::new(Icons::Volume1).size_4()), 82 - ) 83 - .child( 84 - div() 85 - .w_24() 86 - .h(px(4.0)) 87 - .rounded_full() 88 - .bg(theme.volume_slider_track) 89 - .child( 90 - div() 91 - .h_full() 92 - .rounded_full() 93 - .bg(theme.volume_slider_fill) 94 - .w(px(vol_fill * 96.0)), 95 - ), 96 - ) 97 - .child( 98 - div() 99 - .text_xs() 100 - .text_color(theme.playback_position_text) 101 - .child(format!("{vol_pct}%")), 88 + .id("controlbar-device-btn") 89 + .p_1p5() 90 + .rounded_md() 91 + .flex() 92 + .items_center() 93 + .justify_center() 94 + .cursor_pointer() 95 + .text_color(theme.player_icons_text) 96 + .hover(|this| { 97 + this.bg(theme.player_icons_bg_hover) 98 + .text_color(theme.player_icons_text_hover) 99 + }) 100 + .on_click(move |_, _, cx: &mut App| { 101 + fetch_and_update_devices(cx); 102 + let mut state = cx.global::<DevicesState>().clone(); 103 + state.picker_open = !state.picker_open; 104 + cx.set_global(state); 105 + }) 106 + .child(Icon::new(current_device_icon).size_4()), 102 107 ), 103 108 ) 104 109 }
+179
gpui/src/ui/components/device_picker.rs
··· 1 + use crate::controller::Controller; 2 + use crate::state::{DeviceItem, DevicesState}; 3 + use crate::ui::components::icons::{Icon, Icons}; 4 + use crate::ui::theme::Theme; 5 + use gpui::prelude::FluentBuilder; 6 + use gpui::{ 7 + div, px, App, Context, FontWeight, InteractiveElement, IntoElement, MouseButton, 8 + ParentElement, Render, StatefulInteractiveElement, Styled, Window, MouseMoveEvent, 9 + }; 10 + 11 + pub fn device_icon(device: &DeviceItem) -> Icons { 12 + match device.service.as_str() { 13 + "chromecast" => Icons::Chromecast, 14 + "airplay" => Icons::Airplay, 15 + _ => { 16 + if device.is_current_device { 17 + Icons::Device 18 + } else { 19 + Icons::Speaker 20 + } 21 + } 22 + } 23 + } 24 + 25 + pub struct DevicePicker; 26 + 27 + impl Render for DevicePicker { 28 + fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement { 29 + let theme = *cx.global::<Theme>(); 30 + let state = cx.global::<DevicesState>().clone(); 31 + 32 + if !state.picker_open { 33 + return div().into_any_element(); 34 + } 35 + 36 + // Full-screen transparent backdrop: swallows scroll events and 37 + // closes the picker when the user clicks outside the popup. 38 + div() 39 + .id("device-picker-backdrop") 40 + .absolute() 41 + .top_0() 42 + .left_0() 43 + .w_full() 44 + .h_full() 45 + .on_mouse_down(MouseButton::Left, |_, _, cx| { 46 + let mut state = cx.global::<DevicesState>().clone(); 47 + state.picker_open = false; 48 + cx.set_global(state); 49 + cx.stop_propagation(); 50 + }) 51 + .on_mouse_move(|_: &MouseMoveEvent, _, cx| { 52 + cx.stop_propagation(); 53 + }) 54 + .on_scroll_wheel(|_, _, _| {}) 55 + .child( 56 + // Popup panel — stop propagation so clicks inside don't hit the backdrop. 57 + div() 58 + .id("device-picker-popup") 59 + .absolute() 60 + .bottom(px(80.0)) 61 + .right(px(16.0)) 62 + .w(px(280.0)) 63 + .bg(theme.app_bg) 64 + .border_1() 65 + .border_color(theme.border) 66 + .rounded_lg() 67 + .shadow_lg() 68 + .on_mouse_down(MouseButton::Left, |_, _, cx| { 69 + cx.stop_propagation(); 70 + }) 71 + .on_scroll_wheel(|_, _, cx| { 72 + cx.stop_propagation(); 73 + }) 74 + .child( 75 + div() 76 + .px_4() 77 + .py_3() 78 + .border_b_1() 79 + .border_color(theme.border) 80 + .child( 81 + div() 82 + .text_sm() 83 + .font_weight(FontWeight(600.0)) 84 + .text_color(theme.player_title_text) 85 + .child("Output device"), 86 + ), 87 + ) 88 + .child( 89 + div() 90 + .id("device-picker-list") 91 + .py_1() 92 + .max_h(px(280.0)) 93 + .overflow_y_scroll() 94 + .children(state.devices.iter().cloned().map(|device| { 95 + let id = device.id.clone(); 96 + let is_current = device.is_current_device; 97 + let icon = device_icon(&device); 98 + let name = device.name.clone(); 99 + 100 + div() 101 + .id(gpui::SharedString::from(format!( 102 + "device-row-{}", 103 + device.id 104 + ))) 105 + .px_4() 106 + .py_2() 107 + .flex() 108 + .items_center() 109 + .gap_x_3() 110 + .cursor_pointer() 111 + .text_color(if is_current { 112 + theme.player_icons_text_active 113 + } else { 114 + theme.player_title_text 115 + }) 116 + .when(is_current, |this: gpui::Stateful<gpui::Div>| { 117 + this.bg(theme.player_icons_bg_active) 118 + }) 119 + .hover(|this| this.bg(theme.player_icons_bg_hover)) 120 + .on_click(move |_, _, cx: &mut App| { 121 + let rt = cx.global::<Controller>().rt(); 122 + let id_clone = id.clone(); 123 + rt.spawn(async move { 124 + let _ = 125 + crate::client::connect_device(id_clone).await; 126 + }); 127 + let mut state = cx.global::<DevicesState>().clone(); 128 + for d in state.devices.iter_mut() { 129 + d.is_current_device = d.id == id; 130 + } 131 + state.picker_open = false; 132 + cx.set_global(state); 133 + }) 134 + .child( 135 + div() 136 + .flex_shrink_0() 137 + .child(Icon::new(icon).size_4()), 138 + ) 139 + .child( 140 + div() 141 + .flex_1() 142 + .text_sm() 143 + .truncate() 144 + .child(name), 145 + ) 146 + .when(is_current, |this: gpui::Stateful<gpui::Div>| { 147 + this.child( 148 + div() 149 + .flex_shrink_0() 150 + .child(Icon::new(Icons::Device).size_3()), 151 + ) 152 + }) 153 + })), 154 + ), 155 + ) 156 + .into_any_element() 157 + } 158 + } 159 + 160 + /// Fetch devices and push them into DevicesState via a blocking-compatible spawn. 161 + pub fn fetch_and_update_devices(cx: &mut App) { 162 + let rt = cx.global::<Controller>().rt(); 163 + let (tx, mut rx) = tokio::sync::mpsc::channel::<Vec<DeviceItem>>(1); 164 + rt.spawn(async move { 165 + if let Ok(devices) = crate::client::fetch_devices().await { 166 + let _ = tx.send(devices).await; 167 + } 168 + }); 169 + cx.spawn(async move |cx| { 170 + if let Some(devices) = rx.recv().await { 171 + let _ = cx.update(|cx| { 172 + let mut state = cx.global::<DevicesState>().clone(); 173 + state.devices = devices; 174 + cx.set_global(state); 175 + }); 176 + } 177 + }) 178 + .detach(); 179 + }
+8
gpui/src/ui/components/icons.rs
··· 175 175 CirclePlus, 176 176 Pencil, 177 177 Trash, 178 + Speaker, 179 + Device, 180 + Chromecast, 181 + Airplay, 178 182 } 179 183 180 184 impl IconNamed for Icons { ··· 208 212 Icons::CirclePlus => "icons/circle-plus.svg", 209 213 Icons::Pencil => "icons/pencil.svg", 210 214 Icons::Trash => "icons/trash.svg", 215 + Icons::Speaker => "icons/speaker.svg", 216 + Icons::Device => "icons/device.svg", 217 + Icons::Chromecast => "icons/chromecast.svg", 218 + Icons::Airplay => "icons/airplay.svg", 211 219 } 212 220 .into() 213 221 }
+35 -5
gpui/src/ui/components/miniplayer.rs
··· 1 1 use crate::client::{adjust_volume, save_repeat, save_shuffle}; 2 2 use crate::controller::Controller; 3 3 use crate::state::{ 4 - format_duration, volume_fraction, PlaybackStatus, VOLUME_MAX_DB, VOLUME_MIN_DB, 4 + format_duration, volume_fraction, DevicesState, PlaybackStatus, VOLUME_MAX_DB, VOLUME_MIN_DB, 5 5 }; 6 + use crate::ui::components::device_picker::device_icon; 6 7 use crate::ui::components::icons::{Icon, Icons}; 7 8 use crate::ui::components::seek_bar::SeekBar; 8 9 use crate::ui::components::{LikedSongs, Page}; ··· 10 11 use crate::ui::theme::Theme; 11 12 use gpui::prelude::FluentBuilder; 12 13 use gpui::{ 13 - div, img, px, relative, App, Context, FontWeight, InteractiveElement, IntoElement, ObjectFit, 14 - ParentElement, Render, ScrollWheelEvent, StatefulInteractiveElement, Styled, StyledImage, 15 - Window, 14 + div, img, px, relative, App, Context, FontWeight, InteractiveElement, IntoElement, 15 + ObjectFit, ParentElement, Render, ScrollWheelEvent, StatefulInteractiveElement, Styled, 16 + StyledImage, Window, 16 17 }; 17 18 18 19 pub struct MiniPlayer; ··· 23 24 let liked_songs = cx.global::<LikedSongs>().0.clone(); 24 25 let state = cx.global::<Controller>().state.read(cx); 25 26 let is_playing = state.status == PlaybackStatus::Playing; 27 + let current_device_icon = cx 28 + .global::<DevicesState>() 29 + .devices 30 + .iter() 31 + .find(|d| d.is_current_device) 32 + .map(|d| device_icon(d)) 33 + .unwrap_or(Icons::Speaker); 26 34 27 35 let title = state 28 36 .current_track() ··· 66 74 .flex_shrink_0() 67 75 .flex() 68 76 .flex_col() 77 + .relative() 69 78 .border_t_1() 70 79 .border_color(theme.border) 71 80 .bg(theme.app_bg) ··· 369 378 ), 370 379 ), 371 380 ) 372 - // Right — volume control 381 + // Right — volume control + device picker trigger 373 382 .child( 374 383 div() 375 384 .flex_1() ··· 377 386 .items_center() 378 387 .justify_end() 379 388 .gap_x_2() 389 + .child( 390 + div() 391 + .id("mini_device") 392 + .p_1p5() 393 + .rounded_md() 394 + .flex() 395 + .items_center() 396 + .justify_center() 397 + .cursor_pointer() 398 + .text_color(theme.player_icons_text) 399 + .hover(|this| { 400 + this.text_color(theme.player_icons_text_hover) 401 + .bg(theme.player_icons_bg_hover) 402 + }) 403 + .on_click(move |_, _, cx: &mut App| { 404 + let mut state = cx.global::<DevicesState>().clone(); 405 + state.picker_open = !state.picker_open; 406 + cx.set_global(state); 407 + }) 408 + .child(Icon::new(current_device_icon).size_4()), 409 + ) 380 410 .child( 381 411 div() 382 412 .text_color(theme.volume_icon)
+1
gpui/src/ui/components/mod.rs
··· 1 1 pub mod controlbar; 2 + pub mod device_picker; 2 3 pub mod icons; 3 4 pub mod miniplayer; 4 5 pub mod navbar;
+7 -2
gpui/src/ui/components/pages/library.rs
··· 3 3 INSERT_FIRST, INSERT_LAST, INSERT_LAST_SHUFFLED, INSERT_SHUFFLED, 4 4 }; 5 5 use crate::controller::Controller; 6 - use crate::state::{format_duration, PlaybackStatus}; 6 + use crate::state::{format_duration, DevicesState, PlaybackStatus}; 7 7 use crate::ui::animations::equalizer_bars; 8 8 use crate::ui::components::icons::{Icon, Icons}; 9 9 use crate::ui::components::miniplayer::MiniPlayer; ··· 244 244 LibraryPage { 245 245 scroll_handle: UniformListScrollHandle::new(), 246 246 detail_scroll_handle: UniformListScrollHandle::new(), 247 - miniplayer: cx.new(|_| MiniPlayer), 247 + miniplayer: { 248 + cx.new(|cx| { 249 + let _ = cx.observe_global::<DevicesState>(|_, cx| cx.notify()); 250 + MiniPlayer 251 + }) 252 + }, 248 253 search_input: cx.new(|cx| SearchInput::new(cx)), 249 254 files_view: cx.new(|cx| FilesView::new(cx)), 250 255 modal_name_input: cx.new(|cx| TextInput::new("Title", cx)),
+5 -2
gpui/src/ui/components/pages/queue.rs
··· 1 1 use crate::controller::Controller; 2 - use crate::state::{format_duration, PlaybackStatus}; 2 + use crate::state::{format_duration, DevicesState, PlaybackStatus}; 3 3 use crate::ui::animations::equalizer_bars; 4 4 use crate::ui::components::icons::{Icon, Icons}; 5 5 use crate::ui::components::miniplayer::MiniPlayer; ··· 21 21 pub fn new(cx: &mut App) -> Self { 22 22 QueuePage { 23 23 scroll_handle: UniformListScrollHandle::new(), 24 - miniplayer: cx.new(|_| MiniPlayer), 24 + miniplayer: cx.new(|cx| { 25 + let _ = cx.observe_global::<DevicesState>(|_, cx| cx.notify()); 26 + MiniPlayer 27 + }), 25 28 last_scrolled_idx: None, 26 29 } 27 30 }
+15 -1
gpui/src/ui/rockbox.rs
··· 1 + use crate::state::DevicesState; 1 2 use crate::ui::animations::ease_in_out_expo; 2 3 use crate::ui::components::controlbar::ControlBar; 4 + use crate::ui::components::device_picker::{fetch_and_update_devices, DevicePicker}; 3 5 use crate::ui::components::pages::{library::LibraryPage, player::PlayerPage, queue::QueuePage}; 4 6 use crate::ui::components::titlebar::Titlebar; 5 7 use crate::ui::components::Page; ··· 18 20 pub player_page: Entity<PlayerPage>, 19 21 pub library_page: Entity<LibraryPage>, 20 22 pub queue_page: Entity<QueuePage>, 23 + pub device_picker: Entity<DevicePicker>, 21 24 } 22 25 23 26 impl Rockbox { 24 27 pub fn new(cx: &mut Context<Self>) -> Self { 25 28 cx.set_global(Theme::default()); 26 29 cx.set_global(Page::Player); 30 + cx.set_global(DevicesState::default()); 27 31 global_keybinds::register_keybinds(cx); 28 32 let titlebar = cx.new(|cx| Titlebar::new(cx)); 29 - let controlbar = cx.new(|_| ControlBar); 33 + let controlbar = cx.new(|cx| { 34 + let _ = cx.observe_global::<DevicesState>(|_, cx| cx.notify()); 35 + ControlBar 36 + }); 30 37 let player_page = cx.new(|cx| PlayerPage::new(cx, controlbar)); 31 38 let library_page = cx.new(|cx| LibraryPage::new(cx)); 32 39 let queue_page = cx.new(|cx| QueuePage::new(cx)); 40 + let device_picker = cx.new(|cx| { 41 + let _ = cx.observe_global::<DevicesState>(|_, cx| cx.notify()); 42 + DevicePicker 43 + }); 44 + fetch_and_update_devices(cx); 33 45 Rockbox { 34 46 focus_handle: cx.focus_handle(), 35 47 titlebar, 36 48 player_page, 37 49 library_page, 38 50 queue_page, 51 + device_picker, 39 52 } 40 53 } 41 54 } ··· 121 134 } 122 135 }), 123 136 ) 137 + .child(self.device_picker.clone()) 124 138 } 125 139 }
+4 -1
macos/Rockbox/RockboxApp.swift
··· 11 11 @StateObject private var player = PlayerState() 12 12 @StateObject private var navigation = NavigationManager() 13 13 @StateObject private var searchManager = SearchManager() 14 + @StateObject private var deviceState = DeviceState() 14 15 @State private var startupFailed = false 15 16 @State private var startupError: Error? 16 - 17 + 17 18 var body: some Scene { 18 19 WindowGroup { 19 20 ContentView() 20 21 .environmentObject(player) 21 22 .environmentObject(navigation) 22 23 .environmentObject(searchManager) 24 + .environmentObject(deviceState) 23 25 .alert("Connection Failed", isPresented: $startupFailed) { 24 26 Button("Retry") { 25 27 retry() ··· 48 50 // If successful, start normal operations 49 51 player.startStreaming() 50 52 player.fetchSettings() 53 + await deviceState.refresh() 51 54 52 55 } catch { 53 56 // Show error and allow retry or quit
+43
macos/Rockbox/Services/DeviceService.swift
··· 1 + // 2 + // DeviceService.swift 3 + // Rockbox 4 + // 5 + 6 + import Foundation 7 + 8 + private let httpBase = "http://127.0.0.1:6063" 9 + 10 + struct DeviceInfo: Codable, Identifiable, Hashable { 11 + var id: String 12 + var name: String 13 + var ip: String 14 + var port: UInt16 15 + var service: String 16 + var app: String 17 + var isConnected: Bool 18 + var isCurrentDevice: Bool 19 + 20 + enum CodingKeys: String, CodingKey { 21 + case id, name, ip, port, service, app 22 + case isConnected = "is_connected" 23 + case isCurrentDevice = "is_current_device" 24 + } 25 + } 26 + 27 + func fetchDevices() async throws -> [DeviceInfo] { 28 + let url = URL(string: "\(httpBase)/devices")! 29 + let (data, _) = try await URLSession.shared.data(from: url) 30 + return try JSONDecoder().decode([DeviceInfo].self, from: data) 31 + } 32 + 33 + func connectDevice(id: String) async throws { 34 + var request = URLRequest(url: URL(string: "\(httpBase)/devices/\(id)/connect")!) 35 + request.httpMethod = "PUT" 36 + let _ = try await URLSession.shared.data(for: request) 37 + } 38 + 39 + func disconnectDevice(id: String) async throws { 40 + var request = URLRequest(url: URL(string: "\(httpBase)/devices/\(id)/disconnect")!) 41 + request.httpMethod = "PUT" 42 + let _ = try await URLSession.shared.data(for: request) 43 + }
+47
macos/Rockbox/State/DeviceState.swift
··· 1 + // 2 + // DeviceState.swift 3 + // Rockbox 4 + // 5 + 6 + import Foundation 7 + import SwiftUI 8 + 9 + @MainActor 10 + class DeviceState: ObservableObject { 11 + @Published var devices: [DeviceInfo] = [] 12 + @Published var isLoading = false 13 + 14 + var currentDevice: DeviceInfo? { 15 + devices.first { $0.isCurrentDevice } 16 + } 17 + 18 + func refresh() async { 19 + isLoading = true 20 + do { 21 + devices = try await fetchDevices() 22 + } catch { 23 + // silently ignore — UI shows stale state 24 + } 25 + isLoading = false 26 + } 27 + 28 + func connect(_ device: DeviceInfo) async { 29 + do { 30 + try await connectDevice(id: device.id) 31 + // Optimistically update local state. 32 + for i in devices.indices { 33 + devices[i].isCurrentDevice = devices[i].id == device.id 34 + } 35 + } catch {} 36 + } 37 + 38 + func disconnect() async { 39 + guard let current = currentDevice else { return } 40 + do { 41 + try await disconnectDevice(id: current.id) 42 + for i in devices.indices { 43 + devices[i].isCurrentDevice = devices[i].id == "builtin" 44 + } 45 + } catch {} 46 + } 47 + }
+155
macos/Rockbox/Views/Components/DeviceListView.swift
··· 1 + // 2 + // DeviceListView.swift 3 + // Rockbox 4 + // 5 + 6 + import SwiftUI 7 + 8 + /// Returns the SF Symbol name that best represents a device's service/app type. 9 + private func deviceSymbol(_ device: DeviceInfo) -> String { 10 + switch device.service { 11 + case "builtin": return "macmini" 12 + case "fifo": return "antenna.radiowaves.left.and.right" 13 + case "squeezelite": return "hifispeaker" 14 + case "airplay": return "airplayvideo" 15 + case "chromecast": return "tv.and.mediabox" 16 + case "upnp": return "network" 17 + default: return "hifispeaker" 18 + } 19 + } 20 + 21 + /// Returns the accent colour for a device type. 22 + private func deviceColor(_ device: DeviceInfo) -> Color { 23 + switch device.service { 24 + case "builtin": return Color(hex: "28fce3") 25 + case "fifo": return Color(hex: "9090ff") 26 + case "squeezelite": return Color(hex: "ffa028") 27 + case "airplay": return Color(hex: "fe09a3") 28 + case "chromecast": return Color(hex: "28cbfc") 29 + case "upnp": return Color(hex: "fe09a3") 30 + default: return .secondary 31 + } 32 + } 33 + 34 + struct DeviceListView: View { 35 + @EnvironmentObject var deviceState: DeviceState 36 + @Environment(\.dismiss) private var dismiss 37 + 38 + var body: some View { 39 + VStack(alignment: .leading, spacing: 0) { 40 + // Header — current device 41 + HStack(spacing: 12) { 42 + ZStack { 43 + RoundedRectangle(cornerRadius: 8) 44 + .fill(Color.secondary.opacity(0.12)) 45 + .frame(width: 36, height: 36) 46 + if let current = deviceState.currentDevice { 47 + Image(systemName: deviceSymbol(current)) 48 + .font(.system(size: 16)) 49 + .foregroundStyle(deviceColor(current)) 50 + } else { 51 + Image(systemName: "macmini") 52 + .font(.system(size: 16)) 53 + .foregroundStyle(Color(hex: "fe09a3")) 54 + } 55 + } 56 + 57 + VStack(alignment: .leading, spacing: 1) { 58 + Text("Current device") 59 + .font(.system(size: 11)) 60 + .foregroundStyle(.secondary) 61 + Text(deviceState.currentDevice?.name ?? "Rockbox (Built-in)") 62 + .font(.system(size: 13, weight: .medium)) 63 + .lineLimit(1) 64 + } 65 + 66 + Spacer() 67 + } 68 + .padding(.horizontal, 16) 69 + .padding(.top, 14) 70 + .padding(.bottom, 10) 71 + 72 + Divider() 73 + .padding(.horizontal, 8) 74 + 75 + // Device list 76 + if deviceState.isLoading { 77 + HStack { 78 + Spacer() 79 + ProgressView() 80 + .padding() 81 + Spacer() 82 + } 83 + } else { 84 + let others = deviceState.devices.filter { !$0.isCurrentDevice } 85 + if others.isEmpty { 86 + Text("No other devices found.") 87 + .font(.system(size: 12)) 88 + .foregroundStyle(.secondary) 89 + .frame(maxWidth: .infinity, alignment: .center) 90 + .padding() 91 + } else { 92 + ScrollView { 93 + VStack(spacing: 2) { 94 + ForEach(others) { device in 95 + DeviceRow(device: device) { 96 + Task { 97 + await deviceState.connect(device) 98 + dismiss() 99 + } 100 + } 101 + } 102 + } 103 + .padding(.vertical, 6) 104 + .padding(.horizontal, 8) 105 + } 106 + .frame(maxHeight: 280) 107 + } 108 + } 109 + } 110 + .frame(width: 280) 111 + .task { await deviceState.refresh() } 112 + } 113 + } 114 + 115 + private struct DeviceRow: View { 116 + let device: DeviceInfo 117 + let onTap: () -> Void 118 + 119 + @State private var isHovering = false 120 + 121 + var body: some View { 122 + Button(action: onTap) { 123 + HStack(spacing: 10) { 124 + ZStack { 125 + RoundedRectangle(cornerRadius: 6) 126 + .fill(deviceColor(device).opacity(0.12)) 127 + .frame(width: 30, height: 30) 128 + Image(systemName: deviceSymbol(device)) 129 + .font(.system(size: 14)) 130 + .foregroundStyle(deviceColor(device)) 131 + } 132 + 133 + Text(device.name) 134 + .font(.system(size: 13)) 135 + .lineLimit(1) 136 + .frame(maxWidth: .infinity, alignment: .leading) 137 + 138 + if device.isCurrentDevice { 139 + Image(systemName: "checkmark") 140 + .font(.system(size: 11, weight: .semibold)) 141 + .foregroundStyle(Color(hex: "28fce3")) 142 + } 143 + } 144 + .padding(.horizontal, 8) 145 + .padding(.vertical, 6) 146 + .background( 147 + RoundedRectangle(cornerRadius: 6) 148 + .fill(isHovering ? Color.secondary.opacity(0.1) : Color.clear) 149 + ) 150 + .contentShape(RoundedRectangle(cornerRadius: 6)) 151 + } 152 + .buttonStyle(.plain) 153 + .onHover { isHovering = $0 } 154 + } 155 + }
+60 -20
macos/Rockbox/Views/Components/PlayerControlsView.swift
··· 10 10 struct PlayerControlsView: View { 11 11 @EnvironmentObject var player: PlayerState 12 12 @EnvironmentObject var navigation: NavigationManager 13 + @EnvironmentObject var deviceState: DeviceState 13 14 @State private var isHoveringProgress = false 14 15 @State private var isHoveringTrackInfo = false 15 16 @State private var isHoveringQueue = false 17 + @State private var isHoveringDevice = false 16 18 @State private var isHoveringMenu = false 17 19 @State private var isHoveringShuffle = false 18 20 @State private var isHoveringRepeat = false 21 + @State private var showDevicePicker = false 19 22 @State private var errorText: String? = nil 20 23 @ObservedObject var library: MusicLibrary 21 - @Binding var showQueue: Bool // Add this binding 24 + @Binding var showQueue: Bool 22 25 23 26 24 27 var body: some View { ··· 231 234 } 232 235 } 233 236 234 - Button(action: { 235 - withAnimation(.easeInOut(duration: 0.2)) { 236 - showQueue.toggle() 237 + HStack(spacing: 6) { 238 + // Device picker button 239 + Button(action: { showDevicePicker.toggle() }) { 240 + let symbol = deviceState.currentDevice.map { d in 241 + switch d.service { 242 + case "builtin": return "macmini" 243 + case "fifo": return "antenna.radiowaves.left.and.right" 244 + case "squeezelite": return "hifispeaker" 245 + case "airplay": return "airplayvideo" 246 + case "chromecast": return "tv.and.mediabox" 247 + case "upnp": return "network" 248 + default: return "hifispeaker" 249 + } 250 + } ?? "hifispeaker" 251 + Image(systemName: symbol) 252 + .font(.system(size: 14)) 253 + .foregroundStyle(showDevicePicker ? Color(hex: "fe09a3") : (isHoveringDevice ? .primary : .secondary)) 254 + .frame(width: 32, height: 32) 255 + .background( 256 + RoundedRectangle(cornerRadius: 6) 257 + .fill(isHoveringDevice || showDevicePicker ? Color.secondary.opacity(0.15) : Color.clear) 258 + ) 259 + .contentShape(Rectangle()) 260 + } 261 + .buttonStyle(.plain) 262 + .onHover { hovering in 263 + withAnimation(.easeInOut(duration: 0.1)) { 264 + isHoveringDevice = hovering 265 + } 266 + } 267 + .popover(isPresented: $showDevicePicker, arrowEdge: .top) { 268 + DeviceListView() 269 + .environmentObject(deviceState) 270 + } 271 + 272 + // Queue button 273 + Button(action: { 274 + withAnimation(.easeInOut(duration: 0.2)) { 275 + showQueue.toggle() 276 + } 277 + }) { 278 + Image(systemName: "list.bullet") 279 + .font(.system(size: 14)) 280 + .foregroundStyle(showQueue ? .primary : .secondary) 281 + .frame(width: 32, height: 32) 282 + .background( 283 + RoundedRectangle(cornerRadius: 6) 284 + .fill(isHoveringQueue || showQueue ? Color.secondary.opacity(0.15) : Color.clear) 285 + ) 286 + .contentShape(Rectangle()) 237 287 } 238 - }) { 239 - Image(systemName: "list.bullet") 240 - .font(.system(size: 14)) 241 - .foregroundStyle(showQueue ? .primary : .secondary) 242 - .frame(width: 32, height: 32) 243 - .background( 244 - RoundedRectangle(cornerRadius: 6) 245 - .fill(isHoveringQueue || showQueue ? Color.secondary.opacity(0.15) : Color.clear) 246 - ) 247 - .contentShape(Rectangle()) 248 - } 249 - .buttonStyle(.plain) 250 - .onHover { hovering in 251 - withAnimation(.easeInOut(duration: 0.1)) { 252 - isHoveringQueue = hovering 288 + .buttonStyle(.plain) 289 + .onHover { hovering in 290 + withAnimation(.easeInOut(duration: 0.1)) { 291 + isHoveringQueue = hovering 292 + } 253 293 } 254 294 } 255 - .frame(width: 60) 295 + .frame(width: 80) 256 296 } 257 297 .padding(.horizontal, 16) 258 298 .padding(.vertical, 10)
+86 -33
webui/rockbox/src/Components/ControlBar/DeviceList/DeviceList.tsx
··· 2 2 import styled from "@emotion/styled"; 3 3 import { ListItem, ListItemLabel } from "baseui/list"; 4 4 import { FC } from "react"; 5 - import { MusicPlayer } from "@styled-icons/bootstrap"; 6 5 import { Laptop } from "@styled-icons/ionicons-outline"; 7 6 import { Kodi, Airplayaudio, Chromecast } from "@styled-icons/simple-icons"; 8 7 import { Speaker } from "@styled-icons/remix-fill"; 8 + import { Radio, HardDrive, Cast } from "@styled-icons/feather"; 9 9 import { 10 10 Container, 11 11 CurrentDevice, ··· 22 22 export type Device = { 23 23 id: string; 24 24 name: string; 25 + /** Maps to the `app` field from the server (e.g. "builtin", "fifo", "squeezelite", 26 + * "AirPlay", "Chromecast", "UPnP/DLNA", "xbmc") */ 25 27 type: string; 26 28 isConnected: boolean; 29 + isCurrentDevice: boolean; 27 30 }; 28 31 29 32 export type ArtworkProps = { ··· 31 34 color?: string; 32 35 }; 33 36 34 - const Artwork: FC<ArtworkProps> = ( 35 - { icon, color } = { 36 - icon: "music-player", 37 - } 38 - ) => { 37 + const iconColors: Record<string, string> = { 38 + builtin: "#28fce3", 39 + fifo: "#9090ff", 40 + squeezelite: "#ffa028", 41 + xbmc: "#28cbfc", 42 + AirPlay: "#ff00c3", 43 + airplay: "#ff00c3", 44 + Chromecast: "#28cbfc", 45 + chromecast: "#28cbfc", 46 + "UPnP/DLNA": "#ff00c3", 47 + dlna: "#ff00c3", 48 + }; 49 + 50 + const bgColors: Record<string, string> = { 51 + builtin: "rgba(40, 252, 227, 0.09)", 52 + fifo: "rgba(144, 144, 255, 0.10)", 53 + squeezelite: "rgba(255, 160, 40, 0.10)", 54 + xbmc: "rgba(40, 203, 252, 0.08)", 55 + AirPlay: "rgba(255, 0, 195, 0.06)", 56 + airplay: "rgba(255, 0, 195, 0.06)", 57 + Chromecast: "rgba(40, 203, 252, 0.08)", 58 + chromecast: "rgba(40, 203, 252, 0.08)", 59 + "UPnP/DLNA": "rgba(255, 0, 195, 0.06)", 60 + dlna: "rgba(255, 0, 195, 0.06)", 61 + }; 62 + 63 + const Artwork: FC<ArtworkProps> = ({ icon, color }) => { 39 64 const theme = useTheme(); 65 + const c = iconColors[icon ?? ""] ?? theme.colors.text; 40 66 return ( 41 67 <Icon color={color}> 42 - {icon === "music-player" && <MusicPlayer size={18} color="#28fce3" />} 43 - {icon === "xbmc" && <Kodi size={18} color="#28cbfc" />} 44 - {icon === "airplay" && <Airplayaudio size={18} color={"#ff00c3"} />} 45 - {icon === "chromecast" && ( 46 - <Chromecast size={18} color={theme.colors.text} /> 68 + {icon === "builtin" && <HardDrive size={18} color={c} />} 69 + {icon === "fifo" && <Radio size={18} color={c} />} 70 + {icon === "squeezelite" && <Cast size={18} color={c} />} 71 + {icon === "xbmc" && <Kodi size={18} color={c} />} 72 + {(icon === "AirPlay" || icon === "airplay") && ( 73 + <Airplayaudio size={18} color={c} /> 47 74 )} 48 - {icon === "dlna" && <Speaker size={18} color={"#ff00c3"} />} 75 + {(icon === "Chromecast" || icon === "chromecast") && ( 76 + <Chromecast size={18} color={c} /> 77 + )} 78 + {(icon === "UPnP/DLNA" || icon === "dlna") && ( 79 + <Speaker size={18} color={c} /> 80 + )} 49 81 </Icon> 50 82 ); 51 83 }; 52 84 53 85 const DeviceName = styled.div` 54 86 font-size: 14px; 55 - color: "#fe099c"; 87 + `; 88 + 89 + const ActiveDot = styled.div` 90 + width: 7px; 91 + height: 7px; 92 + border-radius: 50%; 93 + background-color: #28fce3; 94 + flex-shrink: 0; 95 + margin-right: 8px; 56 96 `; 57 97 58 98 export type DeviceListProps = { ··· 73 113 loading, 74 114 }) => { 75 115 const theme = useTheme(); 76 - const colors: { 77 - [key: string]: string; 78 - } = { 79 - "music-player": "rgba(40, 252, 227, 0.088)", 80 - xbmc: "rgba(40, 203, 252, 0.082)", 81 - airplay: "rgba(255, 0, 195, 0.063)", 82 - dlna: "rgba(255, 0, 195, 0.063)", 83 - }; 84 116 85 117 const _onConnectToCastDevice = (deviceId: string) => { 86 118 connectToCastDevice(deviceId); ··· 92 124 close(); 93 125 }; 94 126 127 + // The active device is either what DeviceState tracks or derived from the list. 128 + const activeDevice = 129 + currentCastDevice ?? 130 + castDevices.find((d) => d.isCurrentDevice) ?? 131 + null; 132 + 133 + // Show all other devices in the list. 134 + const otherDevices = castDevices.filter((d) => !d.isCurrentDevice); 135 + 95 136 return ( 96 137 <Container> 138 + {/* Current device header */} 97 139 <CurrentDeviceWrapper> 98 140 <IconWrapper> 99 - <Laptop size={30} color={"#fe099c"} /> 141 + {activeDevice ? ( 142 + <Artwork 143 + icon={activeDevice.type} 144 + color={bgColors[activeDevice.type]} 145 + /> 146 + ) : ( 147 + <Laptop size={30} color="#fe099c" /> 148 + )} 100 149 </IconWrapper> 101 150 <div style={{ flex: 1 }}> 102 151 <CurrentDevice>Current device</CurrentDevice> 103 152 <CurrentDeviceName> 104 - {currentCastDevice ? currentCastDevice.name : "Rockbox"} 153 + {activeDevice ? activeDevice.name : "Rockbox (Built-in)"} 105 154 </CurrentDeviceName> 106 155 </div> 107 156 {currentCastDevice && ( ··· 110 159 </Disconnect> 111 160 )} 112 161 </CurrentDeviceWrapper> 113 - {!loading && <Title>Select another output device</Title>} 162 + 163 + {!loading && otherDevices.length > 0 && ( 164 + <Title>Switch output device</Title> 165 + )} 166 + 114 167 <List> 115 - {castDevices.length === 0 && !loading && ( 168 + {otherDevices.length === 0 && !loading && ( 116 169 <Placeholder> 117 - No devices found. Please make sure your device is connected to the 118 - same network as this device. 170 + No other devices found. Make sure your devices are on the same 171 + network. 119 172 </Placeholder> 120 173 )} 121 - {castDevices.map((device) => ( 174 + {otherDevices.map((device) => ( 122 175 <div 123 176 key={device.id} 124 177 onClick={() => _onConnectToCastDevice(device.id)} 125 178 > 126 179 <ListItem 127 - key={device.id} 128 180 artwork={() => ( 129 - <Artwork icon={device.type} color={colors[device.type]} /> 181 + <Artwork icon={device.type} color={bgColors[device.type]} /> 130 182 )} 183 + endEnhancer={() => 184 + device.isCurrentDevice ? <ActiveDot /> : null 185 + } 131 186 overrides={{ 132 187 Root: { 133 188 style: { ··· 139 194 }, 140 195 }, 141 196 Content: { 142 - style: { 143 - borderBottom: "none", 144 - }, 197 + style: { borderBottom: "none" }, 145 198 }, 146 199 }} 147 200 >
+7 -2
webui/rockbox/src/Components/ControlBar/DeviceList/DeviceListWithData.tsx
··· 17 17 const DeviceListWithData: FC<DeviceListWithDataProps> = ({ close }) => { 18 18 const [, setControlBarState] = useRecoilState(controlBarState); 19 19 const [device, setDeviceState] = useRecoilState(deviceState); 20 - const { data: currentDevice } = useGetDeviceQuery({ 20 + const { data: currentDevice, refetch: refetchCurrentDevice } = useGetDeviceQuery({ 21 21 variables: { id: "current" }, 22 22 fetchPolicy: "network-only", 23 23 }); 24 - const { data, loading } = useGetDevicesQuery(); 24 + const { data, loading, refetch: refetchDevices } = useGetDevicesQuery({ 25 + fetchPolicy: "network-only", 26 + }); 25 27 const [connect] = useConnectToDeviceMutation(); 26 28 const [disconnect] = useDisconnectFromDeviceMutation(); 27 29 const devices = useMemo(() => { ··· 33 35 name: x.name, 34 36 type: x.app, 35 37 isConnected: x.isConnected, 38 + isCurrentDevice: x.isCurrentDevice ?? false, 36 39 })); 37 40 }, [data, loading]); 38 41 ··· 50 53 name: currentDevice.device.name || "", 51 54 type: currentDevice.device.app || "", 52 55 isConnected: currentDevice.device.isConnected || false, 56 + isCurrentDevice: currentDevice.device.isCurrentDevice ?? true, 53 57 }, 54 58 }); 55 59 } ··· 58 62 59 63 const connectToCastDevice = async (id: string) => { 60 64 await connect({ variables: { id } }); 65 + await Promise.all([refetchCurrentDevice(), refetchDevices()]); 61 66 setControlBarState((state) => ({ 62 67 ...state, 63 68 nowPlaying: undefined,
+2
webui/rockbox/src/GraphQL/Device/Query.ts
··· 12 12 isCastDevice 13 13 service 14 14 isConnected 15 + isCurrentDevice 15 16 } 16 17 } 17 18 `; ··· 28 29 isCastDevice 29 30 service 30 31 isConnected 32 + isCurrentDevice 31 33 } 32 34 } 33 35 `;
+4 -2
webui/rockbox/src/Hooks/GraphQL.tsx
··· 691 691 export type GetDevicesQueryVariables = Exact<{ [key: string]: never; }>; 692 692 693 693 694 - export type GetDevicesQuery = { __typename?: 'Query', devices: Array<{ __typename?: 'Device', id: string, name: string, app: string, ip: string, host: string, port: number, isCastDevice: boolean, service: string, isConnected: boolean }> }; 694 + export type GetDevicesQuery = { __typename?: 'Query', devices: Array<{ __typename?: 'Device', id: string, name: string, app: string, ip: string, host: string, port: number, isCastDevice: boolean, service: string, isConnected: boolean, isCurrentDevice: boolean }> }; 695 695 696 696 export type GetDeviceQueryVariables = Exact<{ 697 697 id: Scalars['String']['input']; 698 698 }>; 699 699 700 700 701 - export type GetDeviceQuery = { __typename?: 'Query', device?: { __typename?: 'Device', id: string, name: string, app: string, ip: string, host: string, port: number, isCastDevice: boolean, service: string, isConnected: boolean } | null }; 701 + export type GetDeviceQuery = { __typename?: 'Query', device?: { __typename?: 'Device', id: string, name: string, app: string, ip: string, host: string, port: number, isCastDevice: boolean, service: string, isConnected: boolean, isCurrentDevice: boolean } | null }; 702 702 703 703 export type LikeTrackMutationVariables = Exact<{ 704 704 trackId: Scalars['String']['input']; ··· 1094 1094 isCastDevice 1095 1095 service 1096 1096 isConnected 1097 + isCurrentDevice 1097 1098 } 1098 1099 } 1099 1100 `; ··· 1141 1142 isCastDevice 1142 1143 service 1143 1144 isConnected 1145 + isCurrentDevice 1144 1146 } 1145 1147 } 1146 1148 `;
+1 -1
webui/rockbox/tsconfig.app.tsbuildinfo
··· 1 - {"root":["./src/app.tsx","./src/theme.ts","./src/constants.ts","./src/emotion.d.ts","./src/main.tsx","./src/mocks.ts","./src/vite-env.d.ts","./src/components/album/album.stories.tsx","./src/components/album/album.test.tsx","./src/components/album/album.tsx","./src/components/album/albumwithdata.tsx","./src/components/album/index.tsx","./src/components/album/styles.tsx","./src/components/album/contextmenu/childmenu.tsx","./src/components/album/contextmenu/contextmenu.stories.tsx","./src/components/album/contextmenu/contextmenu.test.tsx","./src/components/album/contextmenu/contextmenu.tsx","./src/components/album/contextmenu/contextmenuwithdata.tsx","./src/components/album/contextmenu/index.tsx","./src/components/album/contextmenu/styles.tsx","./src/components/albumdetails/albumdetails.stories.tsx","./src/components/albumdetails/albumdetails.test.tsx","./src/components/albumdetails/albumdetails.tsx","./src/components/albumdetails/albumdetailswithdata.tsx","./src/components/albumdetails/index.tsx","./src/components/albumdetails/mocks.tsx","./src/components/albumdetails/styles.tsx","./src/components/albums/albums.stories.tsx","./src/components/albums/albums.test.tsx","./src/components/albums/albums.tsx","./src/components/albums/albumswithdata.tsx","./src/components/albums/index.tsx","./src/components/albums/mocks.tsx","./src/components/albums/styles.tsx","./src/components/artistdetails/artistdetails.stories.tsx","./src/components/artistdetails/artistdetails.test.tsx","./src/components/artistdetails/artistdetails.tsx","./src/components/artistdetails/artistdetailswithdata.tsx","./src/components/artistdetails/index.tsx","./src/components/artistdetails/mocks.tsx","./src/components/artistdetails/styles.tsx","./src/components/artists/artists.stories.tsx","./src/components/artists/artists.test.tsx","./src/components/artists/artists.tsx","./src/components/artists/artistswithdata.tsx","./src/components/artists/index.tsx","./src/components/artists/mocks.tsx","./src/components/artists/styles.tsx","./src/components/button/button.test.tsx","./src/components/button/button.tsx","./src/components/button/index.tsx","./src/components/contextmenu/childmenu.tsx","./src/components/contextmenu/contextmenu.stories.tsx","./src/components/contextmenu/contextmenu.test.tsx","./src/components/contextmenu/contextmenu.tsx","./src/components/contextmenu/contextmenuwithdata.tsx","./src/components/contextmenu/index.tsx","./src/components/contextmenu/styles.tsx","./src/components/controlbar/controlbar.stories.tsx","./src/components/controlbar/controlbar.test.tsx","./src/components/controlbar/controlbar.tsx","./src/components/controlbar/controlbarstate.tsx","./src/components/controlbar/controlbarwithdata.tsx","./src/components/controlbar/index.tsx","./src/components/controlbar/styles.tsx","./src/components/controlbar/currenttrack/currenttrack.tsx","./src/components/controlbar/currenttrack/index.tsx","./src/components/controlbar/currenttrack/styles.ts","./src/components/controlbar/devicelist/devicelist.tsx","./src/components/controlbar/devicelist/devicelistwithdata.tsx","./src/components/controlbar/devicelist/devicestate.tsx","./src/components/controlbar/devicelist/index.tsx","./src/components/controlbar/devicelist/styles.ts","./src/components/controlbar/playqueue/playqueue.stories.tsx","./src/components/controlbar/playqueue/playqueue.test.tsx","./src/components/controlbar/playqueue/playqueue.tsx","./src/components/controlbar/playqueue/playqueuewithdata.tsx","./src/components/controlbar/playqueue/index.tsx","./src/components/controlbar/playqueue/mocks.tsx","./src/components/controlbar/playqueue/styles.tsx","./src/components/controlbar/rightmenu/rightmenu.tsx","./src/components/controlbar/rightmenu/index.tsx","./src/components/controlbar/rightmenu/styles.tsx","./src/components/controlbar/rightmenu/volume/volume.stories.tsx","./src/components/controlbar/rightmenu/volume/volume.test.tsx","./src/components/controlbar/rightmenu/volume/volume.tsx","./src/components/controlbar/rightmenu/volume/volumewithdata.tsx","./src/components/controlbar/rightmenu/volume/index.tsx","./src/components/controlbar/rightmenu/volume/styles.tsx","./src/components/extensions/extensions.stories.tsx","./src/components/extensions/extensions.tsx","./src/components/extensions/index.tsx","./src/components/files/files.stories.tsx","./src/components/files/files.test.tsx","./src/components/files/files.tsx","./src/components/files/fileswithdata.tsx","./src/components/files/index.tsx","./src/components/files/mocks.tsx","./src/components/files/styles.tsx","./src/components/files/contextmenu/childmenu.tsx","./src/components/files/contextmenu/contextmenu.stories.tsx","./src/components/files/contextmenu/contextmenu.test.tsx","./src/components/files/contextmenu/contextmenu.tsx","./src/components/files/contextmenu/contextmenuwithdata.tsx","./src/components/files/contextmenu/index.tsx","./src/components/files/contextmenu/styles.tsx","./src/components/filter/filter.test.tsx","./src/components/filter/filter.tsx","./src/components/filter/filterstate.tsx","./src/components/filter/filterwithdata.tsx","./src/components/filter/index.tsx","./src/components/folder/folder.stories.tsx","./src/components/folder/folder.tsx","./src/components/folder/index.tsx","./src/components/icons/add.tsx","./src/components/icons/albumcover.tsx","./src/components/icons/arrowback.tsx","./src/components/icons/artist.tsx","./src/components/icons/heart.tsx","./src/components/icons/heartoutline.tsx","./src/components/icons/next.tsx","./src/components/icons/pause.tsx","./src/components/icons/play.tsx","./src/components/icons/previous.tsx","./src/components/icons/repeat.tsx","./src/components/icons/search.tsx","./src/components/icons/shuffle.tsx","./src/components/icons/speaker.tsx","./src/components/icons/track.tsx","./src/components/likes/likes.tsx","./src/components/likes/likesstate.ts","./src/components/likes/likeswithdata.tsx","./src/components/likes/index.tsx","./src/components/likes/styles.tsx","./src/components/mainview/mainview.tsx","./src/components/mainview/mainviewwithdata.tsx","./src/components/mainview/index.tsx","./src/components/mainview/styles.tsx","./src/components/playlistdetails/playlistdetails.stories.tsx","./src/components/playlistdetails/playlistdetails.tsx","./src/components/playlistdetails/index.tsx","./src/components/playlists/playlists.stories.tsx","./src/components/playlists/playlists.tsx","./src/components/playlists/index.tsx","./src/components/settings/settings.tsx","./src/components/settings/settingsstate.ts","./src/components/settings/settingswithdata.tsx","./src/components/settings/index.tsx","./src/components/settings/styles.tsx","./src/components/settings/library/library.tsx","./src/components/settings/library/librarywithdata.tsx","./src/components/settings/library/index.tsx","./src/components/settings/library/styles.tsx","./src/components/settings/playback/playback.tsx","./src/components/settings/playback/playbackwithdata.tsx","./src/components/settings/playback/consts.ts","./src/components/settings/playback/index.tsx","./src/components/settings/playback/styles.tsx","./src/components/settings/sound/sound.tsx","./src/components/settings/sound/soundwithdata.tsx","./src/components/settings/sound/index.tsx","./src/components/settings/sound/styles.tsx","./src/components/settings/sound/equalizer/equalizer.tsx","./src/components/settings/sound/equalizer/equalizerwithdata.tsx","./src/components/settings/sound/equalizer/index.tsx","./src/components/settings/sound/equalizer/styles.tsx","./src/components/sidebar/sidebar.test.tsx","./src/components/sidebar/sidebar.tsx","./src/components/sidebar/sidebarwithdata.tsx","./src/components/sidebar/stidebar.stories.tsx","./src/components/sidebar/index.tsx","./src/components/sidebar/styles.tsx","./src/components/switch/switch.tsx","./src/components/switch/index.tsx","./src/components/table/table.tsx","./src/components/table/index.tsx","./src/components/tracks/tracks.stories.tsx","./src/components/tracks/tracks.test.tsx","./src/components/tracks/tracks.tsx","./src/components/tracks/trackswithdata.tsx","./src/components/tracks/index.tsx","./src/components/tracks/mocks.tsx","./src/components/tracks/styles.tsx","./src/components/virtualizedtable/virtualizedtable.tsx","./src/components/virtualizedtable/index.tsx","./src/containers/albumdetails/albumdetailspage.tsx","./src/containers/albumdetails/index.tsx","./src/containers/albums/albumspage.tsx","./src/containers/albums/index.tsx","./src/containers/artistdetails/artistdetailspage.tsx","./src/containers/artistdetails/index.tsx","./src/containers/artists/artistspage.tsx","./src/containers/artists/index.tsx","./src/containers/extensions/extensionspage.tsx","./src/containers/extensions/index.tsx","./src/containers/files/filespage.tsx","./src/containers/files/index.tsx","./src/containers/likes/likespage.tsx","./src/containers/likes/index.tsx","./src/containers/playlists/playlistspage.tsx","./src/containers/playlists/index.tsx","./src/containers/settings/settingspage.tsx","./src/containers/settings/index.tsx","./src/containers/tracks/trackspage.tsx","./src/containers/tracks/index.tsx","./src/graphql/browse/query.ts","./src/graphql/device/mutation.ts","./src/graphql/device/query.ts","./src/graphql/library/mutation.ts","./src/graphql/library/query.ts","./src/graphql/playback/mutation.ts","./src/graphql/playback/query.ts","./src/graphql/playback/subscription.ts","./src/graphql/playlist/mutation.ts","./src/graphql/playlist/query.ts","./src/graphql/playlist/subscription.ts","./src/graphql/settings/mutation.ts","./src/graphql/settings/query.ts","./src/graphql/sound/mutation.tsx","./src/graphql/system/query.ts","./src/hooks/graphql.tsx","./src/hooks/useformat.tsx","./src/hooks/useplayqueue.tsx","./src/hooks/useresumeplaylist.tsx","./src/hooks/usesettings.tsx","./src/providers/graphqlprovider.tsx","./src/providers/themeprovider.tsx","./src/providers/index.tsx","./src/types/file.ts","./src/types/playlist.ts","./src/types/track.ts","./src/stories/button.stories.ts","./src/stories/button.tsx","./src/stories/header.stories.ts","./src/stories/header.tsx","./src/stories/page.stories.ts","./src/stories/page.tsx"],"version":"5.6.3"} 1 + {"root":["./src/app.tsx","./src/theme.ts","./src/constants.ts","./src/emotion.d.ts","./src/main.tsx","./src/mocks.ts","./src/vite-env.d.ts","./src/components/album/album.stories.tsx","./src/components/album/album.test.tsx","./src/components/album/album.tsx","./src/components/album/albumwithdata.tsx","./src/components/album/index.tsx","./src/components/album/styles.tsx","./src/components/album/contextmenu/childmenu.tsx","./src/components/album/contextmenu/contextmenu.stories.tsx","./src/components/album/contextmenu/contextmenu.test.tsx","./src/components/album/contextmenu/contextmenu.tsx","./src/components/album/contextmenu/contextmenuwithdata.tsx","./src/components/album/contextmenu/index.tsx","./src/components/album/contextmenu/styles.tsx","./src/components/albumdetails/albumdetails.stories.tsx","./src/components/albumdetails/albumdetails.test.tsx","./src/components/albumdetails/albumdetails.tsx","./src/components/albumdetails/albumdetailswithdata.tsx","./src/components/albumdetails/index.tsx","./src/components/albumdetails/mocks.tsx","./src/components/albumdetails/styles.tsx","./src/components/albums/albums.stories.tsx","./src/components/albums/albums.test.tsx","./src/components/albums/albums.tsx","./src/components/albums/albumswithdata.tsx","./src/components/albums/index.tsx","./src/components/albums/mocks.tsx","./src/components/albums/styles.tsx","./src/components/artistdetails/artistdetails.stories.tsx","./src/components/artistdetails/artistdetails.test.tsx","./src/components/artistdetails/artistdetails.tsx","./src/components/artistdetails/artistdetailswithdata.tsx","./src/components/artistdetails/index.tsx","./src/components/artistdetails/mocks.tsx","./src/components/artistdetails/styles.tsx","./src/components/artists/artists.stories.tsx","./src/components/artists/artists.test.tsx","./src/components/artists/artists.tsx","./src/components/artists/artistswithdata.tsx","./src/components/artists/index.tsx","./src/components/artists/mocks.tsx","./src/components/artists/styles.tsx","./src/components/button/button.test.tsx","./src/components/button/button.tsx","./src/components/button/index.tsx","./src/components/contextmenu/childmenu.tsx","./src/components/contextmenu/contextmenu.stories.tsx","./src/components/contextmenu/contextmenu.test.tsx","./src/components/contextmenu/contextmenu.tsx","./src/components/contextmenu/contextmenuwithdata.tsx","./src/components/contextmenu/index.tsx","./src/components/contextmenu/styles.tsx","./src/components/controlbar/controlbar.stories.tsx","./src/components/controlbar/controlbar.test.tsx","./src/components/controlbar/controlbar.tsx","./src/components/controlbar/controlbarstate.tsx","./src/components/controlbar/controlbarwithdata.tsx","./src/components/controlbar/index.tsx","./src/components/controlbar/styles.tsx","./src/components/controlbar/currenttrack/currenttrack.tsx","./src/components/controlbar/currenttrack/index.tsx","./src/components/controlbar/currenttrack/styles.ts","./src/components/controlbar/devicelist/devicelist.tsx","./src/components/controlbar/devicelist/devicelistwithdata.tsx","./src/components/controlbar/devicelist/devicestate.tsx","./src/components/controlbar/devicelist/index.tsx","./src/components/controlbar/devicelist/styles.ts","./src/components/controlbar/playqueue/playqueue.stories.tsx","./src/components/controlbar/playqueue/playqueue.test.tsx","./src/components/controlbar/playqueue/playqueue.tsx","./src/components/controlbar/playqueue/playqueuewithdata.tsx","./src/components/controlbar/playqueue/index.tsx","./src/components/controlbar/playqueue/mocks.tsx","./src/components/controlbar/playqueue/styles.tsx","./src/components/controlbar/rightmenu/rightmenu.tsx","./src/components/controlbar/rightmenu/index.tsx","./src/components/controlbar/rightmenu/styles.tsx","./src/components/controlbar/rightmenu/volume/volume.stories.tsx","./src/components/controlbar/rightmenu/volume/volume.test.tsx","./src/components/controlbar/rightmenu/volume/volume.tsx","./src/components/controlbar/rightmenu/volume/volumewithdata.tsx","./src/components/controlbar/rightmenu/volume/index.tsx","./src/components/controlbar/rightmenu/volume/styles.tsx","./src/components/extensions/extensions.stories.tsx","./src/components/extensions/extensions.tsx","./src/components/extensions/index.tsx","./src/components/files/files.stories.tsx","./src/components/files/files.test.tsx","./src/components/files/files.tsx","./src/components/files/fileswithdata.tsx","./src/components/files/index.tsx","./src/components/files/mocks.tsx","./src/components/files/styles.tsx","./src/components/files/contextmenu/childmenu.tsx","./src/components/files/contextmenu/contextmenu.stories.tsx","./src/components/files/contextmenu/contextmenu.test.tsx","./src/components/files/contextmenu/contextmenu.tsx","./src/components/files/contextmenu/contextmenuwithdata.tsx","./src/components/files/contextmenu/index.tsx","./src/components/files/contextmenu/styles.tsx","./src/components/filter/filter.test.tsx","./src/components/filter/filter.tsx","./src/components/filter/filterstate.tsx","./src/components/filter/filterwithdata.tsx","./src/components/filter/index.tsx","./src/components/folder/folder.stories.tsx","./src/components/folder/folder.tsx","./src/components/folder/index.tsx","./src/components/icons/add.tsx","./src/components/icons/albumcover.tsx","./src/components/icons/arrowback.tsx","./src/components/icons/artist.tsx","./src/components/icons/heart.tsx","./src/components/icons/heartoutline.tsx","./src/components/icons/next.tsx","./src/components/icons/pause.tsx","./src/components/icons/play.tsx","./src/components/icons/previous.tsx","./src/components/icons/repeat.tsx","./src/components/icons/search.tsx","./src/components/icons/shuffle.tsx","./src/components/icons/speaker.tsx","./src/components/icons/track.tsx","./src/components/likes/likes.tsx","./src/components/likes/likesstate.ts","./src/components/likes/likeswithdata.tsx","./src/components/likes/index.tsx","./src/components/likes/styles.tsx","./src/components/mainview/mainview.tsx","./src/components/mainview/mainviewwithdata.tsx","./src/components/mainview/index.tsx","./src/components/mainview/styles.tsx","./src/components/playlistdetails/playlistdetails.stories.tsx","./src/components/playlistdetails/playlistdetails.tsx","./src/components/playlistdetails/index.tsx","./src/components/playlists/playlists.stories.tsx","./src/components/playlists/playlists.tsx","./src/components/playlists/index.tsx","./src/components/settings/settings.tsx","./src/components/settings/settingsstate.ts","./src/components/settings/settingswithdata.tsx","./src/components/settings/index.tsx","./src/components/settings/styles.tsx","./src/components/settings/library/library.tsx","./src/components/settings/library/librarywithdata.tsx","./src/components/settings/library/index.tsx","./src/components/settings/library/styles.tsx","./src/components/settings/playback/playback.tsx","./src/components/settings/playback/playbackwithdata.tsx","./src/components/settings/playback/consts.ts","./src/components/settings/playback/index.tsx","./src/components/settings/playback/styles.tsx","./src/components/settings/sound/sound.tsx","./src/components/settings/sound/soundwithdata.tsx","./src/components/settings/sound/index.tsx","./src/components/settings/sound/styles.tsx","./src/components/settings/sound/equalizer/equalizer.tsx","./src/components/settings/sound/equalizer/equalizerwithdata.tsx","./src/components/settings/sound/equalizer/index.tsx","./src/components/settings/sound/equalizer/styles.tsx","./src/components/sidebar/sidebar.test.tsx","./src/components/sidebar/sidebar.tsx","./src/components/sidebar/sidebarwithdata.tsx","./src/components/sidebar/stidebar.stories.tsx","./src/components/sidebar/index.tsx","./src/components/sidebar/styles.tsx","./src/components/switch/switch.tsx","./src/components/switch/index.tsx","./src/components/table/table.tsx","./src/components/table/index.tsx","./src/components/tracks/tracks.stories.tsx","./src/components/tracks/tracks.test.tsx","./src/components/tracks/tracks.tsx","./src/components/tracks/trackswithdata.tsx","./src/components/tracks/index.tsx","./src/components/tracks/mocks.tsx","./src/components/tracks/styles.tsx","./src/components/virtualizedtable/virtualizedtable.tsx","./src/components/virtualizedtable/index.tsx","./src/containers/albumdetails/albumdetailspage.tsx","./src/containers/albumdetails/index.tsx","./src/containers/albums/albumspage.tsx","./src/containers/albums/index.tsx","./src/containers/artistdetails/artistdetailspage.tsx","./src/containers/artistdetails/index.tsx","./src/containers/artists/artistspage.tsx","./src/containers/artists/index.tsx","./src/containers/extensions/extensionspage.tsx","./src/containers/extensions/index.tsx","./src/containers/files/filespage.tsx","./src/containers/files/index.tsx","./src/containers/likes/likespage.tsx","./src/containers/likes/index.tsx","./src/containers/playlists/playlistspage.tsx","./src/containers/playlists/index.tsx","./src/containers/settings/settingspage.tsx","./src/containers/settings/index.tsx","./src/containers/tracks/trackspage.tsx","./src/containers/tracks/index.tsx","./src/graphql/browse/query.ts","./src/graphql/device/mutation.ts","./src/graphql/device/query.ts","./src/graphql/library/mutation.ts","./src/graphql/library/query.ts","./src/graphql/playback/mutation.ts","./src/graphql/playback/query.ts","./src/graphql/playback/subscription.ts","./src/graphql/playlist/mutation.ts","./src/graphql/playlist/query.ts","./src/graphql/playlist/subscription.ts","./src/graphql/settings/mutation.ts","./src/graphql/settings/query.ts","./src/graphql/sound/mutation.tsx","./src/graphql/system/query.ts","./src/hooks/graphql.tsx","./src/hooks/useformat.tsx","./src/hooks/useplayqueue.tsx","./src/hooks/useresumeplaylist.tsx","./src/hooks/usesettings.tsx","./src/providers/graphqlprovider.tsx","./src/providers/themeprovider.tsx","./src/providers/index.tsx","./src/types/file.ts","./src/types/playlist.ts","./src/types/track.ts","./src/stories/button.stories.ts","./src/stories/button.tsx","./src/stories/header.stories.ts","./src/stories/header.tsx","./src/stories/page.stories.ts","./src/stories/page.tsx"],"version":"5.6.2"}
+1 -1
webui/rockbox/tsconfig.node.tsbuildinfo
··· 1 - {"root":["./vite.config.ts"],"version":"5.6.3"} 1 + {"root":["./vite.config.ts"],"version":"5.6.2"}