mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Fix formatting
This commit is contained in:
parent
689415a6f1
commit
b77f0a18ce
2 changed files with 6 additions and 3 deletions
|
@ -32,7 +32,7 @@ pub async fn connect(addr: String, proxy: &Option<Url>) -> io::Result<Transport>
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
io::Error::new(io::ErrorKind::InvalidInput, format!("Invalid port: {}", e))
|
io::Error::new(io::ErrorKind::InvalidInput, format!("Invalid port: {}", e))
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let host = split
|
let host = split
|
||||||
.next()
|
.next()
|
||||||
.ok_or_else(|| io::Error::new(io::ErrorKind::InvalidInput, "Missing port"))?;
|
.ok_or_else(|| io::Error::new(io::ErrorKind::InvalidInput, "Missing port"))?;
|
||||||
|
|
|
@ -329,7 +329,10 @@ impl Player {
|
||||||
pub async fn get_end_of_track_future(&self) {
|
pub async fn get_end_of_track_future(&self) {
|
||||||
let mut channel = self.get_player_event_channel();
|
let mut channel = self.get_player_event_channel();
|
||||||
while let Some(event) = channel.next().await {
|
while let Some(event) = channel.next().await {
|
||||||
if matches!(event, PlayerEvent::EndOfTrack { .. } | PlayerEvent::Stopped { .. }) {
|
if matches!(
|
||||||
|
event,
|
||||||
|
PlayerEvent::EndOfTrack { .. } | PlayerEvent::Stopped { .. }
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -701,7 +704,7 @@ impl PlayerTrackLoader {
|
||||||
// we need to seek -> we set stream mode after the initial seek.
|
// we need to seek -> we set stream mode after the initial seek.
|
||||||
stream_loader_controller.set_random_access_mode();
|
stream_loader_controller.set_random_access_mode();
|
||||||
}
|
}
|
||||||
|
|
||||||
let key = match self.session.audio_key().request(spotify_id, file_id).await {
|
let key = match self.session.audio_key().request(spotify_id, file_id).await {
|
||||||
Ok(key) => key,
|
Ok(key) => key,
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
|
|
Loading…
Reference in a new issue