Skip to content
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

[Feature] Turn computer off when all downloads have finished #3685

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

sassou5018
Copy link

@sassou5018 sassou5018 commented Apr 8, 2024

[Feature] Turn computer off when the download was finished ( closes
#3581)

  • Feature: Add option to shutdown machine after all downloads are finished
  • Requires app to be ran as sudo on linux and mac (Not solvable because that's how said OSs work, works fine on windows)

Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

added getter and setter IPC methods
added didReallyDownload boolean to validate if a download really happened
added automatic shutdown if queue is done, didReallyDownload is true and queue isIdle
Translation for switch label and for switch tooltip
@flavioislima
Copy link
Member

flavioislima commented Apr 8, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@sassou5018
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@JakobDev
Copy link
Contributor

Requires app to be ran as sudo on linux and mac

You could use this on Systemd based Distros. It works also inside a Flatpak.

Copy link
Member

@flavioislima flavioislima left a comment

Choose a reason for hiding this comment

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

Not sure if it is a good idea to run the app as Sudo. We should try to find other alternatives like JakobDev said above.

sassou5018 and others added 4 commits October 21, 2024 22:10
Co-authored-by: Ariel Juodziukynas <[email protected]>
Warning dialog allowing for cancellation
Updated and added translations for auto-shutdown in the languages I speak
@sassou5018
Copy link
Author

Requires app to be ran as sudo on linux and mac

You could use this on Systemd based Distros. It works also inside a Flatpak.

even these commands depend on specific OS configurations. honestly, without elevated privileges, it's almost impossible to know if any shutdown commands will work on Linux.
do you have any other suggestions ?

@sassou5018
Copy link
Author

So what do we do about linux ?

@flavioislima
Copy link
Member

So what do we do about linux ?

So, I think we should use the default on for the distros we support officially right now:

  • Flatpak, the most important since work on all distros.
  • Ubuntu (which I think others like Mint and pop should work fine)
  • Fedora
  • Garuda and Manjaro (impossible to support all Arch linux ofc)

It is impossible to support all distros imo so we should go with these ones.

@flavioislima
Copy link
Member

@sassou5018
alternatively, we could add a second parameter to pass the shutdown command. So then for more expert users it could suffice.

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.

4 participants