-
Notifications
You must be signed in to change notification settings - Fork 482
chore: bump librespot to 0.7.1 #1362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the fixes! I added a lot of comments, but don't worry, I can just fix them myself, since I have ignored this PR for too long now. So these are more of a todo list before merging this PR.
self.volume = volume; | ||
insert_attr(&mut changed, "Volume", self.mpris_volume()); | ||
} | ||
self.volume = volume; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened to indentation here?
PlayerEvent::RepeatChanged { context: _, track } => { | ||
self.repeat = track.into(); | ||
insert_attr( | ||
&mut changed, | ||
"LoopStatus", | ||
self.repeat.to_mpris().to_string(), | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new context
field should also be communicated now, since it allows us to handle all three possible states of MPRIS.
| PlayerEvent::SessionConnected { .. } | ||
| PlayerEvent::SessionDisconnected { .. } | ||
| PlayerEvent::SessionClientChanged { .. } => (), | ||
| PlayerEvent::PositionChanged { .. } => (), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe PositionChanged
should be handled?
}); | ||
let local_spirc = spirc.clone(); | ||
b.method("PlayPause", (), (), move |_, _, (): ()| { | ||
warn!("PlayPause method called via mpris"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left-over debug output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, it might be good to add verbose logs, when MPRIS methods are called, just to make debugging easier.
}); | ||
let local_spirc = spirc.clone(); | ||
b.method("Play", (), (), move |_, _, (): ()| { | ||
warn!("Play method called via mpris"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left-over
let val = match track { | ||
true => "all", | ||
false => "none", | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as for MPRIS.
env.insert("PLAYER_EVENT", "filterexplicit_changed".to_string()); | ||
env.insert("FILTEREXPLICIT", filter.to_string()); | ||
} | ||
PlayerEvent::PositionChanged { play_request_id: _, track_id: _, position_ms: _ } => todo!(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo!()
_ => { | ||
info!("Using software volume controller."); | ||
Arc::new(mixer::softmixer::SoftMixer::open(MixerConfig::default())) | ||
let soft_mixer = mixer::softmixer::SoftMixer::open(MixerConfig::default()).expect("softmixer should initialize"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check that this will never panic.
alsa_backend = ["librespot-playback/alsa-backend", "dep:alsa"] | ||
dbus_mpris = ["dep:dbus", "dep:dbus-tokio", "dep:dbus-crossroads"] | ||
default = ["alsa_backend"] | ||
default = ["alsa_backend", "pulseaudio_backend", "dbus_mpris"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this change come from?
backend, | ||
initial_volume: config.initial_volume, | ||
has_volume_ctrl, | ||
disable_volume: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think, this is what we want. The previous flag will be ignored this way.
Hello @eladyn thank you for looking that up! On my side I'll not have time to make it better, I am sorry. |
Somewhat new to open source here: |
Regarding me, feel free to open your own PR! |
Just a quick update to make it works at home.
Feel free to edit/discard.