Skip to content

Conversation

fabienjuif
Copy link

Just a quick update to make it works at home.
Feel free to edit/discard.

@fabienjuif fabienjuif changed the title chore: bump librespot to 0.7 chore: bump librespot to 0.7.1 Sep 1, 2025
Copy link
Member

@eladyn eladyn left a 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;
Copy link
Member

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?

Comment on lines +275 to +282
PlayerEvent::RepeatChanged { context: _, track } => {
self.repeat = track.into();
insert_attr(
&mut changed,
"LoopStatus",
self.repeat.to_mpris().to_string(),
)
}
Copy link
Member

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 { .. } => (),
Copy link
Member

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");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left-over debug output.

Copy link
Member

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");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left-over

Comment on lines +184 to +187
let val = match track {
true => "all",
false => "none",
}
Copy link
Member

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!(),
Copy link
Member

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");
Copy link
Member

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"]
Copy link
Member

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,
Copy link
Member

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.

@fabienjuif
Copy link
Author

Hello @eladyn thank you for looking that up!
I am fine if you can modify what you want, as said in the PR topic you also can close the PR.

On my side I'll not have time to make it better, I am sorry.

@clxxiii
Copy link

clxxiii commented Oct 18, 2025

Somewhat new to open source here:
What's the best way for me to keep working on the hotfix branch while keeping the discussion on this PR? I'd love to help out getting this fixed where I can, and I have the time to be able to help out!
I can also just start on my own fork and open another PR if that makes more sense

@fabienjuif
Copy link
Author

Regarding me, feel free to open your own PR!
Thank you very much for the time you'll give to it 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants