moonlight-qt icon indicating copy to clipboard operation
moonlight-qt copied to clipboard

Send WOL packet when seeking a computer.

Open hgaiser opened this issue 11 months ago • 2 comments

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.

hgaiser avatar Mar 07 '24 22:03 hgaiser

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.

Nonary avatar Mar 08 '24 16:03 Nonary

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.

hgaiser avatar Mar 09 '24 07:03 hgaiser

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.

cgutman avatar May 01 '24 02:05 cgutman

Thank you so much for this PR! Been waiting for this for a while.

blackxored avatar May 01 '24 04:05 blackxored