Opened 7 months ago

Closed 6 months ago

Last modified 5 months ago

#13431 closed Patch - Feature (Won't Fix)

Add Enable/Disable Auto Shutdown to System Menu

Reported by: Britney Fransen Owned by: Peter Bennett
Priority: minor Milestone: unknown
Component: MythTV - General Version: Unspecified
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The attached patch adds the ability to enable or disable auto shutdown from the System Menu. Items will not show if auto shutdown is disabled.

Attachments (1)

addEnableDisableAutoShutdownToSystemMenu.patch (1.9 KB) - added by Britney Fransen 7 months ago.

Download all attachments as: .zip

Change History (8)

Changed 7 months ago by Britney Fransen

comment:1 Changed 7 months ago by gigem

Status: newinfoneeded_new

I asked some other developers about this change and we're unclear on its usefulness. Can you please explain the use case for this and why you think it's desirable?

comment:2 Changed 7 months ago by Britney Fransen

The intent is to reproduce MythWelcome?'s lock/unlock shutdown menu item in MythFrontend. MythWelcome? isn't needed with the Standby ability of MythFrontend and there is not currently a way in the GUI to disable or enable backend shutdown temporarily. If a user has configured their backend to shutdown every night but wants it to stay on tonight they would have to open a term and run mythshutdown --lock and then mythshutdown --unlock when they want it to resume auto shutdown. Like MythWelcome? this requires the Pre-shutdown Check Command to check mythshutdown's lock status (MythShutdownLock? db setting) to allow shutdown.

comment:3 Changed 7 months ago by Peter Bennett

Personally, I do this with tests in the pre-shutdown check script for various conditions, including any user logged in apart from my tv-watching user. That way, for example, if I am logged in to the master backend via ssh it will not shut down. Other conditions are also tested, like for users accessing mythweb.

However - if you want it to be done from the frontend menu - that can also be achieved without any code changes. You can customize your menu theme with additional options and use the "EXEC someprogram" action to set a file that is checked in pre-shutdown or to call the mythshutdown --lock, whichever way you want to do it. see https://www.mythtv.org/wiki/Menu_theme_development_guide.

comment:4 Changed 6 months ago by Peter Bennett

Owner: set to Peter Bennett

comment:5 Changed 6 months ago by Bill Meek

Hi Peter, my use case is similar to yours. I do, however depend on the ability of MythShutdownLock to be a counter, such that if I ssh in more than once, the backend won't shutdown 'til the counter is back to zero. Seems like the code in mythshutdown --lock/--unlock is proper. [in the odd case you're not already thinking alone these lines] No idea if others do the same.

https://code.mythtv.org/cgit/mythtv/tree/mythtv/programs/mythshutdown/main.cpp#n102

comment:6 Changed 6 months ago by Peter Bennett

Resolution: Won't Fix
Status: infoneeded_newclosed

The developers do not feel this patch is generally useful. Thank you for your efforts and please do not let this put you off submitting further contributions.

comment:7 Changed 5 months ago by Stuart Auchterlonie

Milestone: needs_triageunknown
Note: See TracTickets for help on using tickets.