moonlight-qt
moonlight-qt copied to clipboard
Send WOL packet when seeking a computer.
This PR makes it so that Moonlight sends a WOL packet when starting to seek for a computer. The goal was to allow a command like moonlight stream <HOSTNAME> <APP>
to succeed, even if the host is asleep. Effectively, this PR fixes https://github.com/moonlight-stream/moonlight-qt/issues/1111.
I opted not to make the sending of the packet optional, since in my opinion there's no harm in sending it even if it's not required.
I opted not to make the sending of the packet optional, since in my opinion there's no harm in sending it even if it's not required.
Well, other than people who have more than one host will suddenly start seeing all their devices wake up the moment they open Moonlight.
A better option would be have it sent when tapping on the offline instead, but really up to cgutman either way.
Ahh I didn't know it was used there as well. Let me check that later and get back to you. One option is to add an argument that decides if WOL would be sent, which is true for the CLI and false otherwise. Thanks for the feedback.
I think I made the same mistake when reading this thinking it was ComputerManager rather than ComputerSeeker.
This codepath is indeed only used for the CLI case and it will only wake machines that match the name/UUID specified for this CLI operation, so this looks good.
Thank you so much for this PR! Been waiting for this for a while.